Skip to content

Commit

Permalink
chore: reference main branch name (#1967)
Browse files Browse the repository at this point in the history
  • Loading branch information
thecristen authored Apr 8, 2024
1 parent 4de3311 commit f1e511b
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/crawler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

workflow_run:
workflows:
- "Deploy: master branch"
- "Deploy: main branch"
types:
- completed

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy-auto.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Deploy to dev on merge or push into master
name: "Deploy: master branch"
# Deploy to dev on merge or push into main
name: "Deploy: main branch"

on:
push:
branches: [master]
branches: [main]

concurrency:
group: dev
Expand All @@ -27,6 +27,6 @@ jobs:
with:
job-status: ${{ needs.auto.result }}
success-message: |
:ballot_box_with_check: `dev` updated to latest commit on master
:ballot_box_with_check: `dev` updated to latest commit on main
failure-message: |
:ballot_box_with_check: `dev` not updated to latest commit on master
:ballot_box_with_check: `dev` not updated to latest commit on main
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI
on:
push:
branches: [master]
branches: [main]
pull_request:
# Don't bother running if it's just a script or docs change
paths-ignore:
Expand All @@ -27,7 +27,7 @@ jobs:
name: File changes
uses: ./.github/workflows/changed-files.yml
with:
# If it's a Dependabot PR, or a push to master, we want to run every test
# If it's a Dependabot PR, or a push to main, we want to run every test
force: ${{ github.event_name == 'push' || contains(github.head_ref, 'dependabot/hex') || contains(github.head_ref, 'dependabot/npm_and_yarn') }}

build_app:
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-all
- run: git fetch origin master:master
- run: git fetch origin main:main
- run: npm run ci:lint:ex

elixir_unit:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![](https://github.com/mbta/dotcom/actions/workflows/tests.yml/badge.svg?branch=master)
![](https://github.com/mbta/dotcom/actions/workflows/tests.yml/badge.svg?branch=main)
![](https://github.com/mbta/dotcom/actions/workflows/deploy-prod.yml/badge.svg)
![](https://github.com/mbta/dotcom/actions/workflows/deploy-dev.yml/badge.svg)
![](https://github.com/mbta/dotcom/actions/workflows/deploy-dev-blue.yml/badge.svg)
Expand Down
2 changes: 1 addition & 1 deletion assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
},
"scripts": {
"preinstall": "npm install --package-lock-only --ignore-scripts && npx force-resolutions",
"eslint:js": "git diff --name-only --diff-filter=dx origin/master... | grep js/.*\\.js | awk -F/js '{print \"js\"$2}' | xargs eslint -c .eslintrc.js",
"eslint:js": "git diff --name-only --diff-filter=dx origin/main... | grep js/.*\\.js | awk -F/js '{print \"js\"$2}' | xargs eslint -c .eslintrc.js",
"eslint:js:fix": "npm run eslint:js -- --fix",
"eslint:ts": "cd ts && eslint -c .eslintrc.js --ext .ts,.tsx --max-warnings=0 .",
"eslint:ts:fix": "cd ts && eslint -c .eslintrc.js --ext .ts,.tsx --fix .",
Expand Down
2 changes: 1 addition & 1 deletion docs/DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
This can be done on GitHub Actions via the following:

- Create a tag following this format
- Pull the latest master locally
- Pull the latest main locally
- Create a tag `git tag year.month.day.release_number` (ex. `2023.12.18.01`)
- Push the tag `git push origin --tags`
- [Create a release](https://github.com/mbta/dotcom/releases). Select a relevant tag, follow the naming convention, click "generate release notes", and publish. This will trigger the [Deploy: release](.github/workflows/deploy-release.yml) workflow that will kick off a deploy to production.
Expand Down
4 changes: 2 additions & 2 deletions docs/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Each test can be run locally by invoking the corresponding NPM script. All the t
```sh
npm run ci:lint:js
# cd assets
# git diff --name-only --diff-filter=dx origin/master... | grep js/.*\\.js | xargs npx eslint -c .eslintrc.js
# git diff --name-only --diff-filter=dx origin/main... | grep js/.*\\.js | xargs npx eslint -c .eslintrc.js
```
*Runs only if a file with the `.js` extension was changed.*

Expand All @@ -40,7 +40,7 @@ Each test can be run locally by invoking the corresponding NPM script. All the t
### Linting / Elixir
```sh
npm run ci:lint:ex
# mix credo diff master -a
# mix credo diff main -a
```
*Runs only if a file with the `.ex` or `.exs` extension was changed.*

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"ci:lint:ts": "npm run --prefix assets eslint:ts",
"ci:lint:js": "npm run --prefix assets eslint:js",
"ci:lint:scss": "npm run --prefix assets stylelint -- css/**/*.scss",
"ci:lint:ex": "mix credo diff master -a",
"ci:lint:ex": "mix credo diff main -a",
"ci:unit:exunit": "mix coveralls.html",
"ci:unit:mocha": "npm run --prefix assets mocha",
"ci:unit:jest": "npm run --prefix assets jest",
Expand Down

0 comments on commit f1e511b

Please sign in to comment.