Skip to content

Commit

Permalink
chore(main): change references to the master branch to main (#638)
Browse files Browse the repository at this point in the history
  • Loading branch information
joyeecheung committed Jun 20, 2022
1 parent 6735a5d commit 14c4627
Show file tree
Hide file tree
Showing 27 changed files with 81 additions and 80 deletions.
8 changes: 4 additions & 4 deletions components/git/backport.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ const epilogue = `====================== Example =======================
Demo: https://asciinema.org/a/221244
Backporting https://github.com/nodejs/node/pull/24816 to v11.x
# Sync master with upstream for the commits, if they are not yet there
$ git checkout master
$ ncu-config set branch master
# Sync main with upstream for the commits, if they are not yet there
$ git checkout main
$ ncu-config set branch main
$ git node sync
# Backport existing commits from master to v11.x-staging
# Backport existing commits from main to v11.x-staging
$ git checkout v11.x-staging
$ ncu-config set branch v11.x-staging
$ git node sync
Expand Down
4 changes: 2 additions & 2 deletions components/git/epilogue.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ $ cd path/to/node/project
# If you have not configured it before
$ ncu-config set upstream <name-of-remote-to-nodejs/node>
$ ncu-config set branch master # Assuming you are landing commits on master
$ ncu-config set branch main # Assuming you are landing commits on main
$ git checkout master
$ git checkout main
$ git node land --abort # Abort a landing session, just in case
$ git node land $PRID # Start a new landing session
$ git node land $URL # Start a new landing session using the PR URL
Expand Down
65 changes: 33 additions & 32 deletions docs/git-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,29 @@
A custom Git command for managing pull requests. You can run it as
`git-node` or `git node`. To see the help text, run `git node`.

- [`git node land`](#git-node-land)
- [Prerequisites](#git-node-land-prerequisites)
- [Git bash for Windows](#git-bash-for-windows)
- [Demo & Usage](#demo--usage)
- [Optional Settings](#git-node-land-optional-settings)
- [`git node backport`](#git-node-backport)
- [Example](#example)
- [`git node release`](#git-node-release)
- [Example](#example-1)
- [`git node sync`](#git-node-sync)
- [`git node metadata`](#git-node-metadata)
- [Optional Settings](#git-node-metadata-optional-settings)
- [`git node v8`](#git-node-v8)
- [Prerequisites](#git-node-v8-prerequisites)
- [`git node v8 major`](#git-node-v8-major)
- [`git node v8 minor`](#git-node-v8-minor)
- [`git node v8 backport <sha..>`](#git-node-v8-backport-sha)
- [General options](#general-options)
- [`git node status`](#git-node-status)
- [Example](#example)
- [`git node wpt`](#git-node-wpt)
- [Example](#example-2)
- [git-node](#git-node)
- [`git node land`](#git-node-land)
- [Prerequisites](#prerequisites)
- [Git bash for Windows](#git-bash-for-windows)
- [Demo & Usage](#demo--usage)
- [Optional Settings](#optional-settings)
- [`git node backport`](#git-node-backport)
- [Example](#example)
- [`git node release`](#git-node-release)
- [Example](#example-1)
- [`git node sync`](#git-node-sync)
- [`git node metadata`](#git-node-metadata)
- [Optional Settings](#optional-settings-1)
- [`git node v8`](#git-node-v8)
- [Prerequisites](#prerequisites-1)
- [`git node v8 major`](#git-node-v8-major)
- [`git node v8 minor`](#git-node-v8-minor)
- [`git node v8 backport <sha..>`](#git-node-v8-backport-sha)
- [General options](#general-options)
- [`git node status`](#git-node-status)
- [Example](#example-2)
- [`git node wpt`](#git-node-wpt)
- [Example](#example-3)

## `git node land`

Expand Down Expand Up @@ -93,8 +94,8 @@ Examples:
# Tell ncu that your upstream remote is named "upstream"
$ ncu-config set upstream upstream
# Tell ncu that you are landing patches to "master" branch
$ ncu-config set branch master
# Tell ncu that you are landing patches to "main" branch
$ ncu-config set branch main
```

Note: If you are behind a firewall and run into `ECONNREFUSED` issues with
Expand Down Expand Up @@ -130,9 +131,9 @@ $ cd path/to/node/project
# If you have not configured it before
$ ncu-config set upstream <name-of-remote-to-nodejs/node>
$ ncu-config set branch master # Assuming you are landing commits on master
$ ncu-config set branch main # Assuming you are landing commits on main
$ git checkout master
$ git checkout main
$ git node land --abort # Abort a landing session, just in case
$ git node land $PRID # Start a new landing session
$ git node land $URL # Start a new landing session using the PR URL
Expand Down Expand Up @@ -192,11 +193,11 @@ Options:
```
Backporting https://github.com/nodejs/node/pull/12344 to v10.x
# Sync master with upstream for the commits, if they are not yet there
$ git checkout master
# Sync main with upstream for the commits, if they are not yet there
$ git checkout main
$ git node sync
# Backport existing commits from master to v10.x-staging
# Backport existing commits from main to v10.x-staging
$ git checkout v10.x-staging
$ git node sync
$ git node backport 12344 --to 10
Expand Down Expand Up @@ -397,14 +398,14 @@ Return status and information about the current git-node land session. Shows the
### Example

```sh
node on git:master ❯ git node status 11:32AM
node on git:main ❯ git node status 11:32AM
✔ Landing session in progress
--------------------------------------------------------------------------------
PR: https:/github.com/nodejs/node/pull/34800
State: AMENDING
Username: codebytere
Upstream: upstream
Branch: master
Branch: main
```

## `git node wpt`
Expand Down Expand Up @@ -441,4 +442,4 @@ $ git node wpt url # Will update test/fixtures/wpt/url and related files
$ git node wpt url --commit=43feb7f612fe9160639e09a47933a29834904d69
```

[node.js abi version registry]: https://github.com/nodejs/node/blob/master/doc/abi_version_registry.json
[node.js abi version registry]: https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
20 changes: 10 additions & 10 deletions docs/ncu-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Options:
Examples:

```sh
node on git:master ❯ ncu-ci rate pr
node on git:main ❯ ncu-ci rate pr
--------------------------------------------------------------------------------
[1/1] Running health
--------------------------------------------------------------------------------
Expand All @@ -53,7 +53,7 @@ node on git:master ❯ ncu-ci rate pr
```

```sh
node on git:master ❯ ncu-ci rate commit
node on git:main ❯ ncu-ci rate commit
--------------------------------------------------------------------------------
[1/1] Running health
--------------------------------------------------------------------------------
Expand All @@ -69,7 +69,7 @@ node on git:master ❯ ncu-ci rate commit

Example:
```sh
node on git:master ❯ ncu-ci walk commit
node on git:main ❯ ncu-ci walk commit
✔ Done--------------------------------------------------------------------------------
[1/60] Running health
--------------------------------------------------------------------------------
Expand Down Expand Up @@ -133,7 +133,7 @@ For example, if you would like to see the results of `node-test-pull-request` fo

Example:
```sh
node on git:master ❯ ncu-ci pr 32158
node on git:main ❯ ncu-ci pr 32158
--------------------------------------------------------------------------------
[1/1] Running PR: 32158
--------------------------------------------------------------------------------
Expand All @@ -157,7 +157,7 @@ For example, if you would like to see the results of `node-test-commit` for http

Example:
```sh
node on git:master ❯ ncu-ci commit 39377
node on git:main ❯ ncu-ci commit 39377
--------------------------------------------------------------------------------
[1/1] Running COMMIT: 39377
--------------------------------------------------------------------------------
Expand All @@ -180,7 +180,7 @@ Unstable https://ci.nodejs.org/job/node-test-commit-arm-fanned/15148/

Example:
```sh
node on git:master ❯ ncu-ci url https://github.com/nodejs/node/pull/34127
node on git:main ❯ ncu-ci url https://github.com/nodejs/node/pull/34127
--------------------------------------------------------------------------------
[1/1] Running PR: 32158
--------------------------------------------------------------------------------
Expand All @@ -202,7 +202,7 @@ Unstable https://ci.nodejs.org/job/node-test-commit-arm-fanned/15155/

Example:
```sh
node on git:master ❯ ncu-ci benchmark 636
node on git:main ❯ ncu-ci benchmark 636
--------------------------------------------------------------------------------
[1/1] Running BENCHMARK: 636
--------------------------------------------------------------------------------
Expand Down Expand Up @@ -237,7 +237,7 @@ Finished: SUCCESS
Example:
```
node on git:master ❯ ncu-ci citgm 2400
node on git:main ❯ ncu-ci citgm 2400
--------------------------------------------------------------------------------
[1/1] Running CITGM: 2400
--------------------------------------------------------------------------------
Expand Down Expand Up @@ -316,7 +316,7 @@ FAILURE: 5 failures in 2390 not present in 2392
`ncu-ci daily` show recent results of `node-daily-master`. You can also aggregate the results by passing `--cache`, or limit the maximum number of CIs jobs to get data from with `--limit=N`. See `ncu-ci daily --help` for more.
```sh
node on git:master ❯ ncu-ci daily
node on git:main ❯ ncu-ci daily
✔ Done--------------------------------------------------------------------------------
[1/16] Running health
--------------------------------------------------------------------------------
Expand All @@ -333,7 +333,7 @@ node on git:master ❯ ncu-ci daily
----------------------------------- Summary ------------------------------------
Result FAILURE
URL https://ci.nodejs.org/job/node-test-commit/39692/
Source https://api.github.com/repos/nodejs/node/git/refs/heads/master
Source https://api.github.com/repos/nodejs/node/git/refs/heads/main
Commit [bf0d82c10247] test: remove common.localhostIPv6
Date 2020-07-16 16:57:30 -0700
Author Rich Trott <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions lib/backport_session.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ export default class BackportSession extends Session {
// TODO(joyeechuneg): add more warnings
const { prid } = this;
const url = getPrURL(this);
cli.log(`Looking for commits of ${url} on master...`);
cli.log(`Looking for commits of ${url} on main...`);

const commits = this.getCommitsFromBranch(prid, 'master');
const commits = this.getCommitsFromBranch(prid, 'main');

if (commits.length === 0) {
cli.error('Could not find any commit matching the PR');
Expand Down
2 changes: 1 addition & 1 deletion lib/collaborators.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export async function getCollaborators(cli, request, argv) {

function parseCollaborators(readme, cli) {
// This is more or less taken from
// https://github.com/rvagg/archived-iojs-tools/blob/master/pr-metadata/pr-metadata.js
// https://github.com/rvagg/archived-iojs-tools/blob/main/pr-metadata/pr-metadata.js
const collaborators = new Map();
let m;

Expand Down
2 changes: 1 addition & 1 deletion lib/prepare_release.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ export default class ReleasePreparation {
'baking-for-lts'
];

let comparisonBranch = 'master';
let comparisonBranch = 'main';
const isSemverMinor = versionComponents.patch === 0;
if (isLTS) {
// Assume Current branch matches tag with highest semver value.
Expand Down
4 changes: 2 additions & 2 deletions lib/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ export default class Session {
cli.separator();
cli.info(
'For example, if your want to land commits on the ' +
'`master` branch, you can run:\n\n' +
' $ ncu-config set branch master');
'`main` branch, you can run:\n\n' +
' $ ncu-config set branch main');
cli.separator();
cli.setExitCode(1);
}
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/closed_pr.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
]
},
"title": "testing: do not merge",
"baseRefName": "master",
"baseRefName": "main",
"headRefName": "awesome-changes",
"closed": true,
"closedAt": "2017-10-28T11:13:43Z",
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/code_and_learn_pr.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
]
},
"title": "test: awesome changes",
"baseRefName": "master",
"baseRefName": "main",
"headRefName": "awesome-changes"
}
2 changes: 1 addition & 1 deletion test/fixtures/conflicting_pr.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
]
},
"title": "test: This PR has conflicts",
"baseRefName": "master",
"baseRefName": "main",
"headRefName": "pr-conflicts",
"mergeable": "CONFLICTING"
}
2 changes: 1 addition & 1 deletion test/fixtures/empty_profile_pr.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
]
},
"title": "doc: fix mdn links",
"baseRefName": "master",
"baseRefName": "main",
"headRefName": "fix-links"
}
2 changes: 1 addition & 1 deletion test/fixtures/first_timer_pr.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
]
},
"title": "test: awesome changes",
"baseRefName": "master",
"baseRefName": "main",
"headRefName": "awesome-changes"
}
2 changes: 1 addition & 1 deletion test/fixtures/first_timer_pr_with_private_email.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
]
},
"title": "test: awesome changes",
"baseRefName": "master",
"baseRefName": "main",
"headRefName": "awesome-changes"
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ RUNS not set (ok)
MACHINE_THREADS not set (ok), default is: 88
Cloning into 'node'...
Checking out files: 42% (11166/26057) Checking out files: 43% (11205/26057) Checking out files: 44% (11466/26057) Checking out files: 45% (11726/26057) Checking out files: 46% (11987/26057) Checking out files: 47% (12247/26057) Checking out files: 48% (12508/26057) Checking out files: 49% (12768/26057) Checking out files: 50% (13029/26057) Checking out files: 51% (13290/26057) Checking out files: 52% (13550/26057) Checking out files: 53% (13811/26057) Checking out files: 54% (14071/26057) Checking out files: 55% (14332/26057) Checking out files: 56% (14592/26057) Checking out files: 57% (14853/26057) Checking out files: 58% (15114/26057) Checking out files: 59% (15374/26057) Checking out files: 60% (15635/26057) Checking out files: 61% (15895/26057) Checking out files: 62% (16156/26057) Checking out files: 63% (16416/26057) Checking out files: 64% (16677/26057) Checking out files: 65% (16938/26057) Checking out files: 66% (17198/26057) Checking out files: 67% (17459/26057) Checking out files: 68% (17719/26057) Checking out files: 69% (17980/26057) Checking out files: 70% (18240/26057) Checking out files: 71% (18501/26057) Checking out files: 72% (18762/26057) Checking out files: 73% (19022/26057) Checking out files: 74% (19283/26057) Checking out files: 75% (19543/26057) Checking out files: 76% (19804/26057) Checking out files: 77% (20064/26057) Checking out files: 78% (20325/26057) Checking out files: 79% (20586/26057) Checking out files: 80% (20846/26057) Checking out files: 81% (21107/26057) Checking out files: 82% (21367/26057) Checking out files: 83% (21628/26057) Checking out files: 84% (21888/26057) Checking out files: 85% (22149/26057) Checking out files: 86% (22410/26057) Checking out files: 87% (22670/26057) Checking out files: 88% (22931/26057) Checking out files: 89% (23191/26057) Checking out files: 90% (23452/26057) Checking out files: 91% (23712/26057) Checking out files: 92% (23973/26057) Checking out files: 93% (24234/26057) Checking out files: 94% (24494/26057) Checking out files: 95% (24755/26057) Checking out files: 96% (25015/26057) Checking out files: 97% (25276/26057) Checking out files: 98% (25536/26057) Checking out files: 99% (25797/26057) Checking out files: 100% (26057/26057) Checking out files: 100% (26057/26057), done.
Already on 'master'
Your branch is up-to-date with 'origin/master'.
Already on 'main'
Your branch is up-to-date with 'origin/main'.
../deps/icu-small/source/i18n/olsontz.cpp: In member function ‘virtual UBool icu_60::OlsonTimeZone::inDaylightTime(UDate, UErrorCode&) const’:
../deps/icu-small/source/i18n/olsontz.cpp:604:18: warning: ‘dst’ may be used uninitialized in this function [-Wmaybe-uninitialized]
int32_t raw, dst;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{
"_class": "hudson.model.StringParameterValue",
"name": "REBASE_ONTO",
"value": "origin/master"
"value": "origin/main"
},
{
"_class": "hudson.model.StringParameterValue",
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/jenkins/git-failure-2/console.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
19:15:56 Exporting parameter NODEJS_VERSION with Node.js version '11.0.0'
19:15:56 Exporting parameter NODEJS_MAJOR_VERSION with Node.js major version '11'
19:15:56 [rhel72-s390x] $ /bin/sh -xe /tmp/jenkins7325057057705257195.sh
19:15:56 + curl https://raw.githubusercontent.com/nodejs/build/master/jenkins/scripts/node-test-commit-pre.sh
19:15:56 + curl https://raw.githubusercontent.com/nodejs/build/main/jenkins/scripts/node-test-commit-pre.sh
19:15:56 + bash -ex -s before
19:15:56 % Total % Received % Xferd Average Speed Time Time Time Current
19:15:56 Dload Upload Total Spent Left Speed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{
"_class": "hudson.model.StringParameterValue",
"name": "REBASE_ONTO",
"value": "origin/master"
"value": "origin/main"
},
{
"_class": "hudson.model.StringParameterValue",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Exporting parameter NODEJS_VERSION with Node.js version '11.0.0'
Exporting parameter NODEJS_MAJOR_VERSION with Node.js major version '11'
[debian9-64] $ /bin/sh -xe /tmp/jenkins3291460991233382964.sh
+ bash
+ curl https://raw.githubusercontent.com/nodejs/build/master/jenkins/scripts/node-test-commit-pre.sh
+ curl https://raw.githubusercontent.com/nodejs/build/main/jenkins/scripts/node-test-commit-pre.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0100 1165 100 1165 0 0 18116 0 --:--:-- --:--:-- --:--:-- 18203
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Resetting working tree
> git reset --hard # timeout=10
> git clean -fdx # timeout=10
[osx1010] $ /bin/sh -xe /var/folders/dr/m8hrvy3d71172187rtx7vm380000gp/T/jenkins17599764209366008267.sh
+ curl https://raw.githubusercontent.com/nodejs/build/master/jenkins/scripts/node-test-commit-pre.sh
+ curl https://raw.githubusercontent.com/nodejs/build/main/jenkins/scripts/node-test-commit-pre.sh
+ bash -ex
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
Expand Down Expand Up @@ -76,7 +76,7 @@ Current branch HEAD is up to date, rebase forced.
First, rewinding head to replay your work on top of it...
Applying: workers,trace_events: set thread name for workers
+ '[' -n '' ']'
+ curl https://raw.githubusercontent.com/nodejs/build/master/jenkins/scripts/node-test-commit-diagnostics.sh
+ curl https://raw.githubusercontent.com/nodejs/build/main/jenkins/scripts/node-test-commit-diagnostics.sh
+ bash -ex -s before
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/jenkins/success/node-test-commit-18960.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{
"_class": "hudson.model.StringParameterValue",
"name": "REBASE_ONTO",
"value": "origin/master"
"value": "origin/main"
},
{
"_class": "hudson.model.StringParameterValue",
Expand Down
Loading

0 comments on commit 14c4627

Please sign in to comment.