You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Detect when a PR (even with no closing-keyword issue link) is likely part of an open GitHub Milestone, and post a bot-comment suggestion — never auto-apply in this phase.
Requirements
New tri-state setting autoProjectMilestoneMatch: "off" | "suggest" | "auto" (default "off"), mirroring the reviewCheckMode tri-state template (migrations/0107_repository_review_check_mode.sql, src/signals/focus-manifest.ts:1042-1057). Only "off"/"suggest" are meaningful until feat(agent): auto-match PRs to open GitHub Projects v2 (suggest-mode) #3184 lands.
List open milestones via GET /repos/{owner}/{repo}/milestones?state=open.
Match PR title/body tokens against milestone titles by reusing the existing collision-detection primitives in src/signals/engine.ts: tokenize (:5301), termOverlap (:5273) — use the same or a stricter threshold than the existing duplicate-PR gate (score >= 0.58 && shared >= 2, :865), since a wrong milestone attach corrupts tracked progress rather than just adding an advisory note.
Also detect a repo-configured branch-name short-code convention (e.g. <code>-<number>-<slug>) as a high-precision secondary signal — this mirrors the convention Linear's own GitHub integration already uses, so it doubles as prep for feat(agent): Linear adapter for project/milestone matching #3186 (Linear adapter).
In "suggest" mode: post a single bot comment naming the matched milestone and confidence; never call the milestone-set API.
Hook alongside the existing linked-issue evidence-gathering step (buildPullRequestAdvisory, src/queue/processors.ts:5239), not inside the hard-rule blocker path (src/review/linked-issue-hard-rules.ts:71,140) — a missed/wrong match must never fail the gate.
Tests: match / no-match / ambiguous-multi-match cases, both branches of the tri-state default fallback.
Expected outcome
Repos that opt in get a visible, non-blocking suggestion comment identifying which open milestone a PR probably belongs to, with zero risk of misfiled tracking data since nothing is auto-applied yet.
Parent epic: #3180
Goal
Detect when a PR (even with no closing-keyword issue link) is likely part of an open GitHub Milestone, and post a bot-comment suggestion — never auto-apply in this phase.
Requirements
autoProjectMilestoneMatch: "off" | "suggest" | "auto"(default"off"), mirroring thereviewCheckModetri-state template (migrations/0107_repository_review_check_mode.sql,src/signals/focus-manifest.ts:1042-1057). Only"off"/"suggest"are meaningful until feat(agent): auto-match PRs to open GitHub Projects v2 (suggest-mode) #3184 lands.GET /repos/{owner}/{repo}/milestones?state=open.src/signals/engine.ts:tokenize(:5301),termOverlap(:5273) — use the same or a stricter threshold than the existing duplicate-PR gate (score >= 0.58 && shared >= 2,:865), since a wrong milestone attach corrupts tracked progress rather than just adding an advisory note.<code>-<number>-<slug>) as a high-precision secondary signal — this mirrors the convention Linear's own GitHub integration already uses, so it doubles as prep for feat(agent): Linear adapter for project/milestone matching #3186 (Linear adapter)."suggest"mode: post a single bot comment naming the matched milestone and confidence; never call the milestone-set API.buildPullRequestAdvisory,src/queue/processors.ts:5239), not inside the hard-rule blocker path (src/review/linked-issue-hard-rules.ts:71,140) — a missed/wrong match must never fail the gate.ProjectTrackerAdapterinterface (new file, e.g.src/integrations/project-tracker-adapter.ts) even though only the GitHub-milestone half is implemented here, so feat(agent): auto-match PRs to open GitHub Projects v2 (suggest-mode) #3184 (Projects v2) and feat(agent): Linear adapter for project/milestone matching #3186 (Linear) slot in without reshaping this code:Deliverables
ProjectTrackerAdapterinterface +GitHubMilestonesAdapter(milestone half only).engine.tstokenize/termOverlap..gittensory.ymlparity + OpenAPI.Expected outcome
Repos that opt in get a visible, non-blocking suggestion comment identifying which open milestone a PR probably belongs to, with zero risk of misfiled tracking data since nothing is auto-applied yet.