fix(ci): the docs gate re-evaluates when eligibility changes without a push - #1874
Conversation
…a push Testing the channel on real PRs today exposed two ways a PR becomes (or stops being) eligible with no new commit, and the gate only listened for commits and labels: * **`edited`** — retargeting the base branch. #1801 was opened against a stale feature branch (`agent/issue-1196-…`), and a `pull_request`/`pull_request_target` run evaluates the *base* branch's workflow file, so retargeting it to `main` changed which definition the PR ran. The gate would not look again until a human re-applied the label by hand — which is what I had to do. * **`unlabeled`** — a maintainer removing `needs-human-review` (or `lessons-only`) is a decision that the PR may proceed. Without this event the gate only ever saw the refusal, never its withdrawal, so "a person has looked and says it is fine" was indistinguishable from "nobody has looked". Both are one line in `types:`, and the test now asserts all three (added, removed, retargeted) rather than just `labeled` — the property is "the gate decides on the current state of the PR", not "the gate runs when a label appears". Signed-off-by: Ikalus1988 <136884451+Ikalus1988@users.noreply.github.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
misakanet-web | ee8fdfd | Commit Preview URL Branch Preview URL |
Sep 19 2026, 01:52 PM |
PR Genius Analysis
Checklist
Anti-Patterns Detected
Suggestions
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found in the successfully analyzed chunks. |
🧾 Audit Report — PR #1874 (ee8fdfd)📊 Quality Score🔏 DCO Audit✅ All commits signed-off. 📏 PR Size
🔐 Secret Scan✅ No hardcoded secrets detected. 📦 Dependency Audit⏭️ Skipped; no Python/JS dependency files changed. 🧪 Test Suite✅ PASS — 54% coverage 📋 Lesson Schema✅ All lessons valid. ⚖️ Verdict✅ All gates passed. Ready for merge. Scope: |
🎉 Merged — Thank you!Your contribution has been merged into main. PR: #1874 — fix(ci): the docs gate re-evaluates when eligibility changes without a push What's next:
Welcome to the MisakaNet contributor community! 🧠 |
|
✅ Merged! Thanks again, @Ikalus1988. fix(ci): the docs gate re-evaluates when eligibility changes without a push (+15 lines, 2 files) Quick question — did any MisakaNet lesson help you this time? No need to reply if nothing comes to mind. ⚡ |
User description
Testing the channel on real PRs today exposed two ways a PR becomes — or stops being — eligible with no
new commit, and the gate only listened for commits and labels.
edited— retargeting the base#1801 was opened against a stale feature branch (
agent/issue-1196-intake-背景-2026-08-212). Apull_request/pull_request_targetrun evaluates the base branch's workflow file, so retargeting itto
mainchanged which definition the PR was even running. The gate did not look again until a humanre-applied the label — which is exactly what I had to do by hand today.
unlabeled— a refusal withdrawnA maintainer removing
needs-human-review(orlessons-only) is a decision that the PR may proceed.Without this event the gate only ever saw the refusal, never its withdrawal, so "a person looked and
says it is fine" was indistinguishable from "nobody has looked".
Change
The test now asserts all three transitions instead of just
labeled: the property is "the gate decideson the current state of the PR", not "the gate runs when a label appears".
Verification
Today's two real runs are the baseline this extends — the same
pull_request_targetjob that producedEnable auto-mergesuccess for #1842 andDocs-only: falsefor #1801. This PR only widens when it isasked to decide.
PR Type
Bug fix, tests
Description
Add
unlabeledandeditedevents to docs gate workflow triggersUpdate tests to assert all three eligibility transitions (labeled, unlabeled, edited)
Cover base-branch retargeting and refusal-label withdrawal cases
Diagram Walkthrough
flowchart LR A["PR opened / synchronized"] --> G["Gate evaluates"] B["Label added (labeled)"] --> G C["Label removed (unlabeled)"] --> G D["Base branch retargeted (edited)"] --> G G --> E{"Eligible?"} E -->|Yes| F["Auto-merge / proceed"] E -->|No| H["Hold / refuse"]File Walkthrough
auto-merge-docs.yml
Extend docs gate triggers for unlabeled and edited events.github/workflows/auto-merge-docs.yml
unlabeledandeditedtopull_request_targettrigger typeswithdrawn)
test_auto_merge_docs.py
Assert all three eligibility transition events in gate testtests/test_auto_merge_docs.py
labeledassertion with a loop overlabeled,unlabeled,edited