fix(ci): create the release-please labels before the action runs #23

Merged
Noel merged 1 commits from fix/release_please into main 2026-10-27 11:07:46 +00:00
Owner

release-please finds merged release PRs by the 'autorelease: pending'
label. Gitea resolves label names with GetLabelIDsInRepoByNames, a SQL IN
filter that silently drops unknown names, so on a repository without the
labels the PR is created unlabeled and every run finds zero merged release
PRs: no tag, no release, and the next release PR instead - with a green
run each time. That is what happened to #20 and #21.

The workflow now ensures both labels exist (idempotent: list, create the
missing ones) and gained workflow_dispatch so a missed release can be
replayed.

release-please finds merged release PRs by the 'autorelease: pending' label. Gitea resolves label names with GetLabelIDsInRepoByNames, a SQL IN filter that silently drops unknown names, so on a repository without the labels the PR is created unlabeled and every run finds zero merged release PRs: no tag, no release, and the next release PR instead - with a green run each time. That is what happened to #20 and #21. The workflow now ensures both labels exist (idempotent: list, create the missing ones) and gained workflow_dispatch so a missed release can be replayed.
Noel added 1 commit 2026-10-27 11:05:00 +00:00
fix(ci): create the release-please labels before the action runs
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / Lint + typecheck (pull_request) Successful in 1m11s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 6s
PR Check / Dependency audit (pull_request) Successful in 9s
PR Check / Dockerfile lint (droast) (pull_request) Successful in 4s
PR Check / AI code review (opencode) (pull_request) Successful in 38s
0a3c90cc74
release-please finds merged release PRs by the 'autorelease: pending'
label. Gitea resolves label names with GetLabelIDsInRepoByNames, a SQL IN
filter that silently drops unknown names, so on a repository without the
labels the PR is created unlabeled and every run finds zero merged release
PRs: no tag, no release, and the next release PR instead - with a green
run each time. That is what happened to #20 and #21.

The workflow now ensures both labels exist (idempotent: list, create the
missing ones) and gained workflow_dispatch so a missed release can be
replayed.
Author
Owner



build · claude-haiku-5-5
→ Read .pr-review-diff.patch
build · claude-haiku-5-5
→ Read .gitea/workflows/release-please.yml
build · claude-haiku-5-5
Findings

[WARN] .gitea/workflows/release-please.yml:8 - workflow_dispatch lets anyone with write access run this job from any branch, and the job has PR_GITEA_TOKEN and contents: write. Before this change, the workflow only ran on pushes to main, so a modified workflow on a feature branch could not run with these secrets. Fix: remove workflow_dispatch, or gate the job with if: github.ref == 'refs/heads/main' and make sure the secrets are not exposed to other refs. If you keep dispatch, document it as a deliberate trust decision.

[WARN] .gitea/workflows/release-please.yml:19 - There is no concurrency group. Two runs close together (two quick pushes to main, or a push plus a manual dispatch) can both see a missing label and both POST it. The second POST gets a conflict, the step exits 1, and that run never reaches the release action. Fix: add concurrency: { group: release-please, cancel-in-progress: false } at the workflow level.

[WARN] .gitea/workflows/release-please.yml:33 - The existence check reads only ?limit=50 and does not paginate. Once the repo has more than 50 labels, a label that exists on a later page looks missing, the POST returns a conflict, and the step fails on every run. Fix: either paginate with &page=N until an empty page, or drop the pre-check and treat HTTP 409 (or 422 for duplicate name) as "already exists" and continue.

[NIT] .gitea/workflows/release-please.yml:39,46 - /tmp/label.json is a fixed path that can collide if runs share a host. Use "$RUNNER_TEMP/label.json", or pipe the body to stdout.

[NIT] .gitea/workflows/release-please.yml:35 - grep -qF on the raw JSON matches the string anywhere in the response, including a label description. A jq -e --arg n "$name" 'any(.[]; .name == $n)' check is exact and clearer.

The rest of the diff is documentation (OKF_Nuxt/decisions/release-engineering.md, OKF_Nuxt/log.md) and has no reviewable code beyond the workflow above.

VERDICT: APPROVE

 > build · claude-haiku-5-5 → Read .pr-review-diff.patch > build · claude-haiku-5-5 → Read .gitea/workflows/release-please.yml > build · claude-haiku-5-5 **Findings** [WARN] .gitea/workflows/release-please.yml:8 - `workflow_dispatch` lets anyone with write access run this job from any branch, and the job has `PR_GITEA_TOKEN` and `contents: write`. Before this change, the workflow only ran on pushes to `main`, so a modified workflow on a feature branch could not run with these secrets. Fix: remove `workflow_dispatch`, or gate the job with `if: github.ref == 'refs/heads/main'` and make sure the secrets are not exposed to other refs. If you keep dispatch, document it as a deliberate trust decision. [WARN] .gitea/workflows/release-please.yml:19 - There is no `concurrency` group. Two runs close together (two quick pushes to `main`, or a push plus a manual dispatch) can both see a missing label and both POST it. The second POST gets a conflict, the step exits 1, and that run never reaches the release action. Fix: add `concurrency: { group: release-please, cancel-in-progress: false }` at the workflow level. [WARN] .gitea/workflows/release-please.yml:33 - The existence check reads only `?limit=50` and does not paginate. Once the repo has more than 50 labels, a label that exists on a later page looks missing, the POST returns a conflict, and the step fails on every run. Fix: either paginate with `&page=N` until an empty page, or drop the pre-check and treat HTTP 409 (or 422 for duplicate name) as "already exists" and continue. [NIT] .gitea/workflows/release-please.yml:39,46 - `/tmp/label.json` is a fixed path that can collide if runs share a host. Use `"$RUNNER_TEMP/label.json"`, or pipe the body to stdout. [NIT] .gitea/workflows/release-please.yml:35 - `grep -qF` on the raw JSON matches the string anywhere in the response, including a label description. A `jq -e --arg n "$name" 'any(.[]; .name == $n)'` check is exact and clearer. The rest of the diff is documentation (`OKF_Nuxt/decisions/release-engineering.md`, `OKF_Nuxt/log.md`) and has no reviewable code beyond the workflow above. VERDICT: APPROVE
Noel merged commit f9ddbb7e1a into main 2026-10-27 11:07:46 +00:00
Noel deleted branch fix/release_please 2026-10-27 11:07:46 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: CV_Website/CV_Site_Nuxt#23