File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
dd-java-agent/agent-ci-visibility/src
main/java/datadog/trace/civisibility/ci Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ class GitLabInfo implements CIProviderInfo {
41
41
public static final String GITLAB_CI_RUNNER_TAGS = "CI_RUNNER_TAGS" ;
42
42
public static final String GITLAB_PULL_REQUEST_BASE_BRANCH =
43
43
"CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ;
44
+ public static final String GITLAB_PULL_REQUEST_BASE_SHA = "CI_MERGE_REQUEST_DIFF_BASE_SHA" ;
45
+ public static final String GITLAB_PULL_REQUEST_BASE_HEAD_SHA =
46
+ "CI_MERGE_REQUEST_TARGET_BRANCH_SHA" ;
44
47
public static final String GITLAB_PULL_REQUEST_COMMIT_HEAD_SHA =
45
48
"CI_MERGE_REQUEST_SOURCE_BRANCH_SHA" ;
46
49
public static final String GITLAB_PULL_REQUEST_NUMBER = "CI_MERGE_REQUEST_IID" ;
@@ -88,8 +91,8 @@ public CIInfo buildCIInfo() {
88
91
public PullRequestInfo buildPullRequestInfo () {
89
92
return new PullRequestInfo (
90
93
normalizeBranch (environment .get (GITLAB_PULL_REQUEST_BASE_BRANCH )),
91
- null ,
92
- null ,
94
+ environment . get ( GITLAB_PULL_REQUEST_BASE_SHA ) ,
95
+ environment . get ( GITLAB_PULL_REQUEST_BASE_HEAD_SHA ) ,
93
96
new CommitInfo (environment .get (GITLAB_PULL_REQUEST_COMMIT_HEAD_SHA )),
94
97
environment .get (GITLAB_PULL_REQUEST_NUMBER ));
95
98
}
Original file line number Diff line number Diff line change 1080
1080
"CI_JOB_NAME" : " gitlab-job-name" ,
1081
1081
"CI_JOB_STAGE" : " gitlab-stage-name" ,
1082
1082
"CI_JOB_URL" : " https://gitlab.com/job" ,
1083
+ "CI_MERGE_REQUEST_DIFF_BASE_SHA" : " bf6c156e8c1ec9cf43239162bca38cad22a3f4d2" ,
1083
1084
"CI_MERGE_REQUEST_IID" : 42 ,
1084
1085
"CI_MERGE_REQUEST_TARGET_BRANCH_NAME" : " target-branch" ,
1086
+ "CI_MERGE_REQUEST_TARGET_BRANCH_SHA" : " eb6dda23983998409db832ad675ec18ec32a8205" ,
1085
1087
"CI_PIPELINE_ID" : " gitlab-pipeline-id" ,
1086
1088
"CI_PIPELINE_IID" : " gitlab-pipeline-number" ,
1087
1089
"CI_PIPELINE_URL" : " https://foo/repo/-/pipelines/1234" ,
1110
1112
"git.commit.message" : " gitlab-git-commit-message" ,
1111
1113
"git.commit.sha" : " b9f0fb3fdbb94c9d24b2c75b49663122a529e123" ,
1112
1114
"git.pull_request.base_branch" : " target-branch" ,
1115
+ "git.pull_request.base_branch_head_sha" : " eb6dda23983998409db832ad675ec18ec32a8205" ,
1116
+ "git.pull_request.base_branch_sha" : " bf6c156e8c1ec9cf43239162bca38cad22a3f4d2" ,
1113
1117
"git.repository_url" : " https://gitlab.com/repo/myrepo.git" ,
1114
1118
"pr.number" : " 42"
1115
1119
}
You can’t perform that action at this time.
0 commit comments