Repository navigation
feat(conditions): linksIssue for pull requests tied to an issue - #681
Conversation
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_cc65c7f1-9572-4b1b-820b-c5bcb1cc74db) |
PR Summary by QodoAdd linksIssue condition for pull requests tied to issues
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
Code Review by Qodo
1.
|
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 2 advisory finding(s) below merit a look before merge.
Graphify review — findings
Adds a linksIssue condition that passes when a pull request ties itself to an issue — a GitHub closing keyword plus #12/owner/repo#12/an issue URL/a Linear key in the description, or a Linear key in the head branch or title — and reports the first link it finds. keys restricts Linear keys to the listed teams; without it any key counts (upper-case only in the title, so branch text like utf-8 also passes), and since the description comes from the event it costs no API call and won't see sidebar-only links. Marks the condition pull-request-only (failing on issues), and in a stale sweep's exempt.when only the description and title are read since no branch is available.
Worth a look
- linearKey uses unescaped user-supplied keys in RegExp, causing ReDoS/invalid-regex from team keys —
packages/conditions/src/evaluate.ts:168· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- CLOSING closing-reference alternative can match a bare Linear-like key without # or / —
packages/conditions/src/evaluate.ts:178· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 571 functions depend on the 571 functions this change touches.
Health — this change adds coupling hotspots:
- new:
evaluateCondition()— 2 callers, 19 callees - new:
enum— 0 callers, 29 callees - new:
enum— 0 callers, 11 callees
Verification — 571 functions in the blast radius were not formally verified this run (proofs are advisory here).
Health delta baseline: last indexed commit d7b4657 (diverged from this PR's base — delta is approximate).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 571 function(s) in the blast radius were not formally verified this run
· 1 grounded finding(s) anchored inline below; 2 more finding(s) on lines outside this diff (see the check run).
|
smartcloud found 0 error(s), 2 warning(s).
This comment updates itself when you push a fix. |
5fffb7c to
2bc9a79
Compare
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 1 advisory finding(s) below merit a look before merge.
Graphify review — findings
Adds a linksIssue condition that passes when a pull request ties itself to an issue — a GitHub closing keyword plus a reference (#12, owner/repo#12, an issue URL, or a Linear key) in the description, or a Linear key in the head branch or title — and reports the first link it finds. Optional keys restricts Linear keys to the listed teams, matched case-insensitively; without it any key counts, upper-case only in the title, and the description-only read means it costs no API call and sidebar-only links go unseen. Registers it as pull-request-only, so it fails on issues with "only applies to pull requests", and wires it into the schema, exports, and configuration docs.
Worth a look
- Configured Linear keys are interpolated into a regex without escaping —
packages/conditions/src/evaluate.ts:174· Escalate · medium · 2 independent checks- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 571 functions depend on the 571 functions this change touches.
Health — this change adds coupling hotspots:
- new:
evaluateCondition()— 2 callers, 19 callees - new:
enum— 0 callers, 29 callees - new:
enum— 0 callers, 11 callees
Verification — 571 functions in the blast radius were not formally verified this run (proofs are advisory here).
Health delta baseline: last indexed commit d7b4657, 3 commit(s) behind this PR's base.
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 571 function(s) in the blast radius were not formally verified this run
· 1 grounded finding(s) anchored inline below; 2 more finding(s) on lines outside this diff (see the check run).
The merge-base changed after approval.
2bc9a79 to
a88836c
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_4fe67536-224a-42ce-9c26-41b98f42b098) |
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 2 advisory finding(s) below merit a look before merge.
Graphify review — findings
Adds a linksIssue condition that passes when a pull request ties itself to an issue — a closing keyword plus #12, owner/repo#12, an issue URL or a Linear key in the description, or a Linear key in the head branch or title. Closing keywords inside inline spans and fenced code blocks are ignored, an optional keys list restricts matching to named Linear teams (any key otherwise, upper-case-only in the title), and the report names the first link found. It reads only the event payload so it costs no API call, applies to pull requests only, and in a stale sweep's exempt.when sees just the description and title since no branch is available.
Worth a look
- keys joined into regex without escaping enables regex injection / broken pattern —
packages/conditions/src/evaluate.ts· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Inline code stripping misses multi-backtick spans —
packages/conditions/src/evaluate.ts:189· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 571 functions depend on the 571 functions this change touches.
Health — this change adds coupling hotspots:
- new:
evaluateCondition()— 2 callers, 19 callees - new:
enum— 0 callers, 29 callees - new:
enum— 0 callers, 11 callees
Verification — 571 functions in the blast radius were not formally verified this run (proofs are advisory here).
Health delta baseline: last indexed commit 2d3f454 (diverged from this PR's base — delta is approximate).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 571 function(s) in the blast radius were not formally verified this run
· 1 grounded finding(s) anchored inline below; 2 more finding(s) on lines outside this diff (see the check run).
The merge-base changed after approval.
Adds a linksIssue condition. It passes when a pull request's description closes an issue with one of GitHub's closing keywords (#12, owner/repo#12, an issue URL or a Linear key), or its head branch or title carries a Linear key. Optional keys limit Linear keys to the listed teams. The description, branch and title come from the event, so the condition costs no API call. Issues linked only from the sidebar are not seen; that would need a GraphQL lookup per pull request. Signed-off-by: Jonathan Stevens <jonathan@resnovas.com>
a88836c to
f3ecf73
Compare
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_a850a154-3bb5-4291-adb7-f0b8b48521ac) |
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 1 advisory finding(s) below merit a look before merge.
Graphify review — findings
Adds a linksIssue condition that passes when a pull request is tied to an issue: a closing keyword plus reference (#12, owner/repo#12, an issue URL, or a Linear key) in the description, or a Linear key in the head branch or title. Ignores keywords inside inline and fenced code (an unclosed fence runs to end-of-body), and restricts Linear keys to the teams in the optional keys list — without it any key counts, but only in upper case in the title so branch text like utf-8 still matches. Marks the condition pull-request-only (fails on issues), reads solely from the event payload so it costs no API call, and reports the matched link (e.g. closes SMC-55) or links no issue.
Worth a look
- Unescaped Linear team keys are interpolated into a RegExp —
packages/conditions/src/evaluate.ts:168· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 571 functions depend on the 571 functions this change touches.
Health — this change adds coupling hotspots:
- new:
evaluateCondition()— 2 callers, 19 callees - new:
enum— 0 callers, 29 callees - new:
enum— 0 callers, 11 callees
Verification — 571 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 571 function(s) in the blast radius were not formally verified this run
· 1 grounded finding(s) anchored inline below; 2 more finding(s) on lines outside this diff (see the check run).


Adds a linksIssue condition. It passes when a pull request's description
closes an issue with one of GitHub's closing keywords (#12, owner/repo#12,
an issue URL or a Linear key), or its head branch or title carries a Linear
key. Optional keys limit Linear keys to the listed teams.
The description, branch and title come from the event, so the condition
costs no API call. Issues linked only from the sidebar are not seen; that
would need a GraphQL lookup per pull request.
Closes SMC-55
Note
Medium Risk
New condition logic drives convention and policy outcomes; parsing edge cases are tested but could still surprise repos that omit
keysor rely on sidebar-only issue links.Overview
Adds a new
linksIssuepull-request condition so conventions and other rules can require (or forbid) tying a PR to tracked work without extra GitHub API calls.Evaluation uses only the event payload: closing references in the body (GitHub
close/fix/resolvekeywords plus#n, cross-repo refs, issue URLs, or Linear keys), with keywords inside fenced or inline code ignored; otherwise a Linear team key in the head branch or title. Optionalkeysrestricts which Linear teams count and tightens title matching to avoid false positives likeutf-8.linksIssueis registered in the Effect schema, JSON Schema, docs, andPULL_REQUEST_ONLYhandling (issues get “only applies to pull requests”). Reports explain the first match found (description, then branch, then title).Reviewed by Cursor Bugbot for commit f3ecf73. Configure here.