Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ class GitLabInfo implements CIProviderInfo {
public static final String GITLAB_CI_RUNNER_TAGS = "CI_RUNNER_TAGS";
public static final String GITLAB_PULL_REQUEST_BASE_BRANCH =
"CI_MERGE_REQUEST_TARGET_BRANCH_NAME";
public static final String GITLAB_PULL_REQUEST_BASE_SHA = "CI_MERGE_REQUEST_DIFF_BASE_SHA";
public static final String GITLAB_PULL_REQUEST_BASE_HEAD_SHA =
"CI_MERGE_REQUEST_TARGET_BRANCH_SHA";
public static final String GITLAB_PULL_REQUEST_COMMIT_HEAD_SHA =
"CI_MERGE_REQUEST_SOURCE_BRANCH_SHA";
public static final String GITLAB_PULL_REQUEST_NUMBER = "CI_MERGE_REQUEST_IID";
Expand Down Expand Up @@ -88,8 +91,8 @@ public CIInfo buildCIInfo() {
public PullRequestInfo buildPullRequestInfo() {
return new PullRequestInfo(
normalizeBranch(environment.get(GITLAB_PULL_REQUEST_BASE_BRANCH)),
null,
null,
environment.get(GITLAB_PULL_REQUEST_BASE_SHA),
environment.get(GITLAB_PULL_REQUEST_BASE_HEAD_SHA),
new CommitInfo(environment.get(GITLAB_PULL_REQUEST_COMMIT_HEAD_SHA)),
environment.get(GITLAB_PULL_REQUEST_NUMBER));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1080,8 +1080,10 @@
"CI_JOB_NAME": "gitlab-job-name",
"CI_JOB_STAGE": "gitlab-stage-name",
"CI_JOB_URL": "https://gitlab.com/job",
"CI_MERGE_REQUEST_DIFF_BASE_SHA": "bf6c156e8c1ec9cf43239162bca38cad22a3f4d2",
"CI_MERGE_REQUEST_IID": 42,
"CI_MERGE_REQUEST_TARGET_BRANCH_NAME": "target-branch",
"CI_MERGE_REQUEST_TARGET_BRANCH_SHA": "eb6dda23983998409db832ad675ec18ec32a8205",
"CI_PIPELINE_ID": "gitlab-pipeline-id",
"CI_PIPELINE_IID": "gitlab-pipeline-number",
"CI_PIPELINE_URL": "https://foo/repo/-/pipelines/1234",
Expand Down Expand Up @@ -1110,6 +1112,8 @@
"git.commit.message": "gitlab-git-commit-message",
"git.commit.sha": "b9f0fb3fdbb94c9d24b2c75b49663122a529e123",
"git.pull_request.base_branch": "target-branch",
"git.pull_request.base_branch_head_sha": "eb6dda23983998409db832ad675ec18ec32a8205",
"git.pull_request.base_branch_sha": "bf6c156e8c1ec9cf43239162bca38cad22a3f4d2",
"git.repository_url": "https://gitlab.com/repo/myrepo.git",
"pr.number": "42"
}
Expand Down