Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@maishivamhoo123
Copy link
Contributor

Description

This PR adds support for the new Artifact Metadata endpoints as requested in #3917.

Changes

  • Logic: Added GetArtifactMetadata to github/actions_artifacts.go.
  • Testing: Added TestActionsService_GetArtifactMetaData and TestActionsService_GetArtifactMetaData_notFound to verify the new endpoint and error handling.
  • Metadata: Updated openapi_operations.yaml to include the new endpoint.

Checklist

  • I have reviewed my own diff for unnecessary changes.
  • All tests pass (test.sh).
  • Code is linted (lint.sh).
  • Ran go generate ./....

Fixes #3917

@maishivamhoo123
Copy link
Contributor Author

@gmlewis Sir, I have submitted the PR at #3941. Please review it when you have time. I have verified that all tests (test.sh, lint.sh, and go generate) are passing on my local machine. Thank you!

@gmlewis
Copy link
Collaborator

gmlewis commented Jan 26, 2026

Please do not update the yaml file in your PRs. If it needs updating, please ping me and I'll update the yaml in its own PR. Thank you.

@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.46%. Comparing base (f43d2cf) to head (2dcbb7c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3941   +/-   ##
=======================================
  Coverage   92.45%   92.46%           
=======================================
  Files         203      203           
  Lines       14980    14990   +10     
=======================================
+ Hits        13850    13860   +10     
  Misses        927      927           
  Partials      203      203           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


// GetArtifactMetadata gets the metadata for a specific artifact.
//
// GitHub API docs: https://docs.github.com/rest/actions/artifacts#get-artifact-metadata
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link seems broken.

@Not-Dhananjay-Mishra
Copy link
Contributor

I guess there is some confusion here.
The announced link referenced in the issue has artifact metadata APIs which include following endpoints

  • POST /orgs/{org}/artifacts/metadata/deployment-record
  • POST /orgs/{org}/artifacts/metadata/deployment-record/cluster/{cluster}
  • POST /orgs/{org}/artifacts/metadata/storage-record
  • GET /orgs/{org}/artifacts/{subject_digest}/metadata/deployment-records
  • GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records

However, the endpoint added in this PR GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/metadata is not documented in GitHub API docs

@maishivamhoo123
Copy link
Contributor Author

Please do not update the yaml file in your PRs. If it needs updating, please ping me and I'll update the yaml in its own PR. Thank you.

Sorry sir , I will keep in mind from next time.

@maishivamhoo123
Copy link
Contributor Author

I guess there is some confusion here. The announced link referenced in the issue has artifact metadata APIs which include following endpoints

  • POST /orgs/{org}/artifacts/metadata/deployment-record
  • POST /orgs/{org}/artifacts/metadata/deployment-record/cluster/{cluster}
  • POST /orgs/{org}/artifacts/metadata/storage-record
  • GET /orgs/{org}/artifacts/{subject_digest}/metadata/deployment-records
  • GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records

However, the endpoint added in this PR GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/metadata is not documented in GitHub API docs

Sorry @Not-Dhananjay-Mishra Sir , in the issue section nothing was clear like this. Now i get a clear idea now and i will read the whole description from https://docs.github.com/rest/orgs/artifact-metadata and after i will Raise a PR to this branch only .
Thank you for you Guidance. can you please provide any other relevant documentation which need to refer before raising a PR. it will be really helpful for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for new Artifact Metadata endpoints

4 participants