Skip to content

Commit 867dcc5

Browse files
authored
feat: Adjustments to include more learning material. Combines steps 4 and 5
1 parent 16a1e99 commit 867dcc5

11 files changed

+138
-131
lines changed

.github/steps/1-open-a-pull-request.md

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,41 @@
22

33
_Welcome to "Review pull requests"! :wave:_
44

5-
Let's get started by opening a pull request.
5+
Let's get started by opening a pull request on some changes that were recently added to the the `update-game` branch.
66

7-
**What is a pull request?**: Collaboration happens on a pull request. The pull request shows the changes in your branch to other people. This pull request is going to keep the changes you just made on your branch and propose applying them to the `main` branch.
7+
### What is a pull request?
8+
9+
A **pull request** is a collaboration area where work in one branch is reviewed before merging it into another branch. It has 4 tabs to manage the conversation and easily review changes.
10+
11+
- **Conversation** - A general log of the pull request activity. It also provides open space fellow collaborators and the community to provide ideas, suggestions, and general feedback.
12+
- **Committs** - A list of only the commits unique to the proposed branch.
13+
- **Checks** - The results of any automations applied to the pull request using [GitHub Actions](https://github.com/features/actions). That's for another lesson though. 😎
14+
- **Files Changed** - A [Diff](https://docs.github.com/en/get-started/quickstart/github-glossary#diff) view that easily shows the proposed changes in a before/after view. It also options to add comments and reviews in context.
15+
16+
> [!TIP]
17+
> You can [create a draft pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) for unfinished work. This can help avoid accidental merges or premature reviews.
818
919
### :keyboard: Activity: Create a pull request
1020

11-
1. Click on the **Pull requests** tab in your repository.
12-
2. Click **New pull request**.
13-
3. In the **base:** dropdown, make sure **main** is selected.
14-
4. Select the **compare:** dropdown, and click `update-game`.
15-
5. Click **Create pull request**.
16-
6. Enter a title for your pull request: `Update the game over message`.
17-
7. Enter a description for your pull request: `Update the game over message so people know how to play again!`
18-
8. Click **Create pull request**.
19-
9. With the pull request created, Mona will check your progress then prepare and share the next steps.
21+
1. In the top navigation, select the **Pull requests** tab.
22+
23+
1. On the right, click the **New pull request** button.
24+
25+
1. Under the **Compare changes** area, select the following options and click the **Create pull request** button.
26+
27+
- **base:** `main`
28+
- **compare:** `update-game`
29+
30+
1. Set the **title** and **description** to the following.
31+
32+
```md
33+
Update the game over message
34+
```
35+
36+
```md
37+
Update the game over message so people know how to play again!
38+
```
39+
40+
1. Click **Create pull request**.
41+
42+
1. With the pull request created, Mona will check your progress and share the next steps.

.github/steps/2-assign-yourself.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
_Great job opening that pull request! :wave:_
44

5-
**What is a _pull request review_?**: Reviewing a pull request is an opportunity to examine another contributor's changes and give them feedback. It's an awesome opportunity to learn more about how the project works and how others solve problems.
5+
#### What is an assignee?
66

7-
The best way to get a review is to ask for one. On GitHub, you can ask someone to review a pull request by assigning them as a reviewer or assignee. If you are not ready for review, consider [creating a draft pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) instead.
7+
A **pull request assignee** is the person (or persons) most familiar with the the proposed changes.
8+
It's a simple mechanism for keeping track of who to contact for questions.
89

910
### :keyboard: Activity: Assign yourself
1011

11-
1. Open the pull request you just created.
12-
1. Under **Assignees** on the right side of the screen, add yourself.
12+
1. If not on the created pull request, navigate back to it.
1313

14-
Because you created the pull request, you can't assign yourself as a reviewer, but feel free to assign a friend as a reviewer instead to see how it works :smile:
14+
1. On the right side, under **Assignees**, click the **assign yourself** text.
1515

16-
1. With the pull request assigned, Mona will check your progress then prepare and share the next steps.
16+
1. After assigning yourself, Mona will check your progress and share the next steps.

.github/steps/3-leave-a-review.md

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,29 @@
22

33
_You assigned yourself! :tada:_
44

5-
Pull request reviews ensure quality and maintain momentum of changes to your project.
5+
#### What is a pull request review?
66

7-
#### When reviewing a pull request:
7+
A **pull request review** is feedback from other collaborators or community members on the proposed changes. It helps ensure quality and project momentum. Even more importantly, it's an awesome opportunity to learn more about the project and grow as a developer by seeing how others approach the problem.
88

9-
1. Review the _title_ and _body_ of the pull request, and possibly any associated issue, to understand the intended change.
10-
1. Review the [diff](https://docs.github.com/en/get-started/quickstart/github-glossary#diff), the comparison of the proposed code, in the context of the whole project.
11-
1. For most things, try out the proposed change. Check if the actual change matches the intention. Find the repository's [contributing guide](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors) to find out how to review the changes.
9+
Naturally, the best way to get a review is to ask for one. By assigning a reviewer they get 3 options for providing feedback:
1210

13-
#### In your review comments:
11+
- **Comment** - General feedback without approval or rejection.
12+
- **Approve** - Allows merging if [rulesets](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets), [code owners](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners), or other policies are enforced.
13+
- **Request Changes** - The proposed changes need continued work and review should be re-requested.
14+
15+
The **Files changed** tab is the primary place for collecting feedback. It allows for adding comments directly to lines before submitting a review.
16+
17+
### What does a review typically loook like?
18+
19+
1. Reviewing the **title** and **description** are clear and concise. It should easily convey the intended changes and any associated issues.
20+
21+
1. Reviewing the **Files changed** tab to ensure all proposed code matches the description.
22+
23+
1. For most things, try out the proposed change to verify the they matche the intention.
24+
25+
1. Use the repository's [contributing guide](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors) for any guidance on review requirements, testing, quality verification, etc.
26+
27+
#### Review ideas
1428

1529
- Identify potential issues, risks, and limitations.
1630
- Suggest changes and improvements.
@@ -21,13 +35,22 @@ Pull request reviews ensure quality and maintain momentum of changes to your pro
2135
- Be concise _and_ provide meaningful detail.
2236
- Treat the pull request author with kindness and empathy.
2337

24-
When an approval or request for changes is not yet needed, consider using **comments**. An **approval** lets the author know you believe the pull request is safe to merge. **Requesting changes** lets the author know you believe the pull request is not ready to merge.
25-
2638
### :keyboard: Activity: Leave a review
2739

28-
1. On the pull request, click **Files changed**.
29-
1. Click **Review changes**.
30-
1. Add a comment with your initial thoughts on the pull request.
31-
1. Select _comment_. You won't be able to _approve_ or _request changes_ to your own pull request.
32-
1. Click **Submit review**.
33-
1. With the review submitted, Mona will check your progress then prepare and share the next steps.
40+
1. On the pull request, click the **Files changed** tab.
41+
42+
1. Take a moment to review the change.
43+
44+
- Notice the change is a simple wording adjustment.
45+
46+
1. Above the comparison view, click the **Review changes** button.
47+
48+
1. Enter the following comment and click the **Submit review** button.
49+
50+
```md
51+
Looks good to me. I think this is more intuitive. Nice work!
52+
```
53+
54+
> 🪧 **Note:** You can't choose **Approve** or **Request changes** because your created the pull request.
55+
56+
1. With your review submitted, Mona will check your progress and share the next steps.

.github/steps/4-suggest-changes.md

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,40 @@
22

33
_Nice work reviewing that pull request :sparkles:_
44

5-
Now that you have explored the different ways you can review a pull request it is time to learn how to use _suggest changes_.
5+
While reviewing, it is very common to find simple changes that are easier to implement than to describe. For example typos or rewording sentences. These are perfect situations for the **Add a suggestion** feature.
66

7-
**What is _suggest changes_?**: This feature enables you to recommend a change to a pull request that the author can commit with the push of a button.
7+
### How do I suggest a change?
8+
9+
The **Add a suggestion** feature is a button in the comment text editor. It inserts a specially formatted code block. Instead of only showing a comment, GitHub will also provide a **Commit changes** button. This allows the author to accept the suggestion and commit it with the push of a button. No need to open a code editor! Nice!
810

911
### :keyboard: Activity: Suggest changes
1012

1113
1. On the pull request, click **Files changed**.
12-
1. Find the `index.html` changes.
14+
15+
1. Find the comparison view for the `index.html` file and find the modified line.
16+
1317
1. Hover your cursor next to the line numbers on the left side of the page.
14-
1. Click the blue plus icon.
15-
1. After the comment form appears, click the **Add a suggestion** button. <br>
16-
![add-a-suggestion-button](https://user-images.githubusercontent.com/97056108/184449714-61e8ee51-824a-48c1-9436-2dfd67f2c070.png)
17-
1. Edit the suggestion.
18-
1. Click **Add a single comment**.
19-
1. With commented added, Mona will check your progress then prepare and share the next steps.
18+
19+
1. Click the plus icon to review an inline comment form.
20+
21+
1. Click the **Add a suggestion** button to insert a modifiable copy of the line.
22+
23+
<img width="300" alt="add-a-suggestion-button" src="https://github.com/user-attachments/assets/dc781d29-d5fe-4da9-9e4b-eb406c5d9ab5" />
24+
25+
1. Edit the suggestion to match below and click the **Add a single comment** button.
26+
27+
````md
28+
```suggestion
29+
<h2 hidden>Game over! Want to play again?! Just click refresh. 🧑‍🚀!</h2>
30+
```
31+
32+
Let's make it a bit more friendly. 🤓
33+
````
34+
35+
### :keyboard: Activity: Apply a suggested change
36+
37+
1. Click the **Commit suggestion** button to open a form for adding a commit message.
38+
39+
1. Enter the following commit message and click the **Commit changes** button.
40+
41+
1. With the changes committed, Mona will check your progress then prepare and share the next steps.

.github/steps/5-apply-changes.md

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Step 6: Merge your pull request
2+
3+
_Almost there!_ :heart:
4+
5+
With our reviews collected and feedback implemented, it's time to merge the changes.
6+
7+
### :keyboard: Activity: Merge your pull request
8+
9+
1. In the pull request navigation, select the **Conversation** tab.
10+
11+
1. Scroll down and click the **Merge** button.
12+
13+
1. (optional) Delete the `update-game` branch.
14+
15+
1. With the pull request merged, Mona will check your progress and prepare a final review. Congrats you are done! 🎉

.github/steps/6-merge-your-pull-request.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/4-suggest-changes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111
issues: write
1212

1313
env:
14-
STEP_5_FILE: ".github/steps/5-apply-changes.md"
14+
STEP_5_FILE: ".github/steps/5-merge-your-pull-request.md"
1515

1616
jobs:
1717
find_exercise:

.github/workflows/5-apply-changes.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

.github/workflows/6-merge-your-pull-request.yml renamed to .github/workflows/5-merge-your-pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Step 6
1+
name: Step 5
22

33
on:
44
pull_request:

0 commit comments

Comments
 (0)