From fa0df4add5d038c7e07ebd94928f7d722e156c47 Mon Sep 17 00:00:00 2001
From: gotbadger
Date: Tue, 12 Dec 2023 11:57:15 +0000
Subject: [PATCH] feat: add gitlab pipeline id
---
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 {