File tree Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 1+ name : Sync Default Branch
2+ on :
3+ push : { branches: main }
4+ workflow_dispatch :
5+
6+ # One-time commands for users to switch-over:
7+ #
8+ # ```console
9+ # git branch -m master main
10+ # git fetch origin
11+ # git branch -u origin/main main
12+ # git remote set-head origin -a
13+ # ```
14+
15+ jobs :
16+ sync :
17+ permissions : { contents: write }
18+ uses : nodenv/.github/.github/workflows/sync-default-branch.yml@v4
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ lts_WARNING="before_install_package() {\\
4141"
4242
4343schedule_json () {
44- curl -qsSfJL https://raw.githubusercontent.com/nodejs/Release/master /schedule.json
44+ curl -qsSfJL https://raw.githubusercontent.com/nodejs/Release/main /schedule.json
4545}
4646
4747# Flattens the LTS schedule.json into bash variables:
Original file line number Diff line number Diff line change 4646# This returns 'HEAD' if in detached HEAD state. Useless in that case.
4747orig_branch=$( git rev-parse --abbrev-ref HEAD)
4848
49- git fetch --quiet --unshallow " $origin " master 2> /dev/null || git fetch --quiet " $origin " master
50- git checkout --quiet -B latest-scraped-definitions " $origin " /master
49+ git fetch --quiet --unshallow " $origin " main 2> /dev/null || git fetch --quiet " $origin " master
50+ git checkout --quiet -B latest-scraped-definitions " $origin " /main
5151
52- npm run-script scrape-definitions
53- npm run-script commit-definitions
52+ npm run scrape-definitions
53+ npm run commit-definitions
5454hub pull-request
5555
5656git checkout --quiet " $orig_branch "
You can’t perform that action at this time.
0 commit comments