Repository navigation
ci(repo): require an issue reference on pull requests - #364
Open
botandbang wants to merge 8 commits into
Open
botandbang wants to merge 8 commits into
botandbang wants to merge 8 commits into
Conversation
# Conflicts: # .github/NEW_PROJECT.md # .github/rulesets/protect-main.json # tools/policy/workflows.rego
bnb
previously approved these changes
Nov 1, 2026
Coverage Report for apps/web
File CoverageNo changed files found.SizeCompared with main. KiB are 1,024 bytes.
|
Coverage Report for apps/localtoolbox
File CoverageNo changed files found.SizeCompared with main. KiB are 1,024 bytes.
|
bnb
approved these changes
Nov 7, 2026
This branch has not been deployed
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 and why
Adds
.github/workflows/pr-issue.yml, which fails a pull request unless its description names an issue (a Linear identifier, a#number or the issue's URL), its branch isbnb/loc-<number>-..., or it has the newno-issuelabel. Bot pull requests are skipped, and template hints in HTML comments don't count. It runs again when the description, labels or commits change, and on merge queue groups, where it passes at once because each pull request in the group already passed. Its passed job fails when the issue job fails, or is skipped for any reason other than a merge queue group, a bot or theno-issuelabel.Adds
PR issue passedto the Protect Main ruleset, which an admin applies withtools/ruleset.sh applyafter merge. Until then the check isn't required, and the Repo checks workflow fails onmain. Exempts the workflow from the policy'schangesjob rule, with a test, and adds theno-issuelabel. Updates CONTRIBUTING, the pull request template and NEW_PROJECT.Adds
tools/policy/pr-issue.test.ts, which runs the workflow's step against descriptions and branches, andyamlas a root dev dependency to read the workflow.How it was tested
tools/policy.shpasses (88 policy tests, 52 conftest checks). Removing the exemption fails its test, and removingmerge_groupfails the ruleset policy.actionlintandzizmorpass.pnpm test:toolspasses (740 tests, coverage thresholds met), with 16 cases for the check covering each kind of reference, the unedited template, references inside comments, other repositories' issues, pull request URLs and branch names. Each of these breaks at least one case: dropping#numbers, droppingnocasematch, not stripping comments, dropping the word boundary, dropping the branch match, and accepting pull request URLs.This pull request has the
no-issuelabel, so its own run passes.Checklist
docs/and--helpstill say what the code does