mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-23 08:56:29 +00:00
inject private params in PR if private
This commit is contained in:
parent
6af9d40c4b
commit
275e7a3e3d
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ func (w *worker) Execute(r *model.Request) {
|
||||||
// append private parameters to the environment
|
// append private parameters to the environment
|
||||||
// variable section of the .drone.yml file, iff
|
// variable section of the .drone.yml file, iff
|
||||||
// this is not a pull request (for security purposes)
|
// 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 {
|
for k, v := range params {
|
||||||
script.Env = append(script.Env, k+"="+v)
|
script.Env = append(script.Env, k+"="+v)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue