Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/sync-default-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Sync Default Branch
on:
push: { branches: main }
workflow_dispatch:

# One-time commands for users to switch-over:
#
# ```console
# git branch -m master main
# git fetch origin
# git branch -u origin/main main
# git remote set-head origin -a
# ```

jobs:
sync:
permissions: { contents: write }
uses: nodenv/.github/.github/workflows/sync-default-branch.yml@v4
2 changes: 1 addition & 1 deletion script/lts-lint-definitions
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ lts_WARNING="before_install_package() {\\
"

schedule_json() {
curl -qsSfJL https://raw.githubusercontent.com/nodejs/Release/master/schedule.json
curl -qsSfJL https://raw.githubusercontent.com/nodejs/Release/main/schedule.json
}

# Flattens the LTS schedule.json into bash variables:
Expand Down
8 changes: 4 additions & 4 deletions script/submit-definitions
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ done
# This returns 'HEAD' if in detached HEAD state. Useless in that case.
orig_branch=$(git rev-parse --abbrev-ref HEAD)

git fetch --quiet --unshallow "$origin" master 2>/dev/null || git fetch --quiet "$origin" master
git checkout --quiet -B latest-scraped-definitions "$origin"/master
git fetch --quiet --unshallow "$origin" main 2>/dev/null || git fetch --quiet "$origin" master
git checkout --quiet -B latest-scraped-definitions "$origin"/main

npm run-script scrape-definitions
npm run-script commit-definitions
npm run scrape-definitions
npm run commit-definitions
hub pull-request

git checkout --quiet "$orig_branch"