Skip to content

Commit

Permalink
feat: add more scan context for gitlab (#1464)
Browse files Browse the repository at this point in the history
* feat: add more scan context for gitlab

* test: add coverage for saas report
  • Loading branch information
gotbadger authored Jan 15, 2024
1 parent 2d92940 commit 918c410
Show file tree
Hide file tree
Showing 8 changed files with 3,098 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/flag/repository_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ var (
Value: "",
Usage: "Used when fetching branch level ignores for a PR/MR",
EnvironmentVariables: []string{
"PR_NUMBER", // github
"CI_MERGE_REQUEST_ID", //gitlab
"PR_NUMBER", // github
"CI_MERGE_REQUEST_IID", //gitlab
},
DisableInConfig: true,
Hide: true,
Expand Down
4 changes: 2 additions & 2 deletions internal/flag/repository_flags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,10 @@ func Test_getPullRequestNumberFlag(t *testing.T) {
},
},
{
name: "Repository PullRequestNumber. CI_MERGE_REQUEST_ID env",
name: "Repository PullRequestNumber. CI_MERGE_REQUEST_IID env",
flag: PullRequestNumberFlag,
env: Env{
key: "CI_MERGE_REQUEST_ID",
key: "CI_MERGE_REQUEST_IID",
value: "24",
},
want: []string{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"id": "github.com/Bearer/bear-publishing",
"host": "github.com",
"username": "Bearer",
"name": "bear-publishing",
"url": "git@github.com:Bearer/bear-publishing.git",
"full_name": "Bearer/bear-publishing",
"target": ".",
"sha": "9e54ffa8633898ab65bc4b4e804f7ef24cc068c4",
"current_branch": "main",
"default_branch": "main",
"bearer_rules_version": "v0.0.0",
"bearer_version": "dev",
"found_languages": {
"CSS": 26,
"HTML": 413,
"JavaScript": 16,
"Markdown": 11,
"Plain Text": 2,
"Ruby": 1198,
"YAML": 59
},
"gitlab_pipeline_id": "123",
"gitlab_job_id": "456"
}
Loading

0 comments on commit 918c410

Please sign in to comment.