A command-line tool to transfer issues between GitHub repositories, preserving labels and maintaining parent-child relationships.
- Transfer single or multiple issues between repositories
- Preserve issue labels
- Maintain parent-child relationships between issues
- Support for both open and closed issues
- Automatic label creation in target repository
-
Node.js and npm
- Install from nodejs.org
-
GitHub CLI
- Install GitHub CLI following the official instructions
- Authenticate with GitHub:
gh auth login
- Follow the interactive prompts:
- Select "GitHub.com"
- Select "HTTPS"
- Select "Y" for authentication with your GitHub credentials
- Choose your preferred authentication method (browser or token)
-
Clone the repository:
git clone https://github.com/yourusername/github-issue-transporter.git cd github-issue-transporter -
Install dependencies:
npm install
The basic command structure is:
node index.ts -- transfer <owner> <source-repo> <target-repo>owner: GitHub username or organization namesource-repo: Name of the repository containing the issuestarget-repo: Name of the repository to transfer issues to
-a, --all: Transfer all issues (both open and closed). Without this flag, only open issues are transferred.
-
Transfer only open issues:
npm start transfer octocat source-repo target-repo
-
Transfer all issues (open and closed):
npm start transfer octocat source-repo target-repo --all
- Both source and target repositories must be accessible to your GitHub account
- The GitHub CLI (
gh) must be authenticated with appropriate permissions - Labels will be automatically created in the target repository if they don't exist
- Parent-child relationships are preserved by transferring child issues first
- A brief delay is added between transfers to ensure GitHub API stability
-
Authentication Issues
- Ensure you're logged in to GitHub CLI:
gh auth status
- If not authenticated, run:
gh auth login
- Ensure you're logged in to GitHub CLI:
-
Permission Issues
- Verify you have write access to both repositories
- Check your token permissions include repo access
-
Rate Limiting
- If you hit rate limits, wait a few minutes before retrying
- Consider using a Personal Access Token with higher rate limits
MIT
Contributions are welcome! Please feel free to submit a Pull Request.