Skip to content

feat(pm): replace PR comment links with native attachments/remote links#498

Merged
zbigniewsobiecki merged 1 commit intodevfrom
feature/pr-link-attachments
Feb 23, 2026
Merged

feat(pm): replace PR comment links with native attachments/remote links#498
zbigniewsobiecki merged 1 commit intodevfrom
feature/pr-link-attachments

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Feb 23, 2026

Summary

  • Replace comment-based PR links with native attachments/remote links — Trello cards now get URL attachments (sidebar links) and JIRA issues get remote links (Links section with GitHub icon) when a PR is created
  • Comment as fallback onlyPR created: <url> comment is posted only if linkPR fails
  • New linkPR abstraction added to PMProvider interface so each provider uses its optimal API
  • JIRA addRemoteLink — Leverages jira.js v5's issueRemoteLinks.createOrUpdateRemoteIssueLink() with PR URL as globalId for idempotency
  • Full test coverage — lifecycle tests, adapter tests, and JIRA client tests

Card: https://trello.com/c/ZceuaSMm/84-lets-research-and-plan-how-we-can-cleanly-attach-pr-links-probably-as-attachments-to-trello-cards-jira-issues-when-creating-a-pr

Test plan

  • All unit tests passing (2706 tests)
  • TypeScript type checking passes
  • Linting passes
  • linkPR called on implementation success with prUrl
  • linkPR not called when no prUrl or for non-implementation agents
  • linkPR success → no comment posted
  • linkPR failure → comment fallback fires (with and without progressCommentId)
  • JIRA addRemoteLink calls jira.js with correct params (globalId = PR URL, relationship = "Pull Request", GitHub favicon icon)
  • Trello linkPR delegates to trelloClient.addAttachment
  • JIRA linkPR delegates to jiraClient.addRemoteLink

🤖 Generated with Claude Code

@nhopeatall
Copy link
Copy Markdown
Collaborator

🔍 Reviewing PR...

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — Clean abstraction that replaces comment-based PR links with native provider attachments/remote links, with a well-designed comment fallback.

The implementation is correct:

  • linkPR added to PMProvider interface with both adapters implementing it appropriately (JIRA → remote links, Trello → URL attachments)
  • JIRA leverages createOrUpdateRemoteIssueLink with globalId = prUrl for idempotency — nice touch
  • Fallback logic correctly handles: linkPR failure → comment with/without progressCommentId → addComment as last resort
  • extractPRTitle is simple and handles edge cases (trailing paths, non-GitHub URLs)
  • Test coverage is thorough across all paths including cascading failures

@zbigniewsobiecki zbigniewsobiecki merged commit ed23001 into dev Feb 23, 2026
5 checks passed
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.

3 participants