fix: correct the release skill's TEAM_ID guard and publish order - #40
Merged
Conversation
The guard told the release to grep the whole diff for TEAM_ID, but TEAM_ID= sits three lines above the version block in Config.xcconfig, so it always matched as an unchanged context line and aborted the release on every run. Inspect added lines only. Also generate the changelog before creating the tag. The tag was being pushed at step 8 and the notes only approved at step 9, so the user saw the changelog after the tag was already public; there is now a single confirm-then-publish gate. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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
Fixes issues found by actually running
/release v0.2.0end to end. One of them was a real bug that would have aborted every future release.The
TEAM_IDguard in step 4 told the release to check thatgit diff"shows nothing else" besides the version lines. Taken literally that greps the whole diff, which includes unchanged context lines — andTEAM_ID=sits three lines above the version block inConfig.xcconfig, so it matched on every run and aborted the release. It has to inspect added lines only.The publish order was also wrong: the tag was pushed at step 8 and the changelog only approved at step 9, so the notes were reviewed after the tag was already public.
Changes
TEAM_IDguard: inspect added lines only (git diff | grep -E "^\+[^+]"), with a note explaining why grepping the full diff false-positives, so it does not regress.HEAD~1toHEADaccordingly, since the new tag does not exist yet at that point.gh release createspecifics: use--notes-filerather than--notesfor multi-line bodies, pass--latestexplicitly, and verify via thereleases/latestendpoint —gh release view --json isLatestis not a valid field and errored during the run.commit && push && gh pr createis what left a commit pushed with no PR when the call was declined mid-run; also records thatgit rev-parse @{u}can fail on a branch that was pushed when its remote-tracking ref is simply unfetched.fix: update changelogcommits only touched.gitignore.Test plan
Guard verified in both directions against the real v0.2.0 bump commit (
ecbdb36):TEAM_IDalongside a version bump → new guard aborts, so real leaks are still caught. The test file was restored afterwards (TEAM_IDempty, versions2/0.2.0).TEAM_IDvalue.Documentation-only change — no build or app behaviour is affected.
Checklist
./gradlew detektpassesdetekt unaffected (no Kotlin touched) but passing as of the last run; device boxes left unchecked as this changes only the release skill.