[PR #1250] [MERGED] ci: the needs-rebase labeler no longer runs per pull request push (PR-CONFLICT-LABEL-LOAD) #1282

Closed
opened 2026-11-26 20:20:43 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1250
Author: @Mouad-Scriptz-0
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @aslan2142

Base: main ← Head: ci/conflict-label-no-per-pr-runs


📝 Commits (1)

  • 364754d ci: the needs-rebase labeler no longer runs per pull request push (PR-CONFLICT-LABEL-LOAD)

📊 Changes

4 files changed (+19 additions, -17 deletions)

View changed files

📝 .github/workflows/conflict-label.yml (+8 -9)
📝 CONTRIBUTING.md (+1 -2)
📝 tests/test_pr_conflict_label.py (+7 -2)
📝 tools/pr_conflict_label.py (+3 -4)

📄 Description

Claimed in the coordination issue as: PR-CONFLICT-LABEL-LOAD (#14)

Depends on: none

What and why

My needs rebase labeler from #155 works (112 open pull requests carry the label), but it's flooding the Actions queue. conflict-label.yml starts a run on every push to every pull request through pull_request_target. On this repository, that queued about 265 runs within a day, the oldest since 15:27 UTC. They wait in the same runner queue as CI (53 queued, the oldest since 14:41 UTC), No Game Data (59) and Runtime (29). I'm sorry about that.

This PR:

  • Drops the pull_request_target trigger. Every run already checks all open pull requests, so the push-to-main and hourly runs cover what the per-PR runs did. A rebased pull request now loses the label within the hour instead of right away.
  • Puts every run in one concurrency group (conflict-label). At most one run is in progress and one waiting, and a newer push replaces the waiting one.
  • Removes the per-PR --pr argument from the workflow. The workflow also no longer has a trigger that gives a fork's pull request a write token.
  • Updates tests/test_pr_conflict_label.py. It now checks that no pull_request / pull_request_target trigger, per-PR group or --pr comes back. The tool's docstring and the CONTRIBUTING.md line describe the new schedule.

Runs that are already queued will still run under the old workflow file. Each one is harmless but holds a runner slot. Someone with write access can clear them; the next push to main, or the hourly run, re-labels everything:

for s in queued pending; do
  gh run list -R ubiquitarianism/leonida --workflow conflict-label.yml --status "$s" --limit 1000 \
    --json databaseId --jq '.[].databaseId' | xargs -r -n1 gh run cancel -R ubiquitarianism/leonida
done

Tested

  • tests/test_pr_conflict_label.py: OK. Against the workflow on main (the old triggers), the new test_no_run_per_pull_request fails, as it should.
  • tests/test_ci_registration.py, tests/test_docs_links.py, tests/test_text_write_line_endings.py: OK.
  • The workflow YAML parses: triggers push, schedule and workflow_dispatch; concurrency {group: conflict-label, cancel-in-progress: false}.

GPUs tested: n/a (CI only)

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1250 **Author:** [@Mouad-Scriptz-0](https://github.com/Mouad-Scriptz-0) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@aslan2142](https://github.com/aslan2142) **Base:** `main` ← **Head:** `ci/conflict-label-no-per-pr-runs` --- ### 📝 Commits (1) - [`364754d`](https://github.com/ubiquitarianism/leonida/commit/364754de5c6594d2d4b959d9b0fa3ab07f83ea7b) ci: the needs-rebase labeler no longer runs per pull request push (PR-CONFLICT-LABEL-LOAD) ### 📊 Changes **4 files changed** (+19 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/conflict-label.yml` (+8 -9) 📝 `CONTRIBUTING.md` (+1 -2) 📝 `tests/test_pr_conflict_label.py` (+7 -2) 📝 `tools/pr_conflict_label.py` (+3 -4) </details> ### 📄 Description Claimed in the coordination issue as: PR-CONFLICT-LABEL-LOAD (#14) Depends on: none ### What and why My `needs rebase` labeler from #155 works (112 open pull requests carry the label), but it's flooding the Actions queue. `conflict-label.yml` starts a run on **every push to every pull request** through `pull_request_target`. On this repository, that queued about 265 runs within a day, the oldest since 15:27 UTC. They wait in the same runner queue as `CI` (53 queued, the oldest since 14:41 UTC), `No Game Data` (59) and `Runtime` (29). I'm sorry about that. This PR: - **Drops the `pull_request_target` trigger.** Every run already checks all open pull requests, so the push-to-`main` and hourly runs cover what the per-PR runs did. A rebased pull request now loses the label within the hour instead of right away. - **Puts every run in one concurrency group (`conflict-label`).** At most one run is in progress and one waiting, and a newer push replaces the waiting one. - **Removes the per-PR `--pr` argument from the workflow.** The workflow also no longer has a trigger that gives a fork's pull request a write token. - **Updates `tests/test_pr_conflict_label.py`.** It now checks that no `pull_request` / `pull_request_target` trigger, per-PR group or `--pr` comes back. The tool's docstring and the `CONTRIBUTING.md` line describe the new schedule. **Runs that are already queued** will still run under the old workflow file. Each one is harmless but holds a runner slot. Someone with write access can clear them; the next push to `main`, or the hourly run, re-labels everything: ```sh for s in queued pending; do gh run list -R ubiquitarianism/leonida --workflow conflict-label.yml --status "$s" --limit 1000 \ --json databaseId --jq '.[].databaseId' | xargs -r -n1 gh run cancel -R ubiquitarianism/leonida done ``` ### Tested - `tests/test_pr_conflict_label.py`: OK. Against the workflow on `main` (the old triggers), the new `test_no_run_per_pull_request` fails, as it should. - `tests/test_ci_registration.py`, `tests/test_docs_links.py`, `tests/test_text_write_line_endings.py`: OK. - The workflow YAML parses: triggers `push`, `schedule` and `workflow_dispatch`; concurrency `{group: conflict-label, cancel-in-progress: false}`. GPUs tested: n/a (CI only) AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:20:43 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1282
No description provided.