@@ -224,30 +224,30 @@ const getFilesChanged = async () => {
224
224
* Ensure that things work as expected for shallow clones.
225
225
* (This is usually the case with CIs such as Travis)
226
226
*/
227
- await shell . exec ( `git remote set-branches origin master ` ) ;
227
+ await shell . exec ( `git remote set-branches origin main ` ) ;
228
228
229
229
// Update local data.
230
230
await shell . exec ( `git fetch` ) ;
231
231
232
232
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
233
233
234
- // Check if any files changed compared to `origin/master `.
234
+ // Check if any files changed compared to `origin/main `.
235
235
236
- // Get files changes between the current branch and `origin/master `.
236
+ // Get files changes between the current branch and `origin/main `.
237
237
238
- let fileChangesComparedToMaster = [ ] ;
239
- const shaLastCommitFromMaster = ( await getGitOutput ( 'git rev-parse origin/master ' ) ) . split ( / \s / ) [ 0 ] ;
238
+ let fileChangesComparedToMain = [ ] ;
239
+ const shaLastCommitFromMain = ( await getGitOutput ( 'git rev-parse origin/main ' ) ) . split ( / \s / ) [ 0 ] ;
240
240
241
- if ( shaLastCommitFromMaster ) {
242
- log ( 'Last commit from `origin/master `' , shaLastCommitFromMaster ) ;
241
+ if ( shaLastCommitFromMain ) {
242
+ log ( 'Last commit from `origin/main `' , shaLastCommitFromMain ) ;
243
243
244
- fileChangesComparedToMaster = await getGitMultilineOutput ( `git diff --name-only HEAD..${ shaLastCommitFromMaster } ` ) ;
244
+ fileChangesComparedToMain = await getGitMultilineOutput ( `git diff --name-only HEAD..${ shaLastCommitFromMain } ` ) ;
245
245
246
- if ( fileChangesComparedToMaster . length !== 0 ) {
247
- log ( 'Commits compared to `origin/master `' , ( await getGitMultilineOutput ( `git log --oneline HEAD...${ shaLastCommitFromMaster } ` ) ) . join ( '\n' ) ) ;
246
+ if ( fileChangesComparedToMain . length !== 0 ) {
247
+ log ( 'Commits compared to `origin/main `' , ( await getGitMultilineOutput ( `git log --oneline HEAD...${ shaLastCommitFromMain } ` ) ) . join ( '\n' ) ) ;
248
248
}
249
249
250
- log ( 'File changed compared to `origin/master `' , fileChangesComparedToMaster . join ( '\n' ) ) ;
250
+ log ( 'File changed compared to `origin/main `' , fileChangesComparedToMain . join ( '\n' ) ) ;
251
251
}
252
252
253
253
// Get files changed locally (untracked, unstaged, and staged files).
@@ -256,7 +256,7 @@ const getFilesChanged = async () => {
256
256
log ( 'File changed locally' , fileChangesLocally . join ( '\n' ) ) ;
257
257
258
258
fileChanges = [ ...( new Set ( [
259
- ...fileChangesComparedToMaster ,
259
+ ...fileChangesComparedToMain ,
260
260
...fileChangesLocally
261
261
] ) ) ] ;
262
262
@@ -269,7 +269,7 @@ const getFilesChanged = async () => {
269
269
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
270
270
271
271
/*
272
- * If nothing changed compared to `origin/master `, check what
272
+ * If nothing changed compared to `origin/main `, check what
273
273
* changed since the last tag or since some number of commits
274
274
* ago (whichever happened more recently).
275
275
*/
0 commit comments