fix(queue): use label= (singular) not labels= (plural) for Gitea 1.22.6 API (#1306) #2412
Reference in New Issue
Block a user
Delete Branch "fix/1306-gitea-label-singular"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Gitea 1.22.6 accepts
label(singular) notlabels(plural) for filtering issues by label. The queue script has been returning 0 PRs (or all PRs) for every cron tick since the queue was introduced because the parameter was silently ignored.Fix: Change
"labels": QUEUE_LABEL→"label": QUEUE_LABELinlist_queued_issues().Test plan:
python -c "import urllib.parse; print(urllib.parse.urlencode({label: merge-queue}))"confirmslabel=merge-queue.choose_next_queued_issuewith mock data; the query-building path is covered bytest_api_paginated_query.Fixes #1306
787b369554todf72f82814APPROVED on current head
df72f82814. 5-axis review: correctness is sound for Gitea 1.22.6's singularlabelquery parameter; robustness improves by restoring the intended merge-queue label filter instead of relying on an ignored plural parameter; security/auth unchanged; performance unchanged; readability/test coverage are adequate with the focused unit assertion update. No gate weakening: this does not remove/rename required checks, loosen readiness, or make absent checks pass. BP-required contexts are present+green./refire-tier-check
Gitea 1.22.6 accepts `label` (singular) not `labels` (plural) for filtering issues by label in the GET /repos/{owner}/{repo}/issues endpoint. The queue script's list_queued_issues() has been passing `labels`, which Gitea silently ignores, causing the function to return all open PRs instead of only those tagged with QUEUE_LABEL. Change the query key from "labels" to "label" so the label filter is actually honoured. Fixes #1306df72f82814to844664c6425-axis review on current head
844664c6: approved. This is a narrow Gitea 1.22.6 compatibility fix changing the merge-queue issue search parameter from labels= to label=, with the corresponding regression assertion updated. I found no correctness, security, performance, readability, auth, or gate-weakening issue; required BP contexts are present/success and the PR is mergeable.APPROVE: verified current head
844664c. Diff only changes Gitea issue search query from labels= to label= for merge-queue filtering, with test updated. No gate/auth/merge-control weakening; this restores intended queue selection. BP-required contexts present+green and mergeable=true; governance qa/security statuses still failing separately.