feat: rework metadata sync to PR + auto-merge - #431
Merged
Conversation
main now requires 3 status checks before any push lands, so the metadata-update automation's direct push (as github-actions[bot], via GITHUB_TOKEN) can never satisfy them - there is nothing to check against until the branch exists. Rework the flow into two phases split across two scripts and two workflows: - github-actions-metadata-update.sh (unchanged trigger: daily schedule / manual dispatch) now pushes to a metadata-update/<tag> branch, opens a PR against main, and enables auto-merge, instead of committing straight to main and creating the release itself. A guard skips opening a duplicate PR if one is already open for the same tag. The pre-commit dotnet build/test step is dropped - the PR's own required checks (full TFM matrix, CodeQL, coverage) run the same build and tests more thoroughly, so running them again here was redundant. - finalize-metadata-release.sh, run by the new finalize_metadata_release.yml on pull_request:closed (filtered to a merged metadata-update/* PR opened by github-actions[bot]), tags the merge commit, creates the GitHub release, and dispatches the NuGet publish - the second half of what the update script used to do inline. - github-release-helpers.sh factors out the pieces both scripts share (logging, the authenticated ghApi wrapper, createRelease, dispatchPublish) so neither carries its own copy. Workflow permissions move with the responsibilities: create_new_release_on_new_metadata_update.yml trades actions: write for pull-requests: write (PR + auto-merge, no longer dispatching publish_nuget.yml itself); finalize_metadata_release.yml holds contents: write and actions: write for the release and dispatch. README.md and CLAUDE.md are updated to describe the new PR-based flow.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #431 +/- ##
==========================================
- Coverage 87.27% 87.26% -0.02%
==========================================
Files 41 41
Lines 3828 3831 +3
Branches 978 978
==========================================
+ Hits 3341 3343 +2
- Misses 283 284 +1
Partials 204 204 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Aug 28, 2026
Closed
Open
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
main's branch protection now requires 3 status checks before any push lands, so the metadata-update automation's direct push (asgithub-actions[bot], viaGITHUB_TOKEN) can never satisfy them — there is nothing to check against until the branch exists. Reworks the metadata sync into two phases, split across two scripts and two workflows.lib/github-actions-metadata-update.sh(same trigger: daily schedule / manual dispatch) now pushes to ametadata-update/<tag>branch, opens a PR againstmain, and enables auto-merge, instead of committing straight tomainand creating the release itself. A guard skips opening a duplicate PR if one is already open for the same tag. The pre-commitdotnet build/teststep is dropped — the PR's own required checks (full TFM matrix, CodeQL, coverage) run the same build and tests more thoroughly, so running them again here was redundant.lib/finalize-metadata-release.sh, run by the new.github/workflows/finalize_metadata_release.ymlonpull_request: closed(filtered to a mergedmetadata-update/*PR opened bygithub-actions[bot]), tags the merge commit, creates the GitHub release, and dispatches the NuGet publish — the second half of what the update script used to do inline.lib/github-release-helpers.shfactors out the pieces both scripts share (logging, the authenticatedghApiwrapper,createRelease,dispatchPublish) so neither carries its own copy.create_new_release_on_new_metadata_update.ymltradesactions: writeforpull-requests: write(PR + auto-merge, no longer dispatchingpublish_nuget.ymlitself);finalize_metadata_release.ymlholdscontents: writeandactions: writefor the release and dispatch.README.mdandCLAUDE.mdare updated to describe the new PR-based flow.Testing
shellcheck -x -S warningandbash -non all three scripts — clean.github-actions-metadata-update.shagainst this repo (fails only on this sandbox's known block on rawcurltoapi.github.com— the same failure the unmodified script would hit here, unrelated to this change).finalize-metadata-release.shinvocation forms (tag andmetadata-update/<tag>branch name), input validation rejection paths, and dry-run accuracy.