Skip to content

Conversation

eyalk007
Copy link
Contributor

@eyalk007 eyalk007 commented Jul 23, 2025

Fixes: #3635.

This PR adds support for the metadata field in the DependencyGraphSnapshot struct, enabling users to include custom information when submitting dependency snapshots to GitHub's dependency graph API.

I have added comprehensive test coverage including JSON serialization validation.

This implementation follows the official GitHub API specification. The field type is map[string]any matching the API's object type. It has constraints of being limited to 8 keys with scalar values as documented.

@gmlewis gmlewis changed the title Added the metadata field to create DependencyGraphSnapshot Add the metadata field to create DependencyGraphSnapshot Jul 23, 2025
Copy link

codecov bot commented Jul 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.33%. Comparing base (83ae84c) to head (2bb5bc6).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3640   +/-   ##
=======================================
  Coverage   91.33%   91.33%           
=======================================
  Files         184      184           
  Lines       16174    16174           
=======================================
  Hits        14773    14773           
  Misses       1227     1227           
  Partials      174      174           

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

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, @eyalk007!
LGTM.
Merging.

@gmlewis gmlewis merged commit 20a1380 into google:master Jul 23, 2025
7 checks passed
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.

Add metadata property to DependencyGraph.CreateSnapshot
2 participants