PR #22 kept autorelease: pending after its head branch was deleted. Gitea rewrites head.ref to refs/pull/22/head, so the action cannot tag it and every later run then aborts with 'There are untagged, merged release PRs outstanding' - no new release PR is ever opened.
Add a reconciliation step that marks a pending PR tagged when its tag already exists, and recreates the tag from the manifest at the merge commit when the branch is gone and the tag is missing.
PR #22 kept autorelease: pending after its head branch was deleted. Gitea rewrites head.ref to refs/pull/22/head, so the action cannot tag it and every later run then aborts with 'There are untagged, merged release PRs outstanding' - no new release PR is ever opened.
Add a reconciliation step that marks a pending PR tagged when its tag already exists, and recreates the tag from the manifest at the merge commit when the branch is gone and the tag is missing.
The first reconciliation path marks a pending PR as autorelease: tagged whenever any tag points at the merge commit (tagSha.get(mergeSha)), without checking that the tag is a release tag (e.g. v-prefixed) or that it matches the version in the manifest. If any non-release tag (from CI tooling, a manual annotation, etc.) happens to land on the merge commit, the PR is marked tagged and the actual release tag release-please would have created is never made — the release silently never exists while the pipeline looks healthy. Verifying the tag name matches v${versionAt(mergeSha)} (or at least a release-tag pattern) before swapping the label would close this.
const existingTag = tagSha.get(mergeSha)
const labels = (pull.labels ?? []).map(label => label.name)
if (existingTag) {
console.log(`#${pull.number}: ${existingTag} already points at merge commit ${mergeSha} - marking as tagged`)
const next = labels.filter(name => name !== PENDING)
if (!next.includes(TAGGED)) next.push(TAGGED)
await replaceLabels(pull.number, next)
continue
}
listAll('/pulls?state=closed') pages through closed PRs with limit=50&page=N. Gitea's default sort for this endpoint is newest-first, so if new PRs are closed while the loop is paginating, items shift between pages and some closed PRs can be skipped or visited twice. For a pending PR that lands on a skipped page, the reconcile step silently does nothing that run. Sorting explicitly (e.g. by ascending number, if the API supports a sort parameter) or filtering by a recent-time window would make the enumeration stable. Severity is low given the step re-runs on every push, but it can delay recovery by a run.
## PR Reviewer Guide 🔍
<!-- pr-agent:review:full -->
Here are some key observations to aid the review process:
<table>
<tr><td>⏱️ <strong>Estimated effort to review</strong>: 3 🔵🔵🔵⚪⚪</td></tr>
<tr><td>🧪 <strong>No relevant tests</strong></td></tr>
<tr><td>🔒 <strong>No security concerns identified</strong></td></tr>
<tr><td>⚡ <strong>Recommended focus areas for review</strong><br><br>
<details><summary><a href='https://git.noelsabia.dev/CV_Website/CV_Site_Nuxt/src/branch/fix/release_please_tags/scripts/reconcile-release-please.mjs#L129-L138'><strong>Unvalidated tag match</strong></a>
The first reconciliation path marks a pending PR as `autorelease: tagged` whenever *any* tag points at the merge commit (`tagSha.get(mergeSha)`), without checking that the tag is a release tag (e.g. `v`-prefixed) or that it matches the version in the manifest. If any non-release tag (from CI tooling, a manual annotation, etc.) happens to land on the merge commit, the PR is marked tagged and the actual release tag release-please would have created is never made — the release silently never exists while the pipeline looks healthy. Verifying the tag name matches `v${versionAt(mergeSha)}` (or at least a release-tag pattern) before swapping the label would close this.
</summary>
```txt
const existingTag = tagSha.get(mergeSha)
const labels = (pull.labels ?? []).map(label => label.name)
if (existingTag) {
console.log(`#${pull.number}: ${existingTag} already points at merge commit ${mergeSha} - marking as tagged`)
const next = labels.filter(name => name !== PENDING)
if (!next.includes(TAGGED)) next.push(TAGGED)
await replaceLabels(pull.number, next)
continue
}
```
</details>
<details><summary><a href='https://git.noelsabia.dev/CV_Website/CV_Site_Nuxt/src/branch/fix/release_please_tags/scripts/reconcile-release-please.mjs#L64-L72'><strong>Pagination race</strong></a>
`listAll('/pulls?state=closed')` pages through closed PRs with `limit=50&page=N`. Gitea's default sort for this endpoint is newest-first, so if new PRs are closed while the loop is paginating, items shift between pages and some closed PRs can be skipped or visited twice. For a pending PR that lands on a skipped page, the reconcile step silently does nothing that run. Sorting explicitly (e.g. by ascending number, if the API supports a sort parameter) or filtering by a recent-time window would make the enumeration stable. Severity is low given the step re-runs on every push, but it can delay recovery by a run.
</summary>
```txt
const listAll = async (path) => {
const items = []
for (let page = 1; ; page++) {
const separator = path.includes('?') ? '&' : '?'
const batch = await api(`${path}${separator}limit=50&page=${page}`)
items.push(...batch)
if (batch.length < 50) return items
}
}
```
</details>
</td></tr>
</table>
Both PR-Agent findings were confirmed. A tag at the merge commit now counts only when it is exactly v<manifest version>; foreign CI or annotation tags are logged and ignored. Pending release PRs are fetched through the autorelease: pending label filter instead of paging every closed PR, so a concurrent close cannot shift a page and hide one.
Also fail loudly on a merged PR without merge_commit_sha or a manifest without a version, instead of producing vundefined.
Rebased on main after the separate audit fix (e0c69c1); the dependency overrides and lockfile changes from the earlier local commit were dropped. Verified on the rebased tree: lint, typecheck, build, the exact audit command, actionlint and a live dry run.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
PR #22 kept autorelease: pending after its head branch was deleted. Gitea rewrites head.ref to refs/pull/22/head, so the action cannot tag it and every later run then aborts with 'There are untagged, merged release PRs outstanding' - no new release PR is ever opened.
Add a reconciliation step that marks a pending PR tagged when its tag already exists, and recreates the tag from the manifest at the merge commit when the branch is gone and the tag is missing.
Failed to update PR description
PR Reviewer Guide 🔍
Here are some key observations to aid the review process:
Unvalidated tag match
The first reconciliation path marks a pending PR as
autorelease: taggedwhenever any tag points at the merge commit (tagSha.get(mergeSha)), without checking that the tag is a release tag (e.g.v-prefixed) or that it matches the version in the manifest. If any non-release tag (from CI tooling, a manual annotation, etc.) happens to land on the merge commit, the PR is marked tagged and the actual release tag release-please would have created is never made — the release silently never exists while the pipeline looks healthy. Verifying the tag name matchesv${versionAt(mergeSha)}(or at least a release-tag pattern) before swapping the label would close this.Pagination race
listAll('/pulls?state=closed')pages through closed PRs withlimit=50&page=N. Gitea's default sort for this endpoint is newest-first, so if new PRs are closed while the loop is paginating, items shift between pages and some closed PRs can be skipped or visited twice. For a pending PR that lands on a skipped page, the reconcile step silently does nothing that run. Sorting explicitly (e.g. by ascending number, if the API supports a sort parameter) or filtering by a recent-time window would make the enumeration stable. Severity is low given the step re-runs on every push, but it can delay recovery by a run.258b03e458to7ffc6d73b6