From 627f40987e5cd5fd370b1e60fd03ef1c01ce64b4 Mon Sep 17 00:00:00 2001 From: Simone Gotti Date: Thu, 5 Mar 2020 16:03:26 +0100 Subject: [PATCH] run: export also pull request id environment variable to runs --- internal/services/gateway/action/run.go | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/internal/services/gateway/action/run.go b/internal/services/gateway/action/run.go index 9350cf2..8b1258e 100644 --- a/internal/services/gateway/action/run.go +++ b/internal/services/gateway/action/run.go @@ -410,15 +410,16 @@ func (h *ActionHandler) CreateRuns(ctx context.Context, req *CreateRunRequest) e // this env vars overrides other env vars env := map[string]string{ - "CI": "true", - "AGOLA_SSHPRIVKEY": req.SSHPrivKey, - "AGOLA_REPOSITORY_URL": req.CloneURL, - "AGOLA_GIT_HOST": gitHost, - "AGOLA_GIT_PORT": gitPort, - "AGOLA_GIT_BRANCH": req.Branch, - "AGOLA_GIT_TAG": req.Tag, - "AGOLA_GIT_REF": req.Ref, - "AGOLA_GIT_COMMITSHA": req.CommitSHA, + "CI": "true", + "AGOLA_SSHPRIVKEY": req.SSHPrivKey, + "AGOLA_REPOSITORY_URL": req.CloneURL, + "AGOLA_GIT_HOST": gitHost, + "AGOLA_GIT_PORT": gitPort, + "AGOLA_GIT_BRANCH": req.Branch, + "AGOLA_GIT_TAG": req.Tag, + "AGOLA_PULL_REQUEST_ID": req.PullRequestID, + "AGOLA_GIT_REF": req.Ref, + "AGOLA_GIT_COMMITSHA": req.CommitSHA, } if req.SSHHostKey != "" {