This document explains step-by-step using https://github.com/lemeurherve/jira-issues-importer repository checkout to migrate issues from a Jira issue Tracker to a Github repository Issues.
- Read the README at https://github.com/lemeurherve/jira-issues-importer
- git clone https://github.com/lemeurherve/jira-issues-importer
- Export all issues (include open/resolved/closed/etc). as XML.
- If not already, create a Github account for testing of importing issues - this is important, get it right in testing first! Whatever name you call this account will be used on the tickets during import.
- Create a PAT with repo:status and public_repo scope, limit your PAT to expire 30 days.
- Create a new test repository, e.g. 'jira-to-github-issues'
- Ensure 'issues' tab is enabled.
- Edit importer.py (as at time of writing) and add these lines after line 178:
(after this line: issue['key'] = jiraKey)
jira_gh = f"{jiraKey}:{gh_issue_id}\n"
with open('jira-keys-to-github-id.txt', 'a') as f:
f.write(jira_gh)
- Run
python3 main.py
and answer the questions! - Import failed? - Fix the problems! (could be you need to remove a problematic formatted issue in the XML. If so, remember to create that manually later.)
- Import went well? Time to do it on the proper repository. First. give your Github User for importing appropriate rights on this repository. I found that I needed to give 'admin' access for the issues to be imported correctly (setting of labels etc.)
- Ensure your user accepts the Invite
- Ensure 'Issues' tab is enabled on the target repository.
- delete the auto-created
jira-keys-to-github-id.txt
so it is clean for the import proper to populate. - Now run
python3 main.py
again. - Demote your Github user to 'read' or just remove altogether from your target repo.
Below is optional but recommended - Add a comment to all Jira tickets.
- Edit jira-commenter.sh to suit - Ideally copy this outside of the repository, and copy the generated
jira-keys-to-github-id.txt
along with it. - Run
./jira-commenter.sh
- hope all goes well! - Close all your affected Jira Issues that are still open.
- Ask your Jira Admin to remove your component from the Jira instance where the issues were imported from.