Skip to content

Commit 6342641

Browse files
committed
Add ability to configure sbom gen on repository update
1 parent b41f03a commit 6342641

4 files changed

Lines changed: 45 additions & 3 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Feature
2+
body: Add ability to configure sbom generation on Repository Update
3+
time: 2025-05-22T10:56:17.629557-05:00

enum.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3075,6 +3075,36 @@ var AllRelationshipTypeEnum = []string{
30753075
string(RelationshipTypeEnumRelatedTo),
30763076
}
30773077

3078+
// RepositorySBOMGenerationConfigEnum The enumerated list of configuration values for SBOM generation at the repository level
3079+
type RepositorySBOMGenerationConfigEnum string
3080+
3081+
var (
3082+
RepositorySBOMGenerationConfigEnumOptIn RepositorySBOMGenerationConfigEnum = "opt_in" // Indicates that the repository will opt in to automated SBOM generation if it would be otherwise enabled at an integration or account level
3083+
RepositorySBOMGenerationConfigEnumOptOut RepositorySBOMGenerationConfigEnum = "opt_out" // Indicates that the repository will opt out of automated SBOM generation if it would be otherwise enabled at an integration or account level
3084+
)
3085+
3086+
// All RepositorySBOMGenerationConfigEnum as []string
3087+
var AllRepositorySBOMGenerationConfigEnum = []string{
3088+
string(RepositorySBOMGenerationConfigEnumOptIn),
3089+
string(RepositorySBOMGenerationConfigEnumOptOut),
3090+
}
3091+
3092+
// RepositorySBOMGenerationDisabledReasonEnum The set of values that explain why SBOM autogeneration is disabled
3093+
type RepositorySBOMGenerationDisabledReasonEnum string
3094+
3095+
var (
3096+
RepositorySBOMGenerationDisabledReasonEnumAccount RepositorySBOMGenerationDisabledReasonEnum = "account" // SBOM autogeneration is disabled at the account level
3097+
RepositorySBOMGenerationDisabledReasonEnumIntegration RepositorySBOMGenerationDisabledReasonEnum = "integration" // SBOM autogeneration is disabled at the integration level
3098+
RepositorySBOMGenerationDisabledReasonEnumRepository RepositorySBOMGenerationDisabledReasonEnum = "repository" // SBOM autogeneration is disabled at the repository level
3099+
)
3100+
3101+
// All RepositorySBOMGenerationDisabledReasonEnum as []string
3102+
var AllRepositorySBOMGenerationDisabledReasonEnum = []string{
3103+
string(RepositorySBOMGenerationDisabledReasonEnumAccount),
3104+
string(RepositorySBOMGenerationDisabledReasonEnumIntegration),
3105+
string(RepositorySBOMGenerationDisabledReasonEnumRepository),
3106+
}
3107+
30783108
// RepositoryVisibilityEnum Possible visibility levels for repositories
30793109
type RepositoryVisibilityEnum string
30803110

input.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,9 +1011,10 @@ type RelationshipDefinitionMetadataInput struct {
10111011

10121012
// RepositoryUpdateInput Specifies the input fields used to update a repository
10131013
type RepositoryUpdateInput struct {
1014-
Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the repository to be updated (Required)
1015-
OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The team that owns the repository (Optional)
1016-
Visible *Nullable[bool] `json:"visible,omitempty" yaml:"visible,omitempty" example:"false"` // Indicates if the repository is visible (Optional)
1014+
Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the repository to be updated (Required)
1015+
OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The team that owns the repository (Optional)
1016+
SbomGeneration *RepositorySBOMGenerationConfigEnum `json:"sbomGeneration,omitempty" yaml:"sbomGeneration,omitempty" example:"opt_in"` // The desired configuration state at the repository level for SBOM generation (Optional)
1017+
Visible *Nullable[bool] `json:"visible,omitempty" yaml:"visible,omitempty" example:"false"` // Indicates if the repository is visible (Optional)
10171018
}
10181019

10191020
// ScorecardInput Input used to create scorecards

object.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,14 @@ type RepositoryPath struct {
376376
Path string // The path where the linked service's code exists, relative to the root of the repository (Required)
377377
}
378378

379+
// SBOMGenerationConfiguration The configuration details that explain whether SBOM generation is allowed for the repository
380+
type SBOMGenerationConfiguration struct {
381+
DisabledReason RepositorySBOMGenerationDisabledReasonEnum // A brief explanation of why SBOM autogeneration is disabled (Optional)
382+
Enabled bool // Whether SBOM autogeneration is enabled through all associated configuration objects (Required)
383+
NextGenerationAt iso8601.Time // The approximate time at which a new software bill of material will be generated for this repository (Optional)
384+
State RepositorySBOMGenerationConfigEnum // The configuration option set by the current object (Optional)
385+
}
386+
379387
// ScorecardId A scorecard
380388
type ScorecardId struct {
381389
Id ID // A reference to the scorecard.

0 commit comments

Comments
 (0)