From 44d602eb7287dbe23571959d83c84bb7e069bc7e Mon Sep 17 00:00:00 2001 From: Philip Hayton Date: Tue, 12 Dec 2023 15:25:24 +0000 Subject: [PATCH] feat: add gitlab pipeline id (#1435) --- internal/report/output/saas/saas.go | 1 + internal/report/output/saas/types/types.go | 1 + 2 files changed, 2 insertions(+) diff --git a/internal/report/output/saas/saas.go b/internal/report/output/saas/saas.go index 1f94777db..af3fe61e3 100644 --- a/internal/report/output/saas/saas.go +++ b/internal/report/output/saas/saas.go @@ -212,5 +212,6 @@ func getMeta( BearerRulesVersion: config.BearerRulesVersion, BearerVersion: build.Version, FoundLanguages: reportData.FoundLanguages, + GitlabPipelineId: os.Getenv("CI_PIPELINE_ID"), }, nil } diff --git a/internal/report/output/saas/types/types.go b/internal/report/output/saas/types/types.go index 73fd06d3f..c4d898a56 100644 --- a/internal/report/output/saas/types/types.go +++ b/internal/report/output/saas/types/types.go @@ -22,6 +22,7 @@ type Meta struct { BearerRulesVersion string `json:"bearer_rules_version,omitempty" yaml:"bearer_rules_version,omitempty"` BearerVersion string `json:"bearer_version,omitempty" yaml:"bearer_version,omitempty"` FoundLanguages map[string]int32 `json:"found_languages" yaml:"found_languages"` + GitlabPipelineId string `json:"gitlab_pipeline_id,omitempty" yaml:"gitlab_pipeline_id,omitempty"` } type BearerReport struct {