feat: sync GitHub PR links to Jira Git Pull Request field#48
Open
evwilkin wants to merge 2 commits into
Open
Conversation
Populates customfield_10875 ("Git Pull Request") on synced Jira issues
with URLs of PRs that close/reference each GitHub issue, so users can
navigate directly from Jira to a PR without clicking through GitHub.
- Add closedByPullRequestsReferences to all GraphQL queries
- Set customfield_10875 as ADF on create and update
- Skip field write when PR links unchanged between syncs
- Fetch customfield_10875 in open-issues query for comparison
- Add tests covering ADF structure, no-PR omission, missing field
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two improvements to the Git Pull Request field sync (customfield_10875): 1. PR-driven sync: fetch recently-updated PRs per repo and update Jira issues they close, catching cases where a linked issue's updatedAt is not bumped when a PR is opened against it. 2. inlineCard ADF nodes: write PR URLs as Jira smart-link chips instead of plain text, so the field renders with title, status badge, and hover card without any manual interaction. Also adds extractTextFromADF support for inlineCard nodes so the change- detection comparison in updateJiraIssue stays stable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
@nicolethoen this covers a request from Eric to add PR links to the Jira issues, and uses the existing "Git Pull Request" field in the Jira issue to capture this. Requesting you here for any feedback before adding this feature. Quick summary, in addition to checking recently-updated Github & Jira issues we now also check recently-updated PRs from Github; unfortunately linking a PR to an issue in Github doesn't cause that issue to be flagged as recently updated so this is an entirely new check & API endpoint we're hitting. |
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
closedByPullRequestsReferencesfrom GitHub GraphQL for all issues and sub-issuescustomfield_10875("Git Pull Request") as ADF with PR URLs, one per lineCloses #47
Screenshot of what implementation looks like, using this PR to update the Jira for the original Github issue #47:

Test plan
npm testpasses (135 tests)customfield_10875populated in Jira🤖 Assisted by Claude Code