-
Notifications
You must be signed in to change notification settings - Fork 61
feat: add discussions-migration script #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📋 Lint Results⚡ ./gh-cli scripts
🔧 ./scripts scripts
Lint results updated at Mon Oct 6 18:32:53 UTC 2025 |
aff2b2f
to
3ec48ef
Compare
3ec48ef
to
a78ebd6
Compare
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…r copy-discussions.js" This reverts commit ee1e0cc.
c9f87e0
to
eb3f21a
Compare
… and request limits
…manual retry logic
3d5c516
to
6ea6480
Compare
…limit recommendations
…-discussions - Move script to migrate-discussions/ subdirectory structure - Rename from copy-discussions.js to migrate-discussions.js - Update documentation to reflect migration terminology - Add package.json with octokit dependency - Enhance README with rate limiting and resume features - Update .gitignore to allow nested package.json files
3dd8235
to
39d34ea
Compare
…ify token recommendations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a comprehensive Node.js script for migrating GitHub Discussions between repositories across different GitHub instances. The script supports cross-enterprise migrations with automatic rate limit handling, resume capabilities, and preserves discussion content including comments, reactions, polls, and metadata.
Key changes:
- Adds a complete discussions migration solution with Node.js implementation
- Includes comprehensive rate limiting and retry logic with Octokit throttling
- Supports resume functionality and cross-instance migrations
Reviewed Changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 8 comments.
File | Description |
---|---|
scripts/migrate-discussions/package.json | Package configuration for the Node.js migration script with Octokit dependency |
scripts/migrate-discussions/migrate-discussions.js | Main migration script with GraphQL queries, rate limiting, and comprehensive discussion copying logic |
scripts/migrate-discussions/README.md | Detailed documentation covering usage, features, configuration options, and examples |
scripts/README.md | Updated main scripts README to reference the new migrate-discussions script |
Files not reviewed (1)
- scripts/migrate-discussions/package-lock.json: Language not supported
Creating script to copy/migrate discussions between GitHub orgs/repos. Started with a
shell
script, so including that for now, but ultimately because it's so long/complex, moving tonode
.TODO
const
if you want to or not copy the poll results as mermaid--help
with(don't want to take another dependency withyargs
yargs
)Retry-After
) and remove manual retry logicNOTES
Usage
For right now, have both Bash and Node.
Example
Final output
SOURCE
Discussion list (note locked and closed translate):

Discussion with comments and child comments:

Discussion with answer:

Discussion with reactions:

Discussion with poll:

TARGET
Discussion list (note locked and closed translate):

Discussion with comments and child comments:

Discussion with answer:

Discussion with reactions:

Discussion with poll:
