Skip to content

Commit 3f2c12a

Browse files
authored
Rename usages of "master" branch to "main" (#8398)
1 parent a9f8440 commit 3f2c12a

17 files changed

+29
-29
lines changed

Diff for: .changeset/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"commit": false,
88
"linked": [],
99
"access": "public",
10-
"baseBranch": "master",
10+
"baseBranch": "main",
1111
"updateInternalDependencies": "patch",
1212
"ignore": [
1313
"firebase-namespace-integration-test",

Diff for: .github/workflows/canary-deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ name: Canary Deploy
1717
on:
1818
push:
1919
branches:
20-
- master
20+
- main
2121
workflow_dispatch:
2222

2323
jobs:

Diff for: .github/workflows/check-changeset.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ name: Check Changeset
1717
on:
1818
pull_request:
1919
branches:
20-
- master
20+
- main
2121

2222
env:
2323
GITHUB_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
@@ -41,9 +41,9 @@ jobs:
4141
- name: Yarn install
4242
run: yarn
4343
- name: Run changeset script
44-
# pull master so changeset can diff against it
44+
# pull main so changeset can diff against it
4545
run: |
46-
git pull -f --no-rebase origin master:master
46+
git pull -f --no-rebase origin main:main
4747
yarn ts-node-script scripts/ci/check_changeset.ts
4848
id: check-changeset
4949
- name: Print changeset checker output

Diff for: .github/workflows/merge-release-branch.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: Merge Release Into Master
15+
name: Merge Release Into Main
1616

1717
on: workflow_dispatch
1818

1919
jobs:
20-
merge_to_master:
20+
merge_to_main:
2121
runs-on: ubuntu-latest
2222
# Allow GITHUB_TOKEN to have write permissions
2323
permissions:
@@ -36,15 +36,15 @@ jobs:
3636
- name: Echo version in shell
3737
run: |
3838
echo "Merging release ${{ steps.get-version.outputs.RELEASE_VERSION }}"
39-
- name: Merge to master
39+
- name: Merge to main
4040
uses: actions/github-script@v6
4141
with:
4242
github-token: ${{ secrets.GITHUB_TOKEN }}
4343
script: |
4444
github.rest.repos.merge({
4545
owner: context.repo.owner,
4646
repo: context.repo.repo,
47-
base: 'master',
47+
base: 'main',
4848
head: 'release',
4949
commit_message: 'Release ${{ steps.get-version.outputs.RELEASE_VERSION }}'
5050
})

Diff for: .github/workflows/release-pr.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ jobs:
4343
# Ensures a new @firebase/app is published with every release.
4444
# This keeps the SDK_VERSION variable up to date.
4545
- name: Add a changeset for @firebase/app
46-
# pull master so changeset can diff against it
46+
# pull main so changeset can diff against it
4747
run: |
48-
git pull -f --no-rebase origin master:master
48+
git pull -f --no-rebase origin main:main
4949
yarn ts-node-script scripts/ci/add_changeset.ts
5050
5151
- name: Create Release Pull Request

Diff for: .github/workflows/release-staging.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ on:
2525
source-branch:
2626
description: 'Branch to release from'
2727
type: choice
28-
default: 'master'
28+
default: 'main'
2929
required: true
3030
options:
31-
- master
31+
- main
3232
- v8
3333
verbose:
3434
description: 'Enable verbose logging'
@@ -50,7 +50,7 @@ jobs:
5050
uses: actions/setup-node@v3
5151
with:
5252
node-version: 20.x
53-
- name: Merge master into release
53+
- name: Merge main into release
5454
uses: actions/github-script@v6
5555
with:
5656
github-token: ${{ secrets.OSS_BOT_GITHUB_TOKEN }}

Diff for: CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ review.
115115
* Make your changes in a new git branch:
116116

117117
```shell
118-
git checkout -b my-fix-branch master
118+
git checkout -b my-fix-branch main
119119
```
120120

121121
* Create your change, **including appropriate test cases**. Changes with tests are more likely to be
@@ -144,7 +144,7 @@ entries to the `.gitignore`).
144144
git push origin my-fix-branch
145145
```
146146

147-
* In GitHub, create a pull request against the `firebase-js-sdk:master` branch.
147+
* In GitHub, create a pull request against the `firebase-js-sdk:main` branch.
148148
* Add changeset. See [Adding changeset to PR](#adding-changeset-to-pr).
149149
* All pull requests must be reviewed by a member of the Firebase JS SDK team, who will merge it
150150
when/if they feel it is good to go.

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- BADGES -->
44
![Build Status](https://img.shields.io/github/actions/workflow/status/firebase/firebase-js-sdk/test-all.yml)
55
[![Version](https://img.shields.io/npm/v/firebase.svg?label=version)](https://www.npmjs.com/package/firebase)
6-
[![Coverage Status](https://coveralls.io/repos/github/firebase/firebase-js-sdk/badge.svg?branch=master)](https://coveralls.io/github/firebase/firebase-js-sdk?branch=master)
6+
[![Coverage Status](https://coveralls.io/repos/github/firebase/firebase-js-sdk/badge.svg?branch=main)](https://coveralls.io/github/firebase/firebase-js-sdk?branch=main)
77
<!-- END BADGES -->
88

99
The Firebase JavaScript SDK implements the client-side libraries used by

Diff for: packages/auth/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Conten
9696
}'
9797
```
9898

99-
Replace the tenant ID `passpol-tenant-d7hha` in [test/integration/flows/password_policy.test.ts](https://github.com/firebase/firebase-js-sdk/blob/master/packages/auth/test/integration/flows/password_policy.test.ts) with the ID for the newly created tenant. The tenant ID can be found at the end of the `name` property in the response and is in the format `passpol-tenant-xxxxx`.
99+
Replace the tenant ID `passpol-tenant-d7hha` in [test/integration/flows/password_policy.test.ts](https://github.com/firebase/firebase-js-sdk/blob/main/packages/auth/test/integration/flows/password_policy.test.ts) with the ID for the newly created tenant. The tenant ID can be found at the end of the `name` property in the response and is in the format `passpol-tenant-xxxxx`.
100100

101101
### Selenium Webdriver tests
102102

Diff for: packages/firebase/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- BADGES -->
22
![Build Status](https://img.shields.io/github/workflow/status/firebase/firebase-js-sdk/Run%20All%20Tests.svg)
33
[![Version](https://img.shields.io/npm/v/firebase.svg?label=version)](https://www.npmjs.com/package/firebase)
4-
[![Coverage Status](https://coveralls.io/repos/github/firebase/firebase-js-sdk/badge.svg?branch=master)](https://coveralls.io/github/firebase/firebase-js-sdk?branch=master)
4+
[![Coverage Status](https://coveralls.io/repos/github/firebase/firebase-js-sdk/badge.svg?branch=main)](https://coveralls.io/github/firebase/firebase-js-sdk?branch=main)
55
<!-- END BADGES -->
66

77
# Firebase - App success made simple

Diff for: packages/remote-config/src/remote_config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const DEFAULT_CACHE_MAX_AGE_MILLIS = 12 * 60 * 60 * 1000; // Twelve hours.
3232
/**
3333
* Encapsulates business logic mapping network and storage dependencies to the public SDK API.
3434
*
35-
* See {@link https://github.com/FirebasePrivate/firebase-js-sdk/blob/master/packages/firebase/index.d.ts|interface documentation} for method descriptions.
35+
* See {@link https://github.com/firebase/firebase-js-sdk/blob/main/packages/firebase/index.d.ts|interface documentation} for method descriptions.
3636
*/
3737
export class RemoteConfig implements RemoteConfigType {
3838
/**

Diff for: scripts/ci-test/deploy-if-needed.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async function deployIfNeeded() {
5252
if (!token) {
5353
throw new Error('No FIREBASE_CLI_TOKEN found, exiting.');
5454
}
55-
const diff = await git.diff(['--name-only', 'origin/master...HEAD']);
55+
const diff = await git.diff(['--name-only', 'origin/main...HEAD']);
5656
const changedFiles = diff.split('\n');
5757
let flags: string[] = [];
5858
for (const group of projectConfigGroups) {

Diff for: scripts/ci-test/tasks.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export async function getTestTasks(): Promise<TestTask[]> {
9494
const depGraph: { [key: string]: any } = JSON.parse(
9595
(await exec('npx lerna ls --all --graph', { cwd: root })).stdout
9696
);
97-
const diff = await git.diff(['--name-only', 'origin/master...HEAD']);
97+
const diff = await git.diff(['--name-only', 'origin/main...HEAD']);
9898
const changedFiles = diff.split('\n');
9999
let testTasks: TestTask[] = [];
100100
for (const filename of changedFiles) {

Diff for: scripts/ci/add_changeset.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ const FILE_PATH = `${projectRoot}/.changeset/bump-sdk-version.md`;
3939
async function addChangeSet() {
4040
// check if a few firebase version is being released
4141
try {
42-
// The way actions/checkout works, there is no local `master` branch, but it
43-
// has access to the remote origin/master.
42+
// The way actions/checkout works, there is no local `main` branch, but it
43+
// has access to the remote origin/main.
4444
const { stdout } = await exec('yarn changeset status');
4545
// only add a changeset for @firebase/app if
4646
// 1. we are publishing a new firebase version. and

Diff for: scripts/ci/check_changeset.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import fs from 'mz/fs';
2626
const root = resolve(__dirname, '../..');
2727
const git = simpleGit(root);
2828

29-
const baseRef = process.env.GITHUB_PULL_REQUEST_BASE_SHA || 'master';
29+
const baseRef = process.env.GITHUB_PULL_REQUEST_BASE_SHA || 'main';
3030
const headRef = process.env.GITHUB_PULL_REQUEST_HEAD_SHA || 'HEAD';
3131

3232
const githubOutputFile = (function (): string {

Diff for: scripts/format/format.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const { path: targetPath, all: runOnAll } = yargs(hideBin(process.argv))
4242
.usage(
4343
`Runs prettier formatting and updates license headers. ` +
4444
`If no arguments are provided it will run formatting on any ` +
45-
`files changed since master.`
45+
`files changed since main.`
4646
)
4747
.parseSync();
4848

@@ -56,8 +56,8 @@ const format = async () => {
5656
glob(join(targetPath, '/**/*'), (err, res) => resolve(res));
5757
});
5858
} else {
59-
// Otherwise get all files changed since master.
60-
const baseSha = process.env.GITHUB_PULL_REQUEST_BASE_SHA || 'master';
59+
// Otherwise get all files changed since main.
60+
const baseSha = process.env.GITHUB_PULL_REQUEST_BASE_SHA || 'main';
6161
const diff = await git.diff([
6262
'--name-only',
6363
'--diff-filter=d',

Diff for: scripts/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const projectRoot = dirname(resolve(__dirname, '../package.json'));
2828
export async function getChangedFiles(): Promise<string[]> {
2929
console.log(projectRoot);
3030
const git = simpleGit(projectRoot);
31-
const diff = await git.diff(['--name-only', 'origin/master...HEAD']);
31+
const diff = await git.diff(['--name-only', 'origin/main...HEAD']);
3232
const changedFiles = diff.split('\n');
3333

3434
return changedFiles;

0 commit comments

Comments
 (0)