Skip to content

Read the semver label of a pull request when the job runs - #2

Merged
vramperez merged 1 commit into
mainfrom
semver-label-from-api
Oct 29, 2026
Merged

vramperez merged 1 commit into
mainfrom
semver-label-from-api

Conversation

@vramperez

Copy link
Copy Markdown
Contributor

chart-pr.yml and semver-version.yml read the semver label of the pull request from the API when the job runs, instead of from the event that started the run.

Why: the appVersion bot of helm-charts opens its pull requests with gh pr create --label patch, which adds the label about two seconds after the opened event. The run started by opened sees no label and fails with found: none, and the labeled event, made with the workflow token, starts no run. Re-running did not help either, since a re-run reads the same event. It happened on FIWARE/helm-charts#645, #647 and #649 (and on the first run of #639, with the previous workflow). They needed the label removed and added again by hand.

Now the label counts as soon as it is there, and re-running the failed job is enough when it was added later. release.yml keeps reading the event: it runs when the pull request is closed, when its labels are final.

No caller has to change: @v1 picks it up with the release (v1.1.1, patch).

🤖 Generated with Claude Code

chart-pr.yml and semver-version.yml took the labels from the event that
started the run. A pull request opened with a label, as the appVersion
bot of helm-charts does with gh pr create --label, gets it two seconds
after the opened event, and the labeled event of the workflow token
starts no run: the check failed with 'found: none' although the label
was there, and re-running it read the same event again
(FIWARE/helm-charts#645, #647, #649). The labels are now read from the
API, so the label counts and a re-run picks up a label added later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vramperez
vramperez requested a review from Mortega5 October 29, 2026 10:08
@vramperez
vramperez merged commit 17e3d15 into main Oct 29, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants