Skip to content

Commit

Permalink
[ on-call, MB-13659 ] Update branch names in GH actions and Swagger f…
Browse files Browse the repository at this point in the history
…iles and CircleCI config (#9532)

* Updating the branch from `master` to `main`;

Co-Authored-By: Yan Zhao <yan.zhao@truss.works>
Co-Authored-By: Jesse Tamburino <jesset@truss.works>
Co-Authored-By: Chikara Takahashi <chikara@truss.works>

* Removing `master` from Swagger Definitions;

Co-Authored-By: Yan Zhao <yan.zhao@truss.works>

* Generating the swagger files; 🤖

Co-Authored-By: Yan Zhao <yan.zhao@truss.works>

* Updating the generated files; :robot_face:

* Updating all CircleCI;

Co-Authored-By: Andrew Hobson <ahobson@truss.works>
Co-Authored-By: Yan Zhao <yan.zhao@truss.works>

* Additional name changes for master to main

* Remove a rename in a comment that shouldn't have been renamed

* Generate files

Co-authored-by: Yan Zhao <yan.zhao@truss.works>
Co-authored-by: Jesse Tamburino <jesset@truss.works>
Co-authored-by: Chikara Takahashi <chikara@truss.works>
Co-authored-by: Andrew Hobson <ahobson@truss.works>
  • Loading branch information
5 people committed Nov 5, 2022
1 parent 612aa73 commit 5827f2b
Show file tree
Hide file tree
Showing 23 changed files with 65 additions and 65 deletions.
60 changes: 30 additions & 30 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ commands:
- run:
name: Announce failure
command: |
[[ $CIRCLE_BRANCH = master ]] || exit 0
[[ $CIRCLE_BRANCH = main ]] || exit 0
scripts/circleci-announce-broken-branch
when: on_fail

Expand Down Expand Up @@ -1066,11 +1066,11 @@ jobs:
destination: test-results
- store_test_results:
path: ~/transcom/mymove/tmp/test-results
# only save the cache on master builds because we only want to
# change the baseline of test results on master builds
# only save the cache on default branch builds because we only want to
# change the baseline of test results on main builds
- when:
condition:
equal: [master, << pipeline.git.branch >>]
equal: [main, << pipeline.git.branch >>]
steps:
save_cache:
key: server-tests-coverage
Expand Down Expand Up @@ -1107,11 +1107,11 @@ jobs:
destination: coverage
- store_test_results:
path: ~/transcom/mymove
# only save the cache on master builds because we only want to
# change the baseline of test results on master builds
# only save the cache on default branch builds because we only want to
# change the baseline of test results on main builds
- when:
condition:
equal: [master, << pipeline.git.branch >>]
equal: [main, << pipeline.git.branch >>]
steps:
save_cache:
key: client-tests-coverage
Expand Down Expand Up @@ -1244,11 +1244,11 @@ jobs:
keys:
- v2-node-modules-cache-{{ checksum "yarn.lock" }}
- run: make client_build
# only save the cache on master builds so that PRs don't pollute
# only save the cache on default branch builds so that PRs don't pollute
# the cache
- when:
condition:
equal: [master, << pipeline.git.branch >>]
equal: [main, << pipeline.git.branch >>]
steps:
save_cache:
key: v2-node-modules-cache-{{ checksum "yarn.lock" }}
Expand Down Expand Up @@ -1611,7 +1611,7 @@ jobs:
steps:
- checkout
- run:
name: Halt workflow to prevent old master deploying to staging
name: Halt workflow to prevent old default branch deploying to staging
command: scripts/compare-deployed-commit my.stg.move.mil $CIRCLE_SHA1

# `deploy_stg_migrations` deploys migrations to the stg environment
Expand Down Expand Up @@ -1750,7 +1750,7 @@ workflows:
- anti_virus:
filters:
branches:
only: master
only: main

- pre_test:
requires:
Expand Down Expand Up @@ -2024,28 +2024,28 @@ workflows:
- build_app
filters:
branches:
only: master
only: main

- push_migrations_stg:
requires:
- build_migrations
filters:
branches:
only: master
only: main

- push_tasks_stg:
requires:
- build_tasks
filters:
branches:
only: master
only: main

- push_webhook_client_stg:
requires:
- build_webhook_client
filters:
branches:
only: master
only: main

- check_circle_against_stg_sha:
requires:
Expand All @@ -2063,42 +2063,42 @@ workflows:
- integration_tests_mtls
filters:
branches:
only: master
only: main

- deploy_stg_migrations:
requires:
- check_circle_against_stg_sha
filters:
branches:
only: master
only: main

- deploy_stg_tasks:
requires:
- deploy_stg_migrations
filters:
branches:
only: master
only: main

- deploy_stg_app:
requires:
- deploy_stg_migrations
filters:
branches:
only: master
only: main

- deploy_stg_app_client_tls:
requires:
- deploy_stg_migrations
filters:
branches:
only: master
only: main

- deploy_stg_webhook_client:
requires:
- deploy_stg_migrations
filters:
branches:
only: master
only: main

- approve_prd_deploy:
type: approval
Expand All @@ -2113,7 +2113,7 @@ workflows:
- build_storybook
filters:
branches:
only: master
only: main

- build_storybook:
requires:
Expand All @@ -2125,21 +2125,21 @@ workflows:
- approve_prd_deploy
filters:
branches:
only: master
only: main

- push_migrations_prd:
requires:
- approve_prd_deploy
filters:
branches:
only: master
only: main

- push_tasks_prd:
requires:
- approve_prd_deploy
filters:
branches:
only: master
only: main

- deploy_prd_migrations:
requires:
Expand All @@ -2148,34 +2148,34 @@ workflows:
- push_tasks_prd
filters:
branches:
only: master
only: main

- deploy_prd_tasks:
requires:
- deploy_prd_migrations
- push_tasks_prd
filters:
branches:
only: master
only: main

- deploy_prd_app:
requires:
- deploy_prd_migrations
- push_app_prd
filters:
branches:
only: master
only: main

- deploy_prd_app_client_tls:
requires:
- deploy_prd_migrations
- push_app_prd
filters:
branches:
only: master
only: main

experimental:
notify:
branches:
only:
- master
- main
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ These are to be checked by a reviewer.

- [ ] User facing changes have been reviewed by design.
- [ ] There are no aXe warnings for UI.
- [ ] This works in [Supported Browsers and their phone views](https://github.com/transcom/mymove/tree/master/docs/adr/0016-Browser-Support.md) (Chrome, Firefox, IE, Edge).
- [ ] This works in [Supported Browsers and their phone views](https://github.com/transcom/mymove/tree/main/docs/adr/0016-Browser-Support.md) (Chrome, Firefox, IE, Edge).
- [ ] There are no new console errors in the browser devtools
- [ ] There are no new console errors in the test output
- [ ] If this PR adds a new component to Storybook, it ensures the component is fully responsive, OR if it is intentionally not, a wrapping div using the `officeApp` class or custom `min-width` styling is used to hide any states the would not be visible to the user.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/analyze-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: F/E bundle diff
on:
pull_request_target:
branches:
- master
- main

jobs:
changes:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/front-end-linter.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
on:
push:
branches: [master]
branches: [main]
pull_request:
branches: [master]
branches: [main]

jobs:
run-linters:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/happo-tests-master.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Happo CI (master)
name: Happo CI (main)

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

jobs:
happo:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/happo-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Happo CI

on:
pull_request:
branches: [master]
branches: [main]

jobs:
changes:
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to MyMove

Anyone is welcome to contribute code changes and additions to this project. If you'd like your changes merged into the master branch, please read the following document before opening a [pull request][pulls].
Anyone is welcome to contribute code changes and additions to this project. If you'd like your changes merged into the main branch, please read the following document before opening a [pull request][pulls].

There are several ways in which you can help improve this project:

Expand All @@ -23,7 +23,7 @@ See our [Development Setup](https://github.com/transcom/mymove#development)

1. Fork and clone the project's repo.
1. Install development dependencies as outlined above.
1. Create a feature branch for the code changes you're looking to make: `git checkout -b your-descriptive-branch-name origin/master`.
1. Create a feature branch for the code changes you're looking to make: `git checkout -b your-descriptive-branch-name origin/main`.
1. _Write some code!_
1. Run the application and verify that your changes function as intended: `something`.
1. If your changes would benefit from testing, add the necessary tests and verify everything passes by running `something`.
Expand All @@ -47,7 +47,7 @@ Before submitting a pull request to this repository for the first time, you'll n

You may submit contributions anonymously or under a pseudonym if you'd like, but we need to be able to reach you at the email address you provide when agreeing to the DCO. Contributions you make to this public Department of Defense repository are completely voluntary. When you submit a pull request, you're offering your contribution without expectation of payment and you expressly waive any future pay claims against the U.S. Federal Government related to your contribution.

[contributors]: https://github.com/transcom/mymove/blob/master/CONTRIBUTORS.md
[contributors]: https://github.com/transcom/mymove/blob/main/CONTRIBUTORS.md
[issues]: https://github.com/transcom/mymove/issues
[license]: https://github.com/transcom/mymove/blob/master/LICENSE.txt
[license]: https://github.com/transcom/mymove/blob/main/LICENSE.txt
[pulls]: https://github.com/transcom/mymove/pulls
2 changes: 1 addition & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

If you're a U.S. Federal Government employee and use a `*.mil` or `*.gov` email address to agree to the DCO, we interpret your signed DCO to mean that the contribution was created in whole or in part by you as part of your job with the U.S. Federal Government and that your contribution is not subject to copyright protections.

[license]: https://github.com/transcom/mymove/blob/master/LICENSE.md
[license]: https://github.com/transcom/mymove/blob/main/LICENSE.md
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Personal Property Prototype

[![CircleCI](https://circleci.com/gh/transcom/mymove/tree/master.svg?style=shield&circle-token=8782cc55afd824ba48e89fc4e49b466c5e2ce7b1)](https://circleci.com/gh/transcom/mymove/tree/master)
[![CircleCI](https://circleci.com/gh/transcom/mymove/tree/main.svg?style=shield&circle-token=8782cc55afd824ba48e89fc4e49b466c5e2ce7b1)](https://circleci.com/gh/transcom/mymove/tree/main)

[![GoDoc](https://godoc.org/github.com/transcom/mymove?status.svg)](https://godoc.org/github.com/transcom/mymove)

Expand Down Expand Up @@ -224,7 +224,7 @@ You will then find the code at `~/Projects/mymove`.
#### Setup: Editor Config

[EditorConfig](http://editorconfig.org/) allows us to manage editor configuration (like indent sizes) with a
[file](https://github.com/transcom/ppp/blob/master/.editorconfig) in the repo. Install the appropriate plugin in your
[file](https://github.com/transcom/ppp/blob/main/.editorconfig) in the repo. Install the appropriate plugin in your
editor to take advantage of that if you wish.

### Setup: Nix
Expand Down Expand Up @@ -720,7 +720,7 @@ This background job is built as a separate binary which can be built using `make
When creating new features, it is helpful to have sample data for the feature to interact with. The TSP Award Queue is an example of that--it matches shipments to TSPs, and it's hard to tell if it's working without some shipments and TSPs in the database!

* `make bin/generate-test-data` will build the fake data generator binary
* `bin/generate-test-data --named-scenario="dev_seed"` will populate the development database with a handful of users in various stages of progress along the flow. The emails are named accordingly (see [`devseed.go`](https://github.com/transcom/mymove/blob/master/pkg/testdatagen/scenario/devseed.go)). Alternatively, run `make db_dev_e2e_populate` to reset your db and populate it.
* `bin/generate-test-data --named-scenario="dev_seed"` will populate the development database with a handful of users in various stages of progress along the flow. The emails are named accordingly (see [`devseed.go`](https://github.com/transcom/mymove/blob/main/pkg/testdatagen/scenario/devseed.go)). Alternatively, run `make db_dev_e2e_populate` to reset your db and populate it.
* `bin/generate-test-data` will run binary and create a preconfigured set of test data. To determine the data scenario you'd like to use, check out scenarios in the `testdatagen` package. Each scenario contains a description of what data will be created when the scenario is run. Pass the scenario in as a flag to the generate-test-data function. A sample command: `./bin/generate-test-data --scenario=2`.
There is also a package (`/pkg/testdatagen`) that can be imported to create arbitrary test data. This could be used in tests, so as not to duplicate functionality.
Expand Down Expand Up @@ -956,7 +956,7 @@ To get Goland to play nicely with `nix`, there's a few things you can set up:
We use [Storybook](https://storybook.js.org) for reviewing our
component library. The current components are deployed to
[https://storybook.dp3.us](https://storybook.dp3.us) after each build
of the master branch.
of the main branch.
Each PR saves storybook as an artifact in CircleCI. Find the
`build_storybook` task and then go to the "ARTIFACTS" tab. Find the
Expand Down
4 changes: 2 additions & 2 deletions cmd/generate-deploy-notes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (p *Pipelines) Fetch(pageToken string) {
if pageToken != "" {
q.Add("page-token", pageToken)
} else {
q.Add("branch", "master")
q.Add("branch", "main")
}
req.URL.RawQuery = q.Encode()
resp, err := client.Do(req)
Expand Down Expand Up @@ -207,7 +207,7 @@ func main() {
before := commit2.Commit.Author.Date.Add(1 * time.Minute).Format(time.RFC3339)
after := commit.Commit.Author.Date.Add(1 * time.Minute).Format(time.RFC3339)

issues, _, err := ghClient.Search.Issues(ctx, fmt.Sprintf("repo:transcom/mymove is:pr is:closed base:master merged:%s..%s sort:updated-asc", after, before), nil)
issues, _, err := ghClient.Search.Issues(ctx, fmt.Sprintf("repo:transcom/mymove is:pr is:closed base:main merged:%s..%s sort:updated-asc", after, before), nil)
if err != nil {
var githubError *github.ErrorResponse

Expand Down
4 changes: 2 additions & 2 deletions dangerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ const fileChecks = () => {
fail(`New files have been created under one of the legacy directories
(src/shared or src/scenes). Please relocate them according to the file structure described [here](https://transcom.github.io/mymove-docs/docs/dev/contributing/frontend/frontend#file-layout--naming).
View the [frontend file org ADR](https://github.com/transcom/mymove/blob/master/docs/adr/0048-frontend-file-org.md) for more information`);
View the [frontend file org ADR](https://github.com/transcom/mymove/blob/main/docs/adr/0048-frontend-file-org.md) for more information`);
}

if (legacyFiles.modified) {
warn(`Files located in legacy directories (src/shared or src/scenes) have
been edited. Are you sure you don’t want to also relocate them to the new [file structure](https://transcom.github.io/mymove-docs/docs/dev/contributing/frontend/frontend#file-layout--naming)?
View the [frontend file org ADR](https://github.com/transcom/mymove/blob/master/docs/adr/0048-frontend-file-org.md) for more information`);
View the [frontend file org ADR](https://github.com/transcom/mymove/blob/main/docs/adr/0048-frontend-file-org.md) for more information`);
}

// Request changes to app code to also include changes to tests.
Expand Down
2 changes: 1 addition & 1 deletion pkg/gen/adminapi/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5827f2b

Please sign in to comment.