Repo for migrating Jiras to GitHub issues. This is specialized to use by the Apache Beam repo, but it can probably be adapted to other use cases relatively painlessly.
To use the tool:
- Clone this repo:
git clone https://github.com/damccorm/jira-to-issues && cd jira-to-issues
- Update the target owner/repo in shared/github.ts to point to your organization/repo where you want the issues created.
- Update the jira link in shared/jira.ts to generate a csv containing issues you would like migrated. Right now, it is set to migrate open issues in the Beam Jira.
- Update the jira link in shared/github.ts to point to the Jira board you would like migrated and the GitHub repo you are migrating to. Right now it is set to Beam's Jira and Issues.
- In shared/translate.ts, update the list of valid labels you'd like migrated, the mapping of existing labels/components to label names, the mapping of jira handles to github handles, and the list of valid assignees (people who either have triage access or more to the repo or who have previously interacted with issues in the repo. All other handles will be silently ignored by GitHub as part of their spam prevention).
- Create a PAT with repo/issue access to your target repo. This can be done from https://github.com/settings/tokens/new
- Set your token in an environment variable
GITHUB_TOKEN
:export GITHUB_TOKEN=<PAT>
- Set your JIRA username in an environment variable
JIRA_USERNAME
:export JIRA_USERNAME=<username>
- Set your JIRA password in an environment variable
JIRA_PASSWORD
:export JIRA_PASSWORD=<password>
- Run
npm install
- Run
npm run exec
As long as you use the existing repo that you've cloned, the exec
operation is resumable. So if you run into any issues during migration (e.g. your computer randomly restarts), you can resume the migration by running npm run exec
again without risking duplicate issues.