fix(router): use trigger result workItemId for GitHub ack run link#1036
Merged
zbigniewsobiecki merged 2 commits intodevfrom Mar 24, 2026
Merged
fix(router): use trigger result workItemId for GitHub ack run link#1036zbigniewsobiecki merged 2 commits intodevfrom
zbigniewsobiecki merged 2 commits intodevfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The GitHub PR ack comment was linking to /work-items/{project}/{prNumber}
instead of /work-items/{project}/{trelloCardId}, causing "No runs found"
on the dashboard. Use triggerResult.workItemId ?? event.workItemId,
mirroring the existing pattern used for PM-focused agent acks (line 320).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
494b358 to
452b5b0
Compare
The previous test for triggerResult.workItemId run link was a false positive: isPMFocusedAgent leaked 'true' from the preceding test (clearMocks only clears call counts, not implementations), so the function took the PM ack path and called buildWorkItemRunsLink via withRunLink — never exercising the changed lines 334-347. Fix: explicitly reset isPMFocusedAgent to false and mock extractPRNumber so postGitHubPRAck doesn't bail early. Lines 336-347 now confirmed covered. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
/work-items/{project}/{prNumber}(e.g./work-items/cascade/1030) instead of the actual Trello work item IDtriggerResult?.workItemId ?? event.workItemId— the same pattern already used for PM-focused agent acks on line 320Root cause
event.workItemIdis set toString(pr.number)byparseWebhook(). The GitHub PR ack block used this directly, while the PM ack block already correctly preferredtriggerResult.workItemId. One-liner to align them.Test plan
🤖 Generated with Claude Code