From b6c6cc70009d5f09400e9bb72a41ca32793c9fe9 Mon Sep 17 00:00:00 2001 From: Feng Yu Date: Fri, 17 Jun 2022 15:48:18 +0800 Subject: [PATCH] tools: update main branch name PR-URL: https://github.com/nodejs/node/pull/43440 Refs: https://github.com/nodejs/node/issues/33864 Reviewed-By: Luigi Pinca Reviewed-By: LiviaMedeiros Reviewed-By: Beth Griggs Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Richard Lau Reviewed-By: Darshan Sen Reviewed-By: Antoine du Hamel --- tools/actions/commit-queue.sh | 4 ++-- tools/doc/apilinks.mjs | 2 +- tools/doc/html.mjs | 2 +- tools/doc/versions.mjs | 2 +- tools/lint-pr-url.mjs | 2 +- tools/update-npm.sh | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/actions/commit-queue.sh b/tools/actions/commit-queue.sh index 309c1c5406b334..0df819e47ee825 100755 --- a/tools/actions/commit-queue.sh +++ b/tools/actions/commit-queue.sh @@ -7,7 +7,7 @@ REPOSITORY=$2 shift 2 UPSTREAM=origin -DEFAULT_BRANCH=master +DEFAULT_BRANCH=main COMMIT_QUEUE_LABEL="commit-queue" COMMIT_QUEUE_FAILED_LABEL="commit-queue-failed" @@ -86,7 +86,7 @@ for pr in "$@"; do commit_title=$(git log -1 --pretty='format:%s') commit_body=$(git log -1 --pretty='format:%b') commit_head=$(grep 'Fetched commits as' output | cut -d. -f3 | xargs git rev-parse) - + jq -n \ --arg title "${commit_title}" \ --arg body "${commit_body}" \ diff --git a/tools/doc/apilinks.mjs b/tools/doc/apilinks.mjs index a1b660f1cfaf54..749bf7966aa2b0 100644 --- a/tools/doc/apilinks.mjs +++ b/tools/doc/apilinks.mjs @@ -41,7 +41,7 @@ const remoteUrl = execSync(`git config remote.${trackingRemote}.url`); const repo = (remoteUrl.match(/(\w+\/\w+)\.git\r?\n?$/) || ['', 'nodejs/node'])[1]; -const hash = execSync('git log -1 --pretty=%H') || 'master'; +const hash = execSync('git log -1 --pretty=%H') || 'main'; const tag = execSync(`git describe --contains ${hash}`).split('\n')[0] || hash; // Extract definitions from each file specified. diff --git a/tools/doc/html.mjs b/tools/doc/html.mjs index 1c5ad61182bc79..1caffa7158c950 100644 --- a/tools/doc/html.mjs +++ b/tools/doc/html.mjs @@ -522,7 +522,7 @@ function altDocs(filename, docCreated, versions) { } function editOnGitHub(filename) { - return `
  • Edit on GitHub
  • `; + return `
  • Edit on GitHub
  • `; } function gtocPicker(id) { diff --git a/tools/doc/versions.mjs b/tools/doc/versions.mjs index ec623a2dbd206e..8f6c4ef98ad596 100644 --- a/tools/doc/versions.mjs +++ b/tools/doc/versions.mjs @@ -32,7 +32,7 @@ const outFile = (process.argv.length > 2 ? process.argv[2] : undefined); async function versions() { // The CHANGELOG.md on release branches may not reference newer semver - // majors of Node.js so fetch and parse the version from the master branch. + // majors of Node.js so fetch and parse the version from the main branch. const url = 'https://raw.githubusercontent.com/nodejs/node/HEAD/CHANGELOG.md'; let changelog; diff --git a/tools/lint-pr-url.mjs b/tools/lint-pr-url.mjs index 0ebbfdd079671d..c32473ccb89d84 100755 --- a/tools/lint-pr-url.mjs +++ b/tools/lint-pr-url.mjs @@ -1,7 +1,7 @@ #!/usr/bin/env node // Usage: -// git diff upstream/master...HEAD -G"pr-url:" -- "*.md" | \ +// git diff upstream/main...HEAD -G"pr-url:" -- "*.md" | \ // ./tools/lint-pr-url.mjs import process from 'node:process'; diff --git a/tools/update-npm.sh b/tools/update-npm.sh index d58b325b77f713..f69b6e5b17ea15 100755 --- a/tools/update-npm.sh +++ b/tools/update-npm.sh @@ -49,5 +49,5 @@ echo "Please git add npm, commit the new version, and whitespace-fix:" echo "" echo "$ git add -A deps/npm" echo "$ git commit -m \"deps: upgrade npm to $NPM_VERSION\"" -echo "$ git rebase --whitespace=fix master" +echo "$ git rebase --whitespace=fix main" echo ""