Skip to content

Commit

Permalink
build: clean up references to old master branch (#45856)
Browse files Browse the repository at this point in the history
Cleans up all references to the `master` branch we renamed to
`main` across Angular.

PR Close #45856
  • Loading branch information
devversion authored and AndrewKushnir committed May 4, 2022
1 parent aef5c92 commit 68a6a07
Show file tree
Hide file tree
Showing 70 changed files with 200 additions and 215 deletions.
6 changes: 1 addition & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,13 @@ var_10: &only_on_main_branch
branches:
only:
- main
# TODO(BRANCH_RENAME_CLEANUP): remove
- master

# Filter to run a job on all releasable branches.
var_11: &only_release_branches
filters:
branches:
only:
- main
# TODO(BRANCH_RENAME_CLEANUP): remove
- master
- /\d+\.\d+\.x/

# CircleCI orbs
Expand Down Expand Up @@ -308,7 +304,7 @@ jobs:
path: dist/bin/packages/core/test/bundling/todo/bundle.min.js.br
destination: core/todo/bundle.br

# NOTE: This is currently limited to master builds only. See the `monitoring` configuration.
# NOTE: This is currently limited to main builds only. See the `monitoring` configuration.
saucelabs:
executor:
name: default-executor
Expand Down
8 changes: 0 additions & 8 deletions .circleci/rebase-pr.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,6 @@ function getRefFromBranchList(gitOutput) {
return 1;
}

// TODO(BRANCH_RENAME_CLEANUP): remove
if (a === 'master') {
return -1;
}
if (b === 'master') {
return 1;
}

const aIsSemver = semverRegex.test(a);
const bIsSemver = semverRegex.test(b);
if (aIsSemver && bIsSemver) {
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ contact_links:
url: https://github.com/angular/components/issues/new/choose
about: Issues and feature requests for Angular Material
- name: Support Request
url: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
url: https://github.com/angular/angular/blob/main/CONTRIBUTING.md#question
about: Questions and requests for support
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## PR Checklist
Please check if your PR fulfills the following requirements:

- [ ] The commit message follows our guidelines: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit
- [ ] The commit message follows our guidelines: https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)

Expand Down
4 changes: 2 additions & 2 deletions .github/angular-robot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ merge:

# whether the PR shouldn't have a conflict with the base branch
noConflict: true
# list of labels that a PR needs to have, checked with a regexp (e.g. "target:" will work for the label "target: master")
# list of labels that a PR needs to have, checked with a regexp.
requiredLabels:
- 'target: *'

Expand All @@ -119,7 +119,7 @@ merge:
# the comment that will be added when the merge label is added despite failing checks, leave empty or set to false to disable
# {{MERGE_LABEL}} will be replaced by the value of the mergeLabel option
# {{PLACEHOLDER}} will be replaced by the list of failing checks
mergeRemovedComment: "I see that you just added the `{{MERGE_LABEL}}` label, but the following checks are still failing:\n{{PLACEHOLDER}}\n\n**If you want your PR to be merged, it has to pass all the CI checks.**\n\nIf you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help."
mergeRemovedComment: "I see that you just added the `{{MERGE_LABEL}}` label, but the following checks are still failing:\n{{PLACEHOLDER}}\n\n**If you want your PR to be merged, it has to pass all the CI checks.**\n\nIf you can't get the PR to a green state due to flakes or broken `main`, please try rebasing to `main` and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help."

# options for the triage plugin
triage:
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ on:
schedule:
- cron: '0 0 * * 0'
push:
branches: [
main,
# TODO(BRANCH_RENAME_CLEANUP): remove
master,
]
branches: [main]
workflow_dispatch:

# Declare default permissions as read only.
Expand Down
6 changes: 3 additions & 3 deletions .gitmessage
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Fixes #<issue number>
# =============================
#
# The full specification of the Angular Commit Message Format can be found at
# https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit
# https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit
#
# The following is an excerpt of the specification with the most commonly needed info.
#
Expand Down Expand Up @@ -108,10 +108,10 @@ Fixes #<issue number>
# │ platform-browser-dynamic|platform-server|router|service-worker|
# │ upgrade|zone.js|packaging|changelog|docs-infra|migrations|ngcc|ve|
# │ devtools
# │ https://github.com/angular/angular/blob/master/CONTRIBUTING.md#scope
# │ https://github.com/angular/angular/blob/main/CONTRIBUTING.md#scope
# │
# └─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|style|test
# https://github.com/angular/angular/blob/master/CONTRIBUTING.md#type
# https://github.com/angular/angular/blob/main/CONTRIBUTING.md#type
#
#
# Commit Message Body
Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Before you submit your Pull Request (PR) consider the following guidelines:
5. In your forked repository, make your changes in a new git branch:

```shell
git checkout -b my-fix-branch master
git checkout -b my-fix-branch main
```

6. Create your patch, **including appropriate test cases**.
Expand All @@ -117,7 +117,7 @@ Before you submit your Pull Request (PR) consider the following guidelines:
git push origin my-fix-branch
```

11. In GitHub, send a pull request to `angular:master`.
11. In GitHub, send a pull request to `angular:main`.

### Reviewing a Pull Request

Expand Down Expand Up @@ -181,10 +181,10 @@ After your pull request is merged, you can safely delete your branch and pull th
git push origin --delete my-fix-branch
```

* Check out the master branch:
* Check out the main branch:

```shell
git checkout master -f
git checkout main -f
```

* Delete the local branch:
Expand All @@ -193,10 +193,10 @@ After your pull request is merged, you can safely delete your branch and pull th
git branch -D my-fix-branch
```

* Update your master with the latest upstream version:
* Update your local `main` with the latest upstream version:

```shell
git pull --ff upstream master
git pull --ff upstream main
```


Expand Down Expand Up @@ -397,7 +397,7 @@ The following documents can help you sort out issues with GitHub accounts and mu
[coc]: https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
[corporate-cla]: https://cla.developers.google.com/about/google-corporate
[dev-doc]: https://github.com/angular/angular/blob/master/docs/DEVELOPER.md
[dev-doc]: https://github.com/angular/angular/blob/main/docs/DEVELOPER.md
[github]: https://github.com/angular/angular
[discord]: https://discord.gg/angular
[individual-cla]: https://cla.developers.google.com/about/google-individual
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
</p>

<p align="center">
<a href="https://circleci.com/gh/angular/workflows/angular/tree/master">
<img src="https://img.shields.io/circleci/build/github/angular/angular/master.svg?logo=circleci&logoColor=fff&label=CircleCI" alt="CI status" />
<a href="https://circleci.com/gh/angular/workflows/angular/tree/main">
<img src="https://img.shields.io/circleci/build/github/angular/angular/main.svg?logo=circleci&logoColor=fff&label=CircleCI" alt="CI status" />
</a>&nbsp;
<a href="https://www.npmjs.com/@angular/core">
<img src="https://img.shields.io/npm/v/@angular/core.svg?logo=npm&logoColor=fff&label=NPM+package&color=limegreen" alt="Angular on npm" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Assuming you have cloned the repository containing the preview server code (as d
[here](vm-setup--create-docker-image.md)), you can use the `update-preview-server.sh` script on the
VM host to update the preview server based on changes in the source code.

The script will pull the latest changes from the origin's master branch and examine if there have
The script will pull the latest changes from the origin's main branch and examine if there have
been any changes in files inside the preview server source code directory (see below). If there are,
it will create a new image and verify that it works as expected. Finally, it will stop and remove
the old docker container and image, create a new container based on the new image and start it.
Expand Down
4 changes: 2 additions & 2 deletions aio/aio-builds-setup/scripts/update-preview-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ readonly CONTAINER_NAME=aio
readonly lastDeployedCommit=$(git rev-parse HEAD)
echo "Currently at commit $lastDeployedCommit."

# Pull latest master from origin.
git pull origin master
# Pull latest main from origin.
git pull origin main

# Do not update the server unless files inside `aio-builds-setup/` have changed
# or the last attempt failed (identified by the provisional image still being around).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// For more examples:
// https://github.com/angular/angular/blob/master/modules/@angular/router/test/integration.spec.ts
// https://github.com/angular/angular/blob/main/packages/router/test/integration.spec.ts

import { waitForAsync, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';

Expand Down
2 changes: 1 addition & 1 deletion aio/content/examples/universal/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function app() {
const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index';

// #docregion ngExpressEngine
// Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine)
// Our Universal express-engine (found @ https://github.com/angular/universal/tree/main/modules/express-engine)
server.engine('html', ngExpressEngine({
bootstrap: AppServerModule,
}));
Expand Down
4 changes: 2 additions & 2 deletions aio/content/guide/aot-compiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ You can think of `.metadata.json` as a diagram of the overall structure of a dec

<div class="alert is-helpful">

Angular's [schema.ts](https://github.com/angular/angular/blob/master/packages/compiler-cli/src/metadata/schema.ts) describes the JSON format as a collection of TypeScript interfaces.
Angular's [schema.ts](https://github.com/angular/angular/blob/main/packages/compiler-cli/src/metadata/schema.ts) describes the JSON format as a collection of TypeScript interfaces.

</div>

Expand Down Expand Up @@ -389,7 +389,7 @@ export class TypicalModule {}
</code-example>

The Angular [`RouterModule`](api/router/RouterModule) exports two macro static methods, `forRoot` and `forChild`, to help declare root and child routes.
Review the [source code](https://github.com/angular/angular/blob/master/packages/router/src/router_module.ts#L139 "RouterModule.forRoot source code")
Review the [source code](https://github.com/angular/angular/blob/main/packages/router/src/router_module.ts#L139 "RouterModule.forRoot source code")
for these methods to see how macros can simplify configuration of complex [NgModules](guide/ngmodules).

<a id="metadata-rewriting"></a>
Expand Down
2 changes: 1 addition & 1 deletion aio/content/guide/contributors-guide-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The topics in this section cover ways in which you can contribute to the Angular

## Before you begin

Before you get started with your contributions, we recommend that you review [Contributing to Angular](https://github.com/angular/angular/blob/master/CONTRIBUTING.md). That topic explains many of the tasks and guidelines you need to know before you make your first pull request.
Before you get started with your contributions, we recommend that you review [Contributing to Angular](https://github.com/angular/angular/blob/main/CONTRIBUTING.md). That topic explains many of the tasks and guidelines you need to know before you make your first pull request.

## Contributing to Angular

Expand Down
Loading

0 comments on commit 68a6a07

Please sign in to comment.