Skip to content

Conversation

@maishivamhoo123
Copy link
Contributor

Description

This PR implements the Organization Artifact Metadata APIs as requested in #3917.
This version corrects the scope from Repository to Organization level.

Changes

  • Logic: Moved implementation to github/orgs_artifacts.go.
  • Endpoints Added:
    • 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
  • Testing: Added comprehensive unit tests in github/orgs_artifacts_test.go.
  • Generated: Updated github-accessors.go and github-stringify_test.go via script/generate.sh.

Checklist

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

Fixes #3917

@gmlewis gmlewis changed the title feat: implement organization artifact metadata APIs feat: Add organization artifact metadata APIs Jan 27, 2026
@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Jan 27, 2026
@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 77.77778% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.41%. Comparing base (a21a651) to head (39a1ebc).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
github/orgs_artifacts.go 77.77% 5 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3944      +/-   ##
==========================================
- Coverage   92.45%   92.41%   -0.05%     
==========================================
  Files         203      204       +1     
  Lines       14980    15025      +45     
==========================================
+ Hits        13850    13885      +35     
- Misses        927      932       +5     
- Partials      203      208       +5     

☔ 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.

@maishivamhoo123
Copy link
Contributor Author

@gmlewis Sir can you please review the code?

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @maishivamhoo123, @alexandear , and @Not-Dhananjay-Mishra!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @zyfy29

@maishivamhoo123
Copy link
Contributor Author

@Not-Dhananjay-Mishra can you please check once i think the latest pr is able to meet all your requirements?

// GitHub API docs: https://docs.github.com/rest/orgs/artifact-metadata#create-an-artifact-deployment-record
//
//meta:operation POST /orgs/{org}/artifacts/metadata/deployment-record
func (s *OrganizationsService) CreateArtifactDeploymentRecord(ctx context.Context, org string, record *ArtifactDeploymentRecord) (*ArtifactDeploymentResponse, *Response, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@maishivamhoo123 this comment is not addressed: https://github.com/google/go-github/pull/3944/changes#r2732556939

Should be a separate struct for the request body.

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

Labels

NeedsReview PR is awaiting a review before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for new Artifact Metadata endpoints

4 participants