Skip to content

Commit 14c4627

Browse files
authored
chore(main): change references to the master branch to main (#638)
1 parent 6735a5d commit 14c4627

27 files changed

+81
-80
lines changed

components/git/backport.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ const epilogue = `====================== Example =======================
1010
Demo: https://asciinema.org/a/221244
1111
Backporting https://github.com/nodejs/node/pull/24816 to v11.x
1212
13-
# Sync master with upstream for the commits, if they are not yet there
14-
$ git checkout master
15-
$ ncu-config set branch master
13+
# Sync main with upstream for the commits, if they are not yet there
14+
$ git checkout main
15+
$ ncu-config set branch main
1616
$ git node sync
1717
18-
# Backport existing commits from master to v11.x-staging
18+
# Backport existing commits from main to v11.x-staging
1919
$ git checkout v11.x-staging
2020
$ ncu-config set branch v11.x-staging
2121
$ git node sync

components/git/epilogue.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ $ cd path/to/node/project
44
55
# If you have not configured it before
66
$ ncu-config set upstream <name-of-remote-to-nodejs/node>
7-
$ ncu-config set branch master # Assuming you are landing commits on master
7+
$ ncu-config set branch main # Assuming you are landing commits on main
88
9-
$ git checkout master
9+
$ git checkout main
1010
$ git node land --abort # Abort a landing session, just in case
1111
$ git node land $PRID # Start a new landing session
1212
$ git node land $URL # Start a new landing session using the PR URL

docs/git-node.md

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,29 @@
33
A custom Git command for managing pull requests. You can run it as
44
`git-node` or `git node`. To see the help text, run `git node`.
55

6-
- [`git node land`](#git-node-land)
7-
- [Prerequisites](#git-node-land-prerequisites)
8-
- [Git bash for Windows](#git-bash-for-windows)
9-
- [Demo & Usage](#demo--usage)
10-
- [Optional Settings](#git-node-land-optional-settings)
11-
- [`git node backport`](#git-node-backport)
12-
- [Example](#example)
13-
- [`git node release`](#git-node-release)
14-
- [Example](#example-1)
15-
- [`git node sync`](#git-node-sync)
16-
- [`git node metadata`](#git-node-metadata)
17-
- [Optional Settings](#git-node-metadata-optional-settings)
18-
- [`git node v8`](#git-node-v8)
19-
- [Prerequisites](#git-node-v8-prerequisites)
20-
- [`git node v8 major`](#git-node-v8-major)
21-
- [`git node v8 minor`](#git-node-v8-minor)
22-
- [`git node v8 backport <sha..>`](#git-node-v8-backport-sha)
23-
- [General options](#general-options)
24-
- [`git node status`](#git-node-status)
25-
- [Example](#example)
26-
- [`git node wpt`](#git-node-wpt)
27-
- [Example](#example-2)
6+
- [git-node](#git-node)
7+
- [`git node land`](#git-node-land)
8+
- [Prerequisites](#prerequisites)
9+
- [Git bash for Windows](#git-bash-for-windows)
10+
- [Demo & Usage](#demo--usage)
11+
- [Optional Settings](#optional-settings)
12+
- [`git node backport`](#git-node-backport)
13+
- [Example](#example)
14+
- [`git node release`](#git-node-release)
15+
- [Example](#example-1)
16+
- [`git node sync`](#git-node-sync)
17+
- [`git node metadata`](#git-node-metadata)
18+
- [Optional Settings](#optional-settings-1)
19+
- [`git node v8`](#git-node-v8)
20+
- [Prerequisites](#prerequisites-1)
21+
- [`git node v8 major`](#git-node-v8-major)
22+
- [`git node v8 minor`](#git-node-v8-minor)
23+
- [`git node v8 backport <sha..>`](#git-node-v8-backport-sha)
24+
- [General options](#general-options)
25+
- [`git node status`](#git-node-status)
26+
- [Example](#example-2)
27+
- [`git node wpt`](#git-node-wpt)
28+
- [Example](#example-3)
2829

2930
## `git node land`
3031

@@ -93,8 +94,8 @@ Examples:
9394
# Tell ncu that your upstream remote is named "upstream"
9495
$ ncu-config set upstream upstream
9596
96-
# Tell ncu that you are landing patches to "master" branch
97-
$ ncu-config set branch master
97+
# Tell ncu that you are landing patches to "main" branch
98+
$ ncu-config set branch main
9899
```
99100

100101
Note: If you are behind a firewall and run into `ECONNREFUSED` issues with
@@ -130,9 +131,9 @@ $ cd path/to/node/project
130131
131132
# If you have not configured it before
132133
$ ncu-config set upstream <name-of-remote-to-nodejs/node>
133-
$ ncu-config set branch master # Assuming you are landing commits on master
134+
$ ncu-config set branch main # Assuming you are landing commits on main
134135
135-
$ git checkout master
136+
$ git checkout main
136137
$ git node land --abort # Abort a landing session, just in case
137138
$ git node land $PRID # Start a new landing session
138139
$ git node land $URL # Start a new landing session using the PR URL
@@ -192,11 +193,11 @@ Options:
192193
```
193194
Backporting https://github.com/nodejs/node/pull/12344 to v10.x
194195
195-
# Sync master with upstream for the commits, if they are not yet there
196-
$ git checkout master
196+
# Sync main with upstream for the commits, if they are not yet there
197+
$ git checkout main
197198
$ git node sync
198199
199-
# Backport existing commits from master to v10.x-staging
200+
# Backport existing commits from main to v10.x-staging
200201
$ git checkout v10.x-staging
201202
$ git node sync
202203
$ git node backport 12344 --to 10
@@ -397,14 +398,14 @@ Return status and information about the current git-node land session. Shows the
397398
### Example
398399

399400
```sh
400-
node on git:master ❯ git node status 11:32AM
401+
node on git:main ❯ git node status 11:32AM
401402
✔ Landing session in progress
402403
--------------------------------------------------------------------------------
403404
PR: https:/github.com/nodejs/node/pull/34800
404405
State: AMENDING
405406
Username: codebytere
406407
Upstream: upstream
407-
Branch: master
408+
Branch: main
408409
```
409410

410411
## `git node wpt`
@@ -441,4 +442,4 @@ $ git node wpt url # Will update test/fixtures/wpt/url and related files
441442
$ git node wpt url --commit=43feb7f612fe9160639e09a47933a29834904d69
442443
```
443444

444-
[node.js abi version registry]: https://github.com/nodejs/node/blob/master/doc/abi_version_registry.json
445+
[node.js abi version registry]: https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json

docs/ncu-ci.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Options:
4242
Examples:
4343

4444
```sh
45-
node on git:master ❯ ncu-ci rate pr
45+
node on git:main ❯ ncu-ci rate pr
4646
--------------------------------------------------------------------------------
4747
[1/1] Running health
4848
--------------------------------------------------------------------------------
@@ -53,7 +53,7 @@ node on git:master ❯ ncu-ci rate pr
5353
```
5454

5555
```sh
56-
node on git:master ❯ ncu-ci rate commit
56+
node on git:main ❯ ncu-ci rate commit
5757
--------------------------------------------------------------------------------
5858
[1/1] Running health
5959
--------------------------------------------------------------------------------
@@ -69,7 +69,7 @@ node on git:master ❯ ncu-ci rate commit
6969

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

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

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

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

203203
Example:
204204
```sh
205-
node on git:master ❯ ncu-ci benchmark 636
205+
node on git:main ❯ ncu-ci benchmark 636
206206
--------------------------------------------------------------------------------
207207
[1/1] Running BENCHMARK: 636
208208
--------------------------------------------------------------------------------
@@ -237,7 +237,7 @@ Finished: SUCCESS
237237
238238
Example:
239239
```
240-
node on git:master ❯ ncu-ci citgm 2400
240+
node on git:main ❯ ncu-ci citgm 2400
241241
--------------------------------------------------------------------------------
242242
[1/1] Running CITGM: 2400
243243
--------------------------------------------------------------------------------
@@ -316,7 +316,7 @@ FAILURE: 5 failures in 2390 not present in 2392
316316
`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.
317317
318318
```sh
319-
node on git:master ❯ ncu-ci daily
319+
node on git:main ❯ ncu-ci daily
320320
✔ Done--------------------------------------------------------------------------------
321321
[1/16] Running health
322322
--------------------------------------------------------------------------------
@@ -333,7 +333,7 @@ node on git:master ❯ ncu-ci daily
333333
----------------------------------- Summary ------------------------------------
334334
Result FAILURE
335335
URL https://ci.nodejs.org/job/node-test-commit/39692/
336-
Source https://api.github.com/repos/nodejs/node/git/refs/heads/master
336+
Source https://api.github.com/repos/nodejs/node/git/refs/heads/main
337337
Commit [bf0d82c10247] test: remove common.localhostIPv6
338338
Date 2020-07-16 16:57:30 -0700
339339
Author Rich Trott <[email protected]>

lib/backport_session.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ export default class BackportSession extends Session {
141141
// TODO(joyeechuneg): add more warnings
142142
const { prid } = this;
143143
const url = getPrURL(this);
144-
cli.log(`Looking for commits of ${url} on master...`);
144+
cli.log(`Looking for commits of ${url} on main...`);
145145

146-
const commits = this.getCommitsFromBranch(prid, 'master');
146+
const commits = this.getCommitsFromBranch(prid, 'main');
147147

148148
if (commits.length === 0) {
149149
cli.error('Could not find any commit matching the PR');

lib/collaborators.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export async function getCollaborators(cli, request, argv) {
6868

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

lib/prepare_release.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ export default class ReleasePreparation {
587587
'baking-for-lts'
588588
];
589589

590-
let comparisonBranch = 'master';
590+
let comparisonBranch = 'main';
591591
const isSemverMinor = versionComponents.patch === 0;
592592
if (isLTS) {
593593
// Assume Current branch matches tag with highest semver value.

lib/session.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,8 @@ export default class Session {
369369
cli.separator();
370370
cli.info(
371371
'For example, if your want to land commits on the ' +
372-
'`master` branch, you can run:\n\n' +
373-
' $ ncu-config set branch master');
372+
'`main` branch, you can run:\n\n' +
373+
' $ ncu-config set branch main');
374374
cli.separator();
375375
cli.setExitCode(1);
376376
}

test/fixtures/closed_pr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
]
1818
},
1919
"title": "testing: do not merge",
20-
"baseRefName": "master",
20+
"baseRefName": "main",
2121
"headRefName": "awesome-changes",
2222
"closed": true,
2323
"closedAt": "2017-10-28T11:13:43Z",

test/fixtures/code_and_learn_pr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
]
1919
},
2020
"title": "test: awesome changes",
21-
"baseRefName": "master",
21+
"baseRefName": "main",
2222
"headRefName": "awesome-changes"
2323
}

0 commit comments

Comments
 (0)