Handle GitHub issues transferred between repositories (RDT-1268) (SRV-176)#118
Draft
Handle GitHub issues transferred between repositories (RDT-1268) (SRV-176)#118
Conversation
Agent-Logs-Url: https://github.com/espressif/sync-jira-actions/sessions/d4012bf9-701e-4724-9b5b-3cb46e05efdf Co-authored-by: kumekay <2738+kumekay@users.noreply.github.com>
Agent-Logs-Url: https://github.com/espressif/sync-jira-actions/sessions/d4012bf9-701e-4724-9b5b-3cb46e05efdf Co-authored-by: kumekay <2738+kumekay@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Handle issues transferred between projects
Handle GitHub issues transferred between repositories (RDT-1268)
Mar 27, 2026
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.
When a GitHub issue is transferred between repos, both the source and destination sync actions run independently—resulting in two Jira issues for the same GitHub issue, with both keys appended to the title (e.g.,
Title (IEP-123) (IDFGH-456)).Changes
sync_issue.py— newhandle_issue_transferred()Handles the
issues:transferredwebhook event fired in the source repo:globalIdto the new GitHub URL so the destination repo's sync action can find it by URL lookup (preventing duplicate creation in the happy path)sync_issue.py— modified_find_jira_issue()Adds a transfer detection fallback for the destination repo to handle the race condition where
openedfires before the source repo'stransferredhandler has run:When no Jira issue is found by URL, and the GitHub title contains a Jira key (e.g.,
(IEP-123)), the existing manual-sync logic already checks ifIEP-123exists. This now also checks if that issue has asynced fromremote link starting withhttps://github.com/—indicating a previously synced issue from another repo. If detected, the remote link is updated to the new URL and the existing issue is returned, skipping creation.sync_to_jira.pyRegisters
handle_issue_transferredunder theissues:transferredaction in the dispatch table.Tests
Six new tests covering: remote link update, graceful no-ops for missing Jira issue or missing
new_issuepayload, transfer detection in_find_jira_issue, duplicate prevention inhandle_issue_opened, and routing of thetransferredevent.⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.