Repository navigation
Retry the label lookup and ask for a label only when it is missing - #6
Merged
Merged
Conversation
When the GitHub API answered the lookup of the pull request's labels with an error page, gh failed with "invalid character '<' looking for beginning of value", the job failed, and the workflow commented on the pull request asking for a label it already had. semver-label.sh now retries each API call (3 attempts, 5 seconds apart) and exits with 2 when they keep failing. Only a missing or ambiguous label exits with 1 and writes `label-missing=true`, and the comment asking for the label runs only then. chart-pr.yml reads the label with the same script instead of its own copy of the check, so it gets the retries as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Please apply exactly one of the following labels to the PR: 'patch', 'minor', 'major'. |
Mortega5
approved these changes
Nov 13, 2026
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.
When the GitHub API answered the lookup of a pull request's labels with an error page,
ghfailed withinvalid character '<' looking for beginning of value. The job failed and the workflow commented on the pull request asking for a label it already had, as in FIWARE/odrl-authorization#33.scripts/semver-label.shretries each GitHub API call (3 attempts, 5 seconds apart,RETRIESandRETRY_DELAY).label-missing=true.semver-version.ymlandchart-pr.ymlcomment asking for the label only whenlabel-missingis set.chart-pr.ymlreads the label with the same script instead of its own copy of the check, so it gets the retries too. Its label job checks out the script, hencecontents: read.Tests
bats tests: a failed call is retried; an API that keeps failing exits with 2 withoutlabel-missing; a missing label writeslabel-missing=true; a push's merged pull request is read with retries tooshellcheck,actionlintchart-pr.ymlrun shows the comment, and labelled afterwards