Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions github/attestations.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ type Attestation struct {
// The attestation's Sigstore Bundle.
// Refer to the sigstore bundle specification for more info:
// https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto
Bundle json.RawMessage `json:"bundle"`
RepositoryID int64 `json:"repository_id"`
Bundle json.RawMessage `json:"bundle,omitempty"`
// The download URL for the attestation's Sigstore Bundle.
BundleURL *string `json:"bundle_url,omitempty"`
// The entity that initiated the attestation.
Initiator *string `json:"initiator,omitempty"`
RepositoryID int64 `json:"repository_id"`
}

// AttestationsResponse represents a collection of artifact attestations.
Expand Down
16 changes: 16 additions & 0 deletions github/github-accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions github/github-accessors_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions github/orgs_attestations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ func TestOrganizationsService_ListAttestations(t *testing.T) {
"attestations": [
{
"repository_id": 1,
"bundle": {}
"bundle_url": "https://example.com/bundle.json",
"initiator": "octocat"
},
{
"repository_id": 2,
Expand All @@ -42,7 +43,8 @@ func TestOrganizationsService_ListAttestations(t *testing.T) {
Attestations: []*Attestation{
{
RepositoryID: 1,
Bundle: []byte(`{}`),
BundleURL: new("https://example.com/bundle.json"),
Initiator: new("octocat"),
},
{
RepositoryID: 2,
Expand Down
6 changes: 4 additions & 2 deletions github/repos_attestations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ func TestRepositoriesService_ListAttestations(t *testing.T) {
"attestations": [
{
"repository_id": 1,
"bundle": {}
"bundle_url": "https://example.com/bundle.json",
"initiator": "octocat"
},
{
"repository_id": 2,
Expand All @@ -42,7 +43,8 @@ func TestRepositoriesService_ListAttestations(t *testing.T) {
Attestations: []*Attestation{
{
RepositoryID: 1,
Bundle: []byte(`{}`),
BundleURL: new("https://example.com/bundle.json"),
Initiator: new("octocat"),
},
{
RepositoryID: 2,
Expand Down
6 changes: 4 additions & 2 deletions github/users_attestations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ func TestUsersService_ListAttestations(t *testing.T) {
"attestations": [
{
"repository_id": 1,
"bundle": {}
"bundle_url": "https://example.com/bundle.json",
"initiator": "octocat"
},
{
"repository_id": 2,
Expand All @@ -42,7 +43,8 @@ func TestUsersService_ListAttestations(t *testing.T) {
Attestations: []*Attestation{
{
RepositoryID: 1,
Bundle: []byte(`{}`),
BundleURL: new("https://example.com/bundle.json"),
Initiator: new("octocat"),
},
{
RepositoryID: 2,
Expand Down
Loading