diff --git a/src/drivers/gitlab.js b/src/drivers/gitlab.js index f5cb6a7df..92b21f9b1 100644 --- a/src/drivers/gitlab.js +++ b/src/drivers/gitlab.js @@ -530,7 +530,10 @@ class Gitlab { } get branch() { - return process.env.CI_BUILD_REF_NAME; + if ('CI_COMMIT_BRANCH' in process.env) { + return process.env.CI_COMMIT_BRANCH + } + return process.env.CI_COMMIT_REF_NAME; } get userEmail() {