Repository navigation
fix(setup-ci): GitLab delete-merged-branch tolerates an already deleted branch - #126
Merged
Merged
Conversation
…ed branch The protected-branch lookup returned 404 for a branch deleted on merge, and curl -f failed the job under pipefail. A missing branch now means nothing to delete.
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.
The protected-branch lookup added in #117 returns 404 when the source branch was already deleted on merge (the open-pr/merge-pr flow).
curl -fexits 22, which fails the job under pipefail. The lookup now falls back togoneand the job exits 0 unless the branch exists and is unprotected.GitHub workflow checked, no change: the lookup runs inside an
if [ "$(...)" = true ]test, so a failed lookup is tolerated and the DELETE already ends in|| echo.Tested: stubbed curl under bash -eo pipefail for gone, protected and unprotected (DELETE only runs for unprotected); YAML parses; pytest (92 passed). Not run on a live runner.
Closes #125