Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

My first branch #50

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/steps/-step.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0
4
64 changes: 64 additions & 0 deletions .github/workflows/classroom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Autograding Tests
'on':
- workflow_dispatch
- repository_dispatch
permissions:
checks: write
actions: read
contents: read
jobs:
run-autograding-tests:
runs-on: ubuntu-latest
if: github.actor != 'github-classroom[bot]'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Step 1 Create a Branch
id: step-1-create-a-branch
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Step 1 Create a Branch
setup-command: sleep 20
command: "[ $(cat .github/steps/-step.txt) -ge 1 ] || [ $(cat .github/steps/-step.txt)
= X ]"
timeout: 10
max-score: 1
- name: Step 2 Commit a File
id: step-2-commit-a-file
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Step 2 Commit a File
setup-command: sleep 20
command: "[ $(cat .github/steps/-step.txt) -ge 2 ] || [ $(cat .github/steps/-step.txt)
= X ]"
timeout: 10
max-score: 1
- name: Step 3 Open a Pull Request
id: step-3-open-a-pull-request
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Step 3 Open a Pull Request
setup-command: sleep 20
command: "[ $(cat .github/steps/-step.txt) -ge 3 ] || [ $(cat .github/steps/-step.txt)
= X ]"
timeout: 10
max-score: 1
- name: Step 4 Merge Your Pull Request
id: step-4-merge-your-pull-request
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Step 4 Merge Your Pull Request
setup-command: sleep 20
command: "[ $(cat .github/steps/-step.txt) -ge 4 ] || [ $(cat .github/steps/-step.txt)
= X ]"
timeout: 10
max-score: 1
- name: Autograding Reporter
uses: classroom-resources/autograding-grading-reporter@v1
env:
STEP-1-CREATE-A-BRANCH_RESULTS: "${{steps.step-1-create-a-branch.outputs.result}}"
STEP-2-COMMIT-A-FILE_RESULTS: "${{steps.step-2-commit-a-file.outputs.result}}"
STEP-3-OPEN-A-PULL-REQUEST_RESULTS: "${{steps.step-3-open-a-pull-request.outputs.result}}"
STEP-4-MERGE-YOUR-PULL-REQUEST_RESULTS: "${{steps.step-4-merge-your-pull-request.outputs.result}}"
with:
runners: step-1-create-a-branch,step-2-commit-a-file,step-3-open-a-pull-request,step-4-merge-your-pull-request
1 change: 1 addition & 0 deletions PROFILE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Welcome to my GitHub profile!
38 changes: 22 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,35 @@ _Get started using GitHub in less than an hour._
</header>

<!--
<<< Author notes: Course start >>>
Include start button, a note about Actions minutes,
and tell the learner why they should take the course.
<<< Author notes: Step 4 >>>
Just a historic note: The previous version of this step required responding
to a pull request review before merging. The previous version also handled
if users accidentally closed without merging.
-->

## Welcome
## Step 4: Merge your pull request

People use GitHub to build some of the most advanced technologies in the world. Whether you’re visualizing data or building a new game, there’s a whole community and set of tools on GitHub that can help you do it even better. GitHub Skills’ “Introduction to GitHub” course guides you through everything you need to start contributing in less than an hour.
_Nicely done! :sunglasses:_

- **Who is this for**: New developers, new GitHub users, and students.
- **What you'll learn**: We'll introduce repositories, branches, commits, and pull requests.
- **What you'll build**: We'll make a short Markdown file you can use as your [profile README](https://docs.github.com/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme).
- **Prerequisites**: None. This course is a great introduction for your first day on GitHub.
- **How long**: This course takes less than one hour to complete.
You successfully created a pull request. You can now merge your pull request.

In this course, you will:
**What is a merge?**: A _[merge](https://docs.github.com/en/get-started/quickstart/github-glossary#merge)_ adds the changes in your pull request and branch into the `main` branch. For more information about merges, see "[Merging a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request)."

1. Create a branch
2. Commit a file
3. Open a pull request
4. Merge your pull request
As noted in the previous step, you may have seen evidence of GitHub Actions running which automatically progresses your instructions to the next step. You'll have to wait for it to finish before you can merge your pull request. It will be ready when the merge pull request button is green.

Wait about 20 seconds, then refresh the page. Follow the step-by-step instructions in this assignment repository's README.
![screenshot of green merge pull request button](/images/Green-merge-pull-request.png)

### :keyboard: Activity: Merge the pull request

1. Click **Merge pull request**.
2. Click **Confirm merge**.
3. Once your branch has been merged, you don't need it anymore. To delete this branch, click **Delete branch**.

<img alt="screenshot showing delete branch button" src="/images/delete-branch.png"/>

4. Wait about 20 seconds then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/en/actions) will automatically update to the next step.

**Note**: Check out the **Finish** step to see what you can learn next!

<footer>

Expand Down