Skip to content
Closed
Show file tree
Hide file tree
Changes from 12 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
1 change: 0 additions & 1 deletion .github/steps/-step.txt

This file was deleted.

1 change: 0 additions & 1 deletion .github/steps/0-welcome.md

This file was deleted.

55 changes: 36 additions & 19 deletions .github/steps/1-open-a-pull-request.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,44 @@
<!--
<<< Author notes: Step 1 >>>
Choose 3-5 steps for your course.
The first step is always the hardest, so pick something easy!
Link to docs.github.com for further explanations.
Encourage users to open new tabs for steps!
-->

## Step 1: Open a pull request

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

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

### What is a pull request?

A **pull request** is a collaboration area where work in one branch is reviewed before merging it into another branch. It has different tabs to manage the conversation and easily review changes.

- **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.
- **Commits** - A list of only the commits unique to the proposed branch.
- **Checks** - The results of any automations applied to the pull request using [GitHub Actions](https://github.com/features/actions). That's for another exercise though. 😎
- **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.

**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.
> [!TIP]
> 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.

### :keyboard: Activity: Create a pull request

1. Click on the **Pull requests** tab in your repository.
2. Click **New pull request**.
3. In the **base:** dropdown, make sure **main** is selected.
4. Select the **compare:** dropdown, and click `update-game`.
5. Click **Create pull request**.
6. Enter a title for your pull request: `Update the game over message`.
7. Enter a description for your pull request: `Update the game over message so people know how to play again!`
8. Click **Create pull request**.
9. 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.
1. Open this repository in a new browser tab so you can work on the steps while you read the instructions in this tab.

1. In the top navigation, select the **Pull requests** tab.

1. On the right, click the **New pull request** button.

1. Under the **Compare changes** area, select the following options and click the **Create pull request** button.

- **base:** `main`
- **compare:** `update-game`

1. Set the **title** and **description** to the following.

```md
Update game over message
```

```md
Update the game over message so people know how to play again!
```

1. Click **Create pull request**.

1. With the pull request created, Mona will check your progress and share the next steps.
19 changes: 6 additions & 13 deletions .github/steps/2-assign-yourself.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
<!--
<<< Author notes: Step 2 >>>
Start this step by acknowledging the previous step.
Define terms and link to docs.github.com.
Historic note: this step combines the commend, approve, and needs changes steps from the previous version.
-->

## Step 2: Assign yourself

_Great job opening that pull request! :wave:_

**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.
#### What is an assignee?

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.
A **pull request assignee** is the person (or persons) most familiar with the the proposed changes.
It's a simple mechanism for keeping track of who to contact for questions.

### :keyboard: Activity: Assign yourself

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

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:
1. On the right side, under **Assignees**, click the **assign yourself** text.

1. 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.
1. After assigning yourself, Mona will check your progress and share the next steps.
58 changes: 37 additions & 21 deletions .github/steps/3-leave-a-review.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
<!--
<<< Author notes: Step 3 >>>
Start this step by acknowledging the previous step.
Define terms and link to docs.github.com.
Historic note: this step combines the commend, approve, and needs changes steps from the previous version.
-->

## Step 3: Leave a review

_You assigned yourself! :tada:_

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

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.

Naturally, the best way to get a review is to ask for one. By assigning a reviewer they get 3 options for providing feedback:

- **Comment** - General feedback without approval or rejection.
- **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.
- **Request Changes** - The proposed changes need continued work and review should be re-requested.

The **Files changed** tab is the primary place for collecting feedback. It allows for adding comments directly to lines before submitting a review.

### What does a review typically loook like?

1. Reviewing the **title** and **description** are clear and concise. It should easily convey the intended changes and any associated issues.

1. Reviewing the **Files changed** tab to ensure all proposed code matches the description.

#### When reviewing a pull request:
1. For most things, try out the proposed change to verify the they match the intention.

1. Review the _title_ and _body_ of the pull request, and possibly any associated issue, to understand the intended change.
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.
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.
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.

#### In your review comments:
#### Review ideas

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

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.

### :keyboard: Activity: Leave a review

1. On the pull request, click **Files changed**.
1. Click **Review changes**.
1. Add a comment with your initial thoughts on the pull request.
1. Select _comment_. You won't be able to _approve_ or _request changes_ to your own pull request.
1. Click **Submit review**.
1. 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.
1. On the pull request, click the **Files changed** tab.

1. Take a moment to review the change.

- Notice the change is a simple wording adjustment.

1. Above the comparison view, click the **Review changes** button.

1. Enter the following comment and click the **Submit review** button.

```md
Looks good to me. I think this is more intuitive. Nice work!
```

> 🪧 **Note:** You can't choose **Approve** or **Request changes** on your own pull request.

1. With your review submitted, Mona will check your progress and share the next steps.
51 changes: 35 additions & 16 deletions .github/steps/4-suggest-changes.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,44 @@
<!--
<<< Author notes: Step 4 >>>
Start this step by acknowledging the previous step.
Define terms and link to docs.github.com.
-->

## Step 4: Suggest changes

_Nice work reviewing that pull request :sparkles:_

Now that you have explored the different ways you can review a pull request it is time to learn how to use _suggest changes_.
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.

### How do I suggest a change?

**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.
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!

### :keyboard: Activity: Suggest changes

1. On the pull request, click **Files changed**.
1. Find the `index.html` changes.
1. Hover your cursor next to the line numbers on the left side of the page.
1. Click the blue plus icon.
1. After the comment form appears, click the **Add a suggestion** button. <br>
![add-a-suggestion-button](https://user-images.githubusercontent.com/97056108/184449714-61e8ee51-824a-48c1-9436-2dfd67f2c070.png)
1. Edit the suggestion.
1. Click **Add a single comment**.
1. 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.

1. Find the comparison view for the `index.html` file.

1. Hover your cursor next to the line numbers for the modified line.

1. Click the plus icon to show an inline comment form.

1. Click the **Add a suggestion** button to insert a modifiable copy of the line.

<img width="300" alt="add-a-suggestion-button" src="https://github.com/user-attachments/assets/dc781d29-d5fe-4da9-9e4b-eb406c5d9ab5" />

1. Edit the suggestion to match below and click the **Add a single comment** button.

````md
```suggestion
<h2 hidden>Game over! Want to play again?! Just click refresh. 🧑‍🚀!</h2>
```
Let's make it a bit more friendly. 🤓
````

### :keyboard: Activity: Apply a suggested change

1. Click the **Commit suggestion** button to open a commit message form.

1. Edit the commit message to the below text and click the **Commit changes** button.

```markdown
Make the end game experience more friendly
```

1. With the changes committed, Mona will check your progress then prepare and share the next steps.
18 changes: 0 additions & 18 deletions .github/steps/5-apply-changes.md

This file was deleted.

15 changes: 15 additions & 0 deletions .github/steps/5-merge-your-pull-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Step 6: Merge your pull request

_Almost done!_ :heart:

With our reviews collected and feedback implemented, it's time to merge the changes.

### :keyboard: Activity: Merge your pull request

1. In the pull request navigation, select the **Conversation** tab.

1. Scroll down and click the **Merge pull request** button.

1. (optional) Delete the `update-game` branch.

1. With the pull request merged, Mona will check your progress and prepare a final review. Congrats you are done! 🎉
17 changes: 0 additions & 17 deletions .github/steps/6-merge-your-pull-request.md

This file was deleted.

10 changes: 2 additions & 8 deletions .github/steps/X-finish.md → .github/steps/x-review.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<!--
<<< Author notes: Finish >>>
Review what we learned, ask for feedback, provide next steps.
-->

## Finish
## Review

_Congratulations friend, you've completed this course!_

Expand All @@ -21,7 +16,6 @@ Here's a recap of all the tasks you've accomplished in your repository:
### What's next?

- Try adding a [`CODEOWNERS`](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) file to your project to automatically assign reviewers to pull requests.
- We'd love to hear what you thought of this course [in our discussion board](https://github.com/orgs/skills/discussions/categories/review-pull-requests).
- [Take another GitHub Skills course](https://github.com/skills).
- [Take another GitHub Skills exercise](https://skills.github.com).
- [Read the GitHub Getting Started docs](https://docs.github.com/en/get-started).
- To find projects to contribute to, check out [GitHub Explore](https://github.com/explore).
Loading