From 986a9ed47e31dcb6c96fc9cc740639c6508da2f5 Mon Sep 17 00:00:00 2001 From: Lia Keston <57373296+lmkeston@users.noreply.github.com> Date: Thu, 3 Dec 2020 10:29:55 -0500 Subject: [PATCH 01/11] update "master" to "main" --- config.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/config.yml b/config.yml index 8acc16e..06071e9 100644 --- a/config.yml +++ b/config.yml @@ -10,7 +10,7 @@ template: repo: using-github-actions-for-ci-template name: github-actions-for-ci before: - # 1. Bot creates [Tic tac toe game](https://github.com/githubtraining/actions-template) for the learner, protects master branch + # 1. Bot creates [Tic tac toe game](https://github.com/githubtraining/actions-template) for the learner, protects main branch # 1. Bot opens a bug report explaining the app is broken, asks learner to figure out what's wrong by adding some testing. - type: updateBranchProtection - type: createIssue @@ -32,7 +32,7 @@ before: steps: # Step 1 - # 1. Learner opens a PR with a new workflow by using the [templated workflow for Node](https://github.com/actions/starter-workflows/blob/master/ci/node.js.yml) + # 1. Learner opens a PR with a new workflow by using the [templated workflow for Node](https://github.com/actions/starter-workflows/blob/main/ci/node.js.yml) # 1. Bot leaves line-specific comments explaining the pieces that were just added from the templated workflow. - title: Use a templated workflow description: Create a pull request with a templated workflow @@ -88,7 +88,7 @@ steps: # Step 2 # 1. GitHub sends us a workflow run. - # 1. Bot explains what is happening, and why the page build failed (we don't have a [test script](https://github.com/githubtraining/actions-template/blob/master/package.json#L10)) + # 1. Bot explains what is happening, and why the page build failed (we don't have a [test script](https://github.com/githubtraining/actions-template/blob/main/package.json#L10)) - title: Run a templated workflow description: Wait for GitHub to run the templated workflow and report back the results event: check_suite.completed @@ -216,7 +216,7 @@ steps: body: 06_custom-workflow.md action_id: newIssue data: - workflowUrl: "%payload.repository.html_url%/edit/master/.github/workflows/node.js.yml" + workflowUrl: "%payload.repository.html_url%/edit/main/.github/workflows/node.js.yml" store: workflow_issue_url: "{{ result.data.html_url }}" - type: respond @@ -225,7 +225,7 @@ steps: url: "%actions.newIssue.data.html_url%" # Step 7 - # 1. Learner edits the first workflow changing from templated [Node v8,10,12 to just v8,10](https://github.com/githubtraining/actions-template/blob/master/.github/workflows/node.js.yml#L10). + # 1. Learner edits the first workflow changing from templated [Node v8,10,12 to just v8,10](https://github.com/githubtraining/actions-template/blob/main/.github/workflows/node.js.yml#L10). # 1. Bot asks learner to add a build for Windows - title: Create a custom GitHub Actions workflow description: Edit the existing workflow with new build targets @@ -271,7 +271,7 @@ steps: node_version_pr: "{{ payload.pull_request.html_url }}" # Step 8 - # 1. Learner adds Windows to the [matrix os](https://github.com/githubtraining/actions-template/blob/master/.github/workflows/node.js.yml#L9) + # 1. Learner adds Windows to the [matrix os](https://github.com/githubtraining/actions-template/blob/main/.github/workflows/node.js.yml#L9) # 1. Bot asks learner to add a new job for testing, and separate out the test script into that new job. - title: Target a Windows environment description: Edit your workflow file to build for Windows environments @@ -407,7 +407,7 @@ steps: operator: === right: Improve CI - type: mergeBranch - head: master + head: main base: team-workflow - type: createPullRequest title: A custom workflow @@ -516,7 +516,7 @@ steps: - type: removeBranchProtection - type: requestReviewFromRegistrant - type: respond - with: 17_protect-master.md + with: 17_protect-main.md data: settingsUrl: "%payload.repository.html_url%/settings" approvalUrl: "%payload.pull_request.html_url%/files#submit-review" @@ -529,7 +529,7 @@ steps: # 1. Bot merges PR. # 1. Bot turns on pages build, drops link in the PR, explains to the learner the value on a workflow that enforces team behaviors. - title: Use branch protections - description: Complete the automated review process by protecting the master branch + description: Complete the automated review process by protecting the main branch link: "{{ store.workflow_pr_url }}" event: - pull_request_review.submitted @@ -548,7 +548,7 @@ steps: method: repos.getBranch owner: "%payload.repository.owner.login%" repo: "%payload.repository.name%" - branch: master + branch: main action_id: branchProtection - type: gate left: "%actions.branchProtection.data.protected%" From dc79e6a2820bf8f84a8c7758a5222f1a23587241 Mon Sep 17 00:00:00 2001 From: Lia Keston <57373296+lmkeston@users.noreply.github.com> Date: Thu, 3 Dec 2020 10:33:06 -0500 Subject: [PATCH 02/11] update "master" to "main" --- responses/06_custom-workflow.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/responses/06_custom-workflow.md b/responses/06_custom-workflow.md index c320c6c..ef04e59 100644 --- a/responses/06_custom-workflow.md +++ b/responses/06_custom-workflow.md @@ -14,7 +14,7 @@ Our fictional team has a custom workflow that goes beyond the template we've use **Access to build artifacts** so that we can deploy them to a target environment icon of a security shield indicating branch protections
-**Branch protections** so that the `master` branch can't be deleted or inadvertently broken +**Branch protections** so that the `main` branch can't be deleted or inadvertently broken icon of a review approval
**Required reviews** so that any pull requests are double checked by teammates From ffd35d114b995caa0c36be9f3caa719187e63a06 Mon Sep 17 00:00:00 2001 From: Lia Keston <57373296+lmkeston@users.noreply.github.com> Date: Thu, 3 Dec 2020 10:35:40 -0500 Subject: [PATCH 03/11] update "master" to "main" --- responses/10_use-upload.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/responses/10_use-upload.md b/responses/10_use-upload.md index ad14c83..ed26547 100644 --- a/responses/10_use-upload.md +++ b/responses/10_use-upload.md @@ -29,7 +29,7 @@ _You can follow the manual steps below, or accept the suggestion in the followin run: | npm install npm run build - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@main with: name: webpack artifacts path: public/ From aa8284eab5e4c26935c816339c2a3fbadaa26be6 Mon Sep 17 00:00:00 2001 From: Lia Keston <57373296+lmkeston@users.noreply.github.com> Date: Thu, 3 Dec 2020 10:36:08 -0500 Subject: [PATCH 04/11] update "master" to "main" --- responses/11_download-suggestion.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/responses/11_download-suggestion.md b/responses/11_download-suggestion.md index 5228688..718786a 100644 --- a/responses/11_download-suggestion.md +++ b/responses/11_download-suggestion.md @@ -1,9 +1,9 @@ You can commit this suggestion directly. ```suggestion - - uses: actions/download-artifact@master + - uses: actions/download-artifact@main with: name: webpack artifacts path: public - name: npm install, and test -``` \ No newline at end of file +``` From 4c7aeb1af9d3928d633ce9386d1be8cc37a20bc8 Mon Sep 17 00:00:00 2001 From: Lia Keston <57373296+lmkeston@users.noreply.github.com> Date: Thu, 3 Dec 2020 10:36:55 -0500 Subject: [PATCH 05/11] update "master" to "main" --- responses/11_use-download.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/responses/11_use-download.md b/responses/11_use-download.md index c971b02..de5152d 100644 --- a/responses/11_use-download.md +++ b/responses/11_use-download.md @@ -32,7 +32,7 @@ _You can follow the manual steps below, or accept the suggestions in the followi ... steps: - uses: actions/checkout@v2 - - uses: actions/download-artifact@master + - uses: actions/download-artifact@main with: name: webpack artifacts path: public From f717c444bd87e4b79dc49c0efa3101aac472f48d Mon Sep 17 00:00:00 2001 From: Lia Keston <57373296+lmkeston@users.noreply.github.com> Date: Thu, 3 Dec 2020 10:37:49 -0500 Subject: [PATCH 06/11] update "master" to "main" --- responses/12_merge-improved-ci.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/responses/12_merge-improved-ci.md b/responses/12_merge-improved-ci.md index 09c2442..108b1a7 100644 --- a/responses/12_merge-improved-ci.md +++ b/responses/12_merge-improved-ci.md @@ -16,8 +16,8 @@ Our custom workflow now accounts for: ---- In the next few steps, we'll finish supporting our team's workflow: -- **branch protections** so that the `master` branch can't be deleted or inadvertently broken +- **branch protections** so that the `main` branch can't be deleted or inadvertently broken - **required reviews** so that any pull requests are double checked by teammates - **obvious approvals** so we can merge quickly and potentially automate merges and deployments -I'll respond when you merge this pull request. \ No newline at end of file +I'll respond when you merge this pull request. From c1076b1c2276138a50e506412b4a28f9c90c89ed Mon Sep 17 00:00:00 2001 From: Lia Keston <57373296+lmkeston@users.noreply.github.com> Date: Thu, 3 Dec 2020 10:38:12 -0500 Subject: [PATCH 07/11] update "master" to "main" --- responses/13_partial-workflow.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/responses/13_partial-workflow.md b/responses/13_partial-workflow.md index a9bd7ef..351200e 100644 --- a/responses/13_partial-workflow.md +++ b/responses/13_partial-workflow.md @@ -5,7 +5,7 @@ Remember the [custom workflow]({{ workflowIssue }}) we are attempting to create - :white_check_mark: **test against multiple targets** so that we know if our supported operating systems and Node.js versions are working - :white_check_mark: **dedicated test job** so that we can separate out build from test details - :white_check_mark: **access to build artifacts** so that we can deploy them to a target environment -- **branch protections** so that the `master` branch can't be deleted or inadvertently broken +- **branch protections** so that the `main` branch can't be deleted or inadvertently broken - **required reviews** so that any pull requests are double checked by teammates - **obvious approvals** so we can merge quickly and potentially automate merges and deployments @@ -23,4 +23,4 @@ GitHub Actions can run multiple workflows for different event triggers. Let's cr name: Team awesome's approval workflow ``` -I'll respond when you commit to this branch. \ No newline at end of file +I'll respond when you commit to this branch. From 4af7c36113600d29b29ac75011feeef380203d61 Mon Sep 17 00:00:00 2001 From: Lia Keston <57373296+lmkeston@users.noreply.github.com> Date: Thu, 3 Dec 2020 10:39:33 -0500 Subject: [PATCH 08/11] update "master" to "main" --- responses/17_add-step-suggestion.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/responses/17_add-step-suggestion.md b/responses/17_add-step-suggestion.md index 3d899b4..9152a72 100644 --- a/responses/17_add-step-suggestion.md +++ b/responses/17_add-step-suggestion.md @@ -1,15 +1,15 @@ ### Step 17: Hint 1. Edit the [workflow file]({{ editUrl }}) on this branch. -1. Give your step a name, have it use `pullreminders/label-when-approved-action@master`, and set all the required environment variables. +1. Give your step a name, have it use `pullreminders/label-when-approved-action@main`, and set all the required environment variables. ```suggestion runs-on: ubuntu-latest steps: - name: Label when approved - uses: pullreminders/label-when-approved-action@master + uses: pullreminders/label-when-approved-action@main env: APPROVALS: "1" GITHUB_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} ADD_LABEL: "approved" ``` -1. Commit your changes to this branch. \ No newline at end of file +1. Commit your changes to this branch. From e8a25b7432414467f03510444e127e0e3d978cd9 Mon Sep 17 00:00:00 2001 From: Lia Keston <57373296+lmkeston@users.noreply.github.com> Date: Thu, 3 Dec 2020 10:40:09 -0500 Subject: [PATCH 09/11] update "master" to "main" --- responses/17_protect-master.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/responses/17_protect-master.md b/responses/17_protect-master.md index 5de585b..8d69807 100644 --- a/responses/17_protect-master.md +++ b/responses/17_protect-master.md @@ -6,7 +6,7 @@ Awesome! We can now check an additional requirement off our list! - :white_check_mark: **dedicated test job** so that we can separate out build from test details - :white_check_mark: **access to build artifacts** so that we can deploy them to a target environment - :white_check_mark: **obvious approvals** so we can merge quickly and potentially automate merges and deployments -- **branch protections** so that the `master` branch can't be deleted or inadvertently broken +- **branch protections** so that the `main` branch can't be deleted or inadvertently broken - **required reviews** so that any pull requests are double checked by teammates We'll now use branch protections in combination with this change so that everything goes smoothly. Up until now, I've handled branch protections for you, but I've removed them so that you can learn how to set them. @@ -21,11 +21,11 @@ Protected branches ensure that collaborators on your repository cannot make irre Next, add branch protections and continue with the course. -### :keyboard: Activity: Complete the automated review process by protecting the master branch +### :keyboard: Activity: Complete the automated review process by protecting the main branch 1. Go to [**Branches**]({{ settingsUrl}}/branches) settings. You can navigate to that page manually by clicking on the right-most tab in the top of the repository called **Settings** and then clicking on **Branches**. 2. Click on [**Add rule**]({{ settingsUrl }}/branch_protection_rules/new) under "Branch protection rules". -3. Type `master` in **Branch name pattern**. +3. Type `main` in **Branch name pattern**. 4. Check **Require pull request reviews before merging**. 5. Check **Require status checks to pass before merging**. 6. Check all build and test jobs that you'd like to see in the newly visible gray box. From 4f74915eed0a3430ba0502f58fa331d4469349c5 Mon Sep 17 00:00:00 2001 From: Lia Keston <57373296+lmkeston@users.noreply.github.com> Date: Thu, 3 Dec 2020 10:40:46 -0500 Subject: [PATCH 10/11] update "master" to "main" --- responses/18_congratulations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/responses/18_congratulations.md b/responses/18_congratulations.md index aedf0b9..d36ec6d 100644 --- a/responses/18_congratulations.md +++ b/responses/18_congratulations.md @@ -5,7 +5,7 @@ Nice work, you did it! Your workflows now contain: - :white_check_mark: **test against multiple targets** so that we know if our supported operating systems and Node.js versions are working - :white_check_mark: **dedicated test job** so that we can separate out build from test details - :white_check_mark: **access to build artifacts** so that we can deploy them to a target environment -- :white_check_mark: **branch protections** so that the `master` branch can't be deleted or inadvertently broken +- :white_check_mark: **branch protections** so that the `main` branch can't be deleted or inadvertently broken - :white_check_mark: **required reviews** so that any pull requests are double checked by teammates - :white_check_mark: **obvious approvals** so we can merge quickly and potentially automate merges and deployments From 6d59f98400451ad5b757a5c9ef073790e5a22915 Mon Sep 17 00:00:00 2001 From: Lia Keston <57373296+lmkeston@users.noreply.github.com> Date: Thu, 3 Dec 2020 10:42:36 -0500 Subject: [PATCH 11/11] Rename 17_protect-master.md to 17_protect-main.md --- responses/{17_protect-master.md => 17_protect-main.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename responses/{17_protect-master.md => 17_protect-main.md} (100%) diff --git a/responses/17_protect-master.md b/responses/17_protect-main.md similarity index 100% rename from responses/17_protect-master.md rename to responses/17_protect-main.md