Skip to content

fix: move all linked issues on PR merge (multi-issue + Task List) - #70

Merged
rlch merged 1 commit into
mainfrom
fix-multi-issue-status
Jul 24, 2026
Merged

fix: move all linked issues on PR merge (multi-issue + Task List)#70
rlch merged 1 commit into
mainfrom
fix-multi-issue-status

Conversation

@vatsalpatel

Copy link
Copy Markdown
Contributor

Fixes: a PR linked to multiple issues only moved the first one on merge — the rest had to be moved by hand.

Notion issue: https://app.notion.com/p/tutero/Notion-issue-status-does-not-update-when-multiple-issues-are-linked-3a7bfd2f80ba80b08aaed61603adab8b

The bug

run() resolved only the first linked issue (issueIdFromRow → rel[0]) and read only the 🐛 Tech Issues relation. A PR fixing N issues advanced issue #1 and silently left the others. Reproduced on tutoring-app#1451, whose PR row links 2 Tech Issues — the second ("Simple Change to SUFS invoices…") was skipped.

The fix — src/config.ts, src/run.ts

  • resolveIssues() — read every linked issue across both relations (🐛 Tech Issues, ✅ Task List).
  • Per-issue gate — on merge, advance an issue only when all of that issue's own PRs are Merged/Closed. (PR A → issues 1 & 2, where issue 1 also has PR B: merging A moves issue 2 but holds issue 1 until B merges too.)
  • Per-database status — Tech Issues merge → For QA; Task List merge → Ready For Review (Task List has no "For QA").

Verified

  • Unit: resolveIssues returns all issues across both relations with per-DB status (__tests__/resolve.test.ts).
  • E2E against the compiled dist/: PR A (→ 2 issues) + PR B (→ issue 1). Merging A → issue 2 For QA, issue 1 held (B open); merging B → issue 1 For QA.

🤖 Generated with Claude Code

The action only moved the first issue linked to a PR (rel[0]) and read only the
Tech Issues relation, so a PR fixing multiple issues left the rest stuck.

- resolveIssues(): read every linked issue across the Tech Issues + Task List relations
- per-issue gate: advance an issue only when all of its own PRs are merged/closed
- per-database status names (Tech Issues -> For QA, Task List -> Ready For Review)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011L6fsCh8SQW8eHvQWJAcZz
@vatsalpatel
vatsalpatel marked this pull request as ready for review July 24, 2026 06:40
@rlch
rlch merged commit 9aa463f into main Jul 24, 2026
3 of 5 checks passed
@rlch
rlch deleted the fix-multi-issue-status branch July 24, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants