@@ -29,7 +29,7 @@ const username = process.env.USER_NAME;
29
29
const token = process . env . GITHUB_ACCESS_TOKEN ;
30
30
const transRepoName = `${ langCode } .${ repository } ` ;
31
31
const transUrl = `https://${ username } :${ token } @github.com/${ owner } /${ transRepoName } .git` ;
32
- const defaultBranch = 'master ' ;
32
+ const defaultBranch = 'main ' ;
33
33
34
34
function teardownAndExit ( ) {
35
35
if ( program . delete ) {
@@ -74,7 +74,7 @@ if (shell.exec(`git checkout ${syncBranch}`).code !== 0) {
74
74
shell . exec ( `git checkout -b ${ syncBranch } ` ) ;
75
75
}
76
76
77
- // Pull from {source}/master
77
+ // Pull from {source}/main
78
78
const output = shell . exec ( `git pull ${ repository } ${ defaultBranch } ` ) . stdout ;
79
79
if ( output . includes ( 'Already up to date.' ) ) {
80
80
logger . info ( `We are already up to date with ${ repository } .` ) ;
@@ -90,9 +90,9 @@ const conflictFiles = conflictLines.map(line =>
90
90
91
91
shell . exec ( `git commit -am "merging all conflicts"` ) ;
92
92
93
- // If no conflicts, merge directly into master
93
+ // If no conflicts, merge directly into main
94
94
if ( conflictFiles . length === 0 ) {
95
- logger . info ( 'No conflicts found. Committing directly to master .' ) ;
95
+ logger . info ( 'No conflicts found. Committing directly to main .' ) ;
96
96
shell . exec ( `git checkout ${ defaultBranch } ` ) ;
97
97
shell . exec ( `git merge ${ syncBranch } ` ) ;
98
98
shell . exec ( `git push origin ${ defaultBranch } ` ) ;
@@ -112,7 +112,7 @@ The following files have conflicts and may need new translations:
112
112
${ conflictFiles
113
113
. map (
114
114
file =>
115
- ` * [ ] [${ file } ](/${ owner } /${ repository } /commits/master /${ file } )` ,
115
+ ` * [ ] [${ file } ](/${ owner } /${ repository } /commits/main /${ file } )` ,
116
116
)
117
117
. join ( '\n' ) }
118
118
@@ -122,13 +122,13 @@ Please fix the conflicts by pushing new commits to this pull request, either by
122
122
const body = `
123
123
This PR was automatically generated.
124
124
125
- Merge changes from [reactjs.org](https://github.com/reactjs/reactjs.org/commits/master ) at ${ shortHash }
125
+ Merge changes from [reactjs.org](https://github.com/reactjs/reactjs.org/commits/main ) at ${ shortHash }
126
126
127
127
${ conflictFiles . length > 0 ? conflictsText : 'No conflicts were found.' }
128
128
129
129
## DO NOT SQUASH MERGE THIS PULL REQUEST!
130
130
131
- Doing so will "erase" the commits from master and cause them to show up as conflicts the next time we merge.
131
+ Doing so will "erase" the commits from main and cause them to show up as conflicts the next time we merge.
132
132
` ;
133
133
134
134
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random#Getting_a_random_integer_between_two_values
0 commit comments