refactor: extract tagger to standalone script with git fallback#79
Merged
Conversation
Extract the tagging logic from release-tag.yml into a standalone tag-repo.sh script that can be run independently. Primary: uses gh release create+delete to tag without cloning. Fallback: git clone + tag + push when gh CLI unavailable. Fixes the broken tag existence check (gh api --jq returns JSON error body on 404, not empty string) by using gh release view instead. Each repo failure is reported but doesn't block other repos. Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
cd65aa2 to
60e426a
Compare
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.
Summary
Extract the tagging logic from
release-tag.ymlinto a standalonetag-repo.shscript.Primary:
gh release create+deleteto tag without cloning (fast).Fallback:
git clone+tag+pushwhenghCLI is unavailable.Fixes the broken tag existence check —
gh api --jqreturns the JSON error body on 404 (not empty string), causing every repo to show "EXISTS". Usesgh release viewinstead.Test plan
v34.0.0rc4 --forceto re-tag all reposgh api repos/nextcloud/activity/git/ref/tags/v34.0.0rc4