add checkout:pr npm script and update documentation usage

This commit is contained in:
Nacho Codoñer
2026-03-30 14:17:57 +02:00
parent 8f8ed8ccb4
commit 7ec1dd5948
3 changed files with 7 additions and 6 deletions

View File

@@ -58,7 +58,7 @@ Current Reviewers:
To quickly check out a PR branch from a fork for local testing, see the [Testing a fork branch](DEVELOPMENT.md#testing-a-fork-branch) section in `DEVELOPMENT.md`, or run:
```sh
node scripts/checkout-pr.js https://github.com/meteor/meteor/pull/<PR-number>
npm run checkout:pr -- https://github.com/meteor/meteor/pull/<PR-number>
```
#### Core Committer

View File

@@ -70,13 +70,13 @@ When reviewing a pull request or testing changes from a contributor's fork, use
```sh
# From a PR URL (requires gh CLI or falls back to GitHub API via curl)
$ node scripts/checkout-pr.js https://github.com/meteor/meteor/pull/<PR-number>
$ npm run checkout:pr -- https://github.com/meteor/meteor/pull/<PR-number>
# From a user:branch shorthand
$ node scripts/checkout-pr.js <user>:<branch>
$ npm run checkout:pr -- <user>:<branch>
# From a full fork repo URL and branch name
$ node scripts/checkout-pr.js <fork-repo-url> <branch>
# From a full fork repo URL and branch name (HTTPS or SSH)
$ npm run checkout:pr -- <fork-repo-url> <branch>
```
The script will:

View File

@@ -39,7 +39,8 @@
"test:unit": "cd tools/unit-tests && npm test",
"test:idle-bot": "node --test .github/scripts/__tests__/inactive-issues.test.js",
"install:e2e": "cd tools/modern-tests && npm install && npx playwright install --with-deps chromium chromium-headless-shell",
"test:e2e": "cd tools/modern-tests && npm test -- "
"test:e2e": "cd tools/modern-tests && npm test -- ",
"checkout:pr": "node scripts/checkout-pr.js"
},
"jshintConfig": {
"esversion": 11