ci: run tests on dev PRs and stop the quality gate crashing on forks#280
Merged
Conversation
CI only triggered on pushes and PRs targeting main, but dev is the working branch. Every dev-targeted PR merged without lint or the 3.11/3.12/3.13 test matrix ever running, so green checks proved nothing. Add dev to both triggers in ci.yml. The quality gate also 403-crashed on PRs from forks: fork PRs get a read-only GITHUB_TOKEN, so the addLabels call threw and the whole check reported failure for the wrong reason. Wrap the label and comment writes so the gate reports its verdict through the run summary instead of crashing, and keep the pass/fail behavior otherwise unchanged.
Issues (must fix)
Heads up
Please update your PR to address these points. |
Turning on lint for dev PRs exposed debt that had never been checked: - F811: the 'note' command's function was named observe_cmd, colliding with the 'observe' command's function of the same name. Both commands register fine (Click keys on the decorator, not the function name), so this is a rename to note_cmd with no behavior change. - I001 / ruff format: import ordering and formatting on six test files. Pure lint cleanup, no logic changes.
This was referenced Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two fixes to the GitHub Actions setup, both surfaced while reviewing the open community PRs (#268, #274, #276).
1. Run CI on PRs targeting
dev.ci.ymlonly triggered on pushes and PRs tomain, butdevis the working branch. Every dev-targeted PR was merging without ruff or the 3.11/3.12/3.13 pytest matrix ever running, so a green tick on those PRs proved nothing. This addsdevto both thepushandpull_requesttriggers.2. Stop the quality gate crashing on fork PRs. PRs from forks run with a read-only
GITHUB_TOKENregardless of the workflow'spermissions:block, soissues.addLabelsreturned 403 and the wholecheck-qualitystep failed for the wrong reason (it read as a real quality failure). The label and comment writes are now wrapped so a read-only token is handled gracefully: the gate still reports its verdict through the run summary and an annotation, and same-repo PR behavior is unchanged.Why now
Three fork PRs are open right now (Siddhant's #268/#274/#276). On each, the only checks that ran were this gate (which crashed) and the security scan. Lint and tests never ran at all. That is a blind spot at exactly the moment we're merging outside contributions.
Testing
github-scriptJS passesnode --check.CI on this PR is itself the live proof of fix 1: with
devadded to the trigger, the lint and test matrix should now run on this dev-targeted PR (it would not have before).Not touched
The gate stays non-blocking (it comments and warns; it does not fail the check on hygiene issues). Whether it should hard-fail is a separate policy call, left out of this PR.
Follow-on: pre-existing lint debt
Turning the gate on immediately surfaced ruff debt that had never been checked on
dev(which is the whole point). A second commit clears it so the gate actually passes:F811: thenotecommand's function was namedobserve_cmd, colliding with theobservecommand's function of the same name. Both commands register correctly (Click keys on the decorator, not the Python name), so this is a rename tonote_cmdwith no behavior change.ruff format/I001: import ordering and formatting on six test files.No logic changes in that commit. Verified locally:
ruff check .andruff format --check .both clean, and the 3.11/3.12/3.13 test matrix passes.