Provisioning: Include Ref URLs in Job Status (#109464)

* Add URLs to Job spec

* Rename them as RefURLs

* Implement RefURLs for Github

* Add Ref URLs to Jobs

* Worker Test

* Create the branch in the staged writer

* Regenerate Git mock

* Format code

* Consolidate ResourceURLs and RefURLs into one

* Fix broken tests
This commit is contained in:
Roberto Jiménez Sánchez
2025-08-12 11:57:37 +02:00
committed by GitHub
parent 90dfc26b43
commit f2303a8ad9
30 changed files with 2157 additions and 218 deletions
@@ -18,6 +18,7 @@ type JobStatusApplyConfiguration struct {
Errors []string `json:"errors,omitempty"`
Progress *float64 `json:"progress,omitempty"`
Summary []*provisioningv0alpha1.JobResourceSummary `json:"summary,omitempty"`
URLs *RepositoryURLsApplyConfiguration `json:"url,omitempty"`
}
// JobStatusApplyConfiguration constructs a declarative configuration of the JobStatus type for use with
@@ -88,3 +89,11 @@ func (b *JobStatusApplyConfiguration) WithSummary(values ...**provisioningv0alph
}
return b
}
// WithURLs sets the URLs field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the URLs field is set to the value of the last call.
func (b *JobStatusApplyConfiguration) WithURLs(value *RepositoryURLsApplyConfiguration) *JobStatusApplyConfiguration {
b.URLs = value
return b
}
@@ -0,0 +1,52 @@
// SPDX-License-Identifier: AGPL-3.0-only
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v0alpha1
// RepositoryURLsApplyConfiguration represents a declarative configuration of the RepositoryURLs type for use
// with apply.
type RepositoryURLsApplyConfiguration struct {
RepositoryURL *string `json:"repositoryURL,omitempty"`
SourceURL *string `json:"sourceURL,omitempty"`
NewPullRequestURL *string `json:"newPullRequestURL,omitempty"`
CompareURL *string `json:"compareURL,omitempty"`
}
// RepositoryURLsApplyConfiguration constructs a declarative configuration of the RepositoryURLs type for use with
// apply.
func RepositoryURLs() *RepositoryURLsApplyConfiguration {
return &RepositoryURLsApplyConfiguration{}
}
// WithRepositoryURL sets the RepositoryURL field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the RepositoryURL field is set to the value of the last call.
func (b *RepositoryURLsApplyConfiguration) WithRepositoryURL(value string) *RepositoryURLsApplyConfiguration {
b.RepositoryURL = &value
return b
}
// WithSourceURL sets the SourceURL field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the SourceURL field is set to the value of the last call.
func (b *RepositoryURLsApplyConfiguration) WithSourceURL(value string) *RepositoryURLsApplyConfiguration {
b.SourceURL = &value
return b
}
// WithNewPullRequestURL sets the NewPullRequestURL field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the NewPullRequestURL field is set to the value of the last call.
func (b *RepositoryURLsApplyConfiguration) WithNewPullRequestURL(value string) *RepositoryURLsApplyConfiguration {
b.NewPullRequestURL = &value
return b
}
// WithCompareURL sets the CompareURL field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the CompareURL field is set to the value of the last call.
func (b *RepositoryURLsApplyConfiguration) WithCompareURL(value string) *RepositoryURLsApplyConfiguration {
b.CompareURL = &value
return b
}
@@ -56,6 +56,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &provisioningv0alpha1.RepositorySpecApplyConfiguration{}
case v0alpha1.SchemeGroupVersion.WithKind("RepositoryStatus"):
return &provisioningv0alpha1.RepositoryStatusApplyConfiguration{}
case v0alpha1.SchemeGroupVersion.WithKind("RepositoryURLs"):
return &provisioningv0alpha1.RepositoryURLsApplyConfiguration{}
case v0alpha1.SchemeGroupVersion.WithKind("ResourceCount"):
return &provisioningv0alpha1.ResourceCountApplyConfiguration{}
case v0alpha1.SchemeGroupVersion.WithKind("ResourceRef"):