1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-24 10:07:21 +02:00

inject private params in PR if private

This commit is contained in:
Brad Rydzewski 2014-08-14 23:00:52 -07:00
parent 6af9d40c4b
commit 275e7a3e3d

View File

@ -107,7 +107,7 @@ func (w *worker) Execute(r *model.Request) {
// append private parameters to the environment
// variable section of the .drone.yml file, iff
// this is not a pull request (for security purposes)
if params != nil && len(r.Commit.PullRequest) == 0 {
if params != nil && (r.Repo.Private || len(r.Commit.PullRequest) == 0) {
for k, v := range params {
script.Env = append(script.Env, k+"="+v)
}