From a4a7b28288a496a857a7804d859356a05b3a0ed4 Mon Sep 17 00:00:00 2001
From: Jim Schlight <jschlight@users.noreply.github.com>
Date: Tue, 26 Jan 2021 14:43:44 -0800
Subject: [PATCH] Update branch references from master to main (#886)

---
 .github/workflows/linter.yml | 2 +-
 doc/creating_a_release.md    | 8 ++++----
 tools/clang-format.js        | 6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml
index 6fd42ec4b..ebe1748ad 100644
--- a/.github/workflows/linter.yml
+++ b/.github/workflows/linter.yml
@@ -21,4 +21,4 @@ jobs:
       with:
         node-version: ${{ matrix.node-version }}
     - run: npm install
-    - run: CLANG_FORMAT_START=refs/remotes/origin/master npm run lint
+    - run: CLANG_FORMAT_START=refs/remotes/origin/main npm run lint
diff --git a/doc/creating_a_release.md b/doc/creating_a_release.md
index 5c8f8b025..5299964ad 100644
--- a/doc/creating_a_release.md
+++ b/doc/creating_a_release.md
@@ -23,11 +23,11 @@ These are the steps to follow to create a new release:
 * Open an issue in the **node-addon-api** repo documenting the intent to create a
 new release. Give people some time to comment or suggest PRs that should land first.
 
-* Validate all tests pass by running npm test on master.
+* Validate all tests pass by running `npm test` on the `main` branch.
 
 * Update the version in **package.json** appropriately.
 
-* Update the [README.md](https://github.com/nodejs/node-addon-api/blob/master/README.md)
+* Update the [README.md](https://github.com/nodejs/node-addon-api/blob/main/README.md)
 to show the new version as the latest.
 
 * Generate the changelog for the new version using **changelog maker** tool. From
@@ -36,12 +36,12 @@ the route folder of the repo launch the following command:
     ```bash
     > changelog-maker
     ```
-* Use the output generated by **changelog maker** to update the [CHANGELOG.md](https://github.com/nodejs/node-addon-api/blob/master/CHANGELOG.md)
+* Use the output generated by **changelog maker** to update the [CHANGELOG.md](https://github.com/nodejs/node-addon-api/blob/main/CHANGELOG.md)
 following the style used in publishing the previous release.
 
 * Add any new contributors to the "contributors" section in the package.json
 
-* Validate all tests pass by running npm test on master.
+* Validate all tests pass by running `npm test` on the `main` branch.
 
 * Use **[CI](https://ci.nodejs.org/view/x%20-%20Abi%20stable%20module%20API/job/node-test-node-addon-api-new/)**
 to validate tests pass (note there are still some issues on SmartOS and
diff --git a/tools/clang-format.js b/tools/clang-format.js
index 026728b5c..1aec1cf5d 100644
--- a/tools/clang-format.js
+++ b/tools/clang-format.js
@@ -4,7 +4,7 @@ const spawn = require('child_process').spawnSync;
 const path = require('path');
 
 const filesToCheck = ['*.h', '*.cc'];
-const CLANG_FORMAT_START = process.env.CLANG_FORMAT_START || 'master';
+const CLANG_FORMAT_START = process.env.CLANG_FORMAT_START || 'main';
 
 function main(args) {
   let clangFormatPath = path.dirname(require.resolve('clang-format'));
@@ -35,9 +35,9 @@ function main(args) {
     console.error(`
       ERROR: please run ${fixCmd} to format changes in your commit
         Note that when running the command locally, please keep your local
-        master branch and working branch up to date with nodejs/node-addon-api
+        main branch and working branch up to date with nodejs/node-addon-api
         to exclude un-related complains.
-        Or you can run "env CLANG_FORMAT_START=upstream/master ${fixCmd}".`);
+        Or you can run "env CLANG_FORMAT_START=upstream/main ${fixCmd}".`);
     return 1;
   }
 }