Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #39 from githubtraining/update-branch-name
Browse files Browse the repository at this point in the history
change "master" to "main"
  • Loading branch information
lmkeston authored Dec 1, 2020
2 parents 1a4de86 + 134d10a commit 6024559
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ steps:
- type: gate
left: "%payload.pull_request.base.ref%"
operator: ===
right: master
right: main
- type: closeIssue
issue: Welcome
action_id: prev
Expand Down Expand Up @@ -153,7 +153,7 @@ steps:
- type: gate
left: "%payload.pull_request.base.ref%"
operator: ===
right: master
right: main
- type: gate
left: "%payload.action%"
operator: "!=="
Expand Down Expand Up @@ -244,7 +244,7 @@ steps:
- type: gate
left: "%payload.pull_request.base.ref%"
operator: ===
right: master
right: main
- type: gate
left: "%payload.action%"
operator: "!=="
Expand Down Expand Up @@ -323,7 +323,7 @@ steps:
- type: gate
left: "%payload.pull_request.merged%"
- type: mergeBranch
head: master
head: main
base: add-style
- type: createPullRequest
title: Add some style to your page
Expand Down
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async function mergeHandler (context, yes, no) {
module.exports = course => {
course.before(async context => {
await context.github.repos.updateBranchProtection(context.repo({
branch: 'master',
branch: 'main',
required_status_checks: null,
enforce_admins: true,
required_pull_request_reviews: {},
Expand Down Expand Up @@ -257,7 +257,7 @@ module.exports = course => {
course.log(`New blob after replacement: ${newBlob}`)

// await context.github.repos.removeBranchProtection(context.repo({
// branch: 'master'
// branch: 'main'
// }))

const rootTree = await context.github.gitdata.getTree(context.repo({
Expand All @@ -273,11 +273,11 @@ module.exports = course => {
const encodedBlob = Buffer.from(newBlob).toString('base64')

await context.github.repos.removeBranchProtection(context.repo({
branch: 'master'
branch: 'main'
}))

await context.github.repos.merge(context.repo({
base: 'master',
base: 'main',
head: 'add-style'
}))

Expand Down
2 changes: 1 addition & 1 deletion responses/00-openapr.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ It's not very special looking yet, is it? Web hosts (and GitHub Pages) look for

To help you get started, I have already created an `index.html` file for you on a branch called: `add-index`. All you need to do is create the pull request. Don't worry, I'll help you!

1. Create a pull request. You can either [use this direct link]({{ repoUrl }}/compare/master...add-index?expand=1), or go to the **Code** tab, click on **New Pull Request**, select **base: master**, and **compare: add-index**.
1. Create a pull request. You can either [use this direct link]({{ repoUrl }}/compare/main...add-index?expand=1), or go to the **Code** tab, click on **New Pull Request**, select **base: main**, and **compare: add-index**.
2. Add a descriptive title to your pull request, something like "Add the index.html file".
3. Add a descriptive body to your pull request.
4. Click **Create pull request**.
Expand Down
2 changes: 1 addition & 1 deletion responses/01-welcome.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ It isn't enough to simply create a webpage on GitHub. You must deploy your webpa
## :keyboard: Activity: Turn on GitHub Pages

1. Under your repository name, click [**Settings**]({{ repoUrl }}/settings).
1. In the **GitHub Pages** section, use the **Select source** drop-down menu to select `master` as your GitHub Pages publishing source.
1. In the **GitHub Pages** section, use the **Select source** drop-down menu to select `main` as your GitHub Pages publishing source.
1. Return to this issue.

> _I may take up to a minute to respond as I wait for GitHub Pages to create a deployment of your repository. If you don't see anything after a minute, refresh this page_.
Expand Down
2 changes: 1 addition & 1 deletion responses/05-h1-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Headers create prominent text in the body of your web page. Headers come in diff
### :keyboard: Create a header for your web page


1. Edit the `index.html` file in your master branch by [using this direct link]({{ repoUrl }}/edit/master/index.html) or going to the **Code** tab, clicking on the `index.html` file, clicking the pencil :pencil: to edit the HTML.
1. Edit the `index.html` file in your main branch by [using this direct link]({{ repoUrl }}/edit/main/index.html) or going to the **Code** tab, clicking on the `index.html` file, clicking the pencil :pencil: to edit the HTML.
2. Between the body tags, add an opening `<h1>` tag, some content for the header, and a closing `</h1>` tag.
3. In the _Commit changes_ section, enter a commit message that describes what you've done.
4. Ensure you've selected _Create a new branch for this commit and start a pull request_.
Expand Down
2 changes: 1 addition & 1 deletion responses/08-create-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ For the next exercise, you are going to create a list of your favorite websites.

### :keyboard: Activity: Create a list of your favorite sites

1. Edit the `index.html` file in your master branch by [using this direct link]({{ repoUrl }}/edit/master/index.html) or going to the **Code** tab, clicking on the `index.html` file, clicking the pencil :pencil: to edit the HTML.
1. Edit the `index.html` file in your main branch by [using this direct link]({{ repoUrl }}/edit/main/index.html) or going to the **Code** tab, clicking on the `index.html` file, clicking the pencil :pencil: to edit the HTML.
1. Inside the body tag, create a list, either ordered or unordered, of your favorite sites on the internet.
1. In the _Commit changes_ section, enter a commit message that describes what you've done.
1. Ensure you've selected _Create a new branch for this commit and start a pull request_.
Expand Down
4 changes: 2 additions & 2 deletions responses/08e-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Let's try again!

### :keyboard: Create a list of your favorite sites

1. Edit the `index.html` file in your master branch by [using this direct link](https://github.com/{{ user.username }}/{{ repo }}/edit/master/index.html) or going to the **Code** tab, clicking on the `index.html` file, clicking the pencil :pencil: to edit the HTML.
1. Edit the `index.html` file in your main branch by [using this direct link](https://github.com/{{ user.username }}/{{ repo }}/edit/main/index.html) or going to the **Code** tab, clicking on the `index.html` file, clicking the pencil :pencil: to edit the HTML.
1. Inside the body tag, create a list, either ordered or unordered, of your favorite sites on the interwebs.
1. In the _Commit changes_ section, enter a commit message that describes what you've done.
1. Ensure you've selected _Create a new branch for this commit and start a pull request_.
Expand All @@ -18,4 +18,4 @@ Let's try again!
1. Click on **Create pull request.**

<hr>
<h3 align="center">I'll respond in your new pull request.</h3>
<h3 align="center">I'll respond in your new pull request.</h3>

0 comments on commit 6024559

Please sign in to comment.