Skip to content

Commit

Permalink
remove extraneous field from referrers index (#1185)
Browse files Browse the repository at this point in the history
Signed-off-by: Brian DeHamer <[email protected]>
  • Loading branch information
bdehamer authored Jun 12, 2024
1 parent 426540e commit 1c918fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/plenty-beans-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sigstore/oci': patch
---

Remove extraneous field from referrers index
6 changes: 5 additions & 1 deletion packages/oci/src/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,13 @@ export class OCIImage {

// Manually update the referrers list if the referrers API is not supported.
if (!referrersSupported) {
// Strip subjectDigest from the artifact descriptor (in case it was returned)
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
const { subjectDigest, ...descriptor } = artifactDescriptor;

await this.#createReferrersIndexByTag({
artifact: {
...artifactDescriptor,
...descriptor,
artifactType: opts.mediaType,
annotations,
},
Expand Down

0 comments on commit 1c918fc

Please sign in to comment.