|
1 | 1 | ## Step 4: Using GitHub Copilot within a pull request
|
2 | 2 |
|
3 |
| -Congratulations! You are finished with coding for this exercise :tada: |
| 3 | +Congratulations! You are finished with coding for this exercise. Now it's time to merge our work. :tada: To wrap up, let's learn about two limited-access Copilot features that can speed up our pull requests! |
4 | 4 |
|
5 |
| -Now, let's see how Copilot can help us finish up with during our pull request. |
| 5 | +#### Copilot Pull Request Summaries |
6 | 6 |
|
7 |
| -### :keyboard: Activity: Summarize and review with Copilot :robot: |
| 7 | +Typically, you would review your notes and commit messages then summarize them for your pull request description. This may take some time, especially if commit messages are inconsistent or code is not not documented well. Fortunately, Copilot can consider all changes in the pull request and provide the important highlights, and with references too! |
8 | 8 |
|
9 |
| -1. In a web browser, navigate to your exercise repository. |
| 9 | +Here is what that process looks like: |
10 | 10 |
|
11 |
| -1. At the top, select the **Pull Requests** tab and create a new pull request. Stop when you reach a form to enter a title and description. |
| 11 | +<!-- Add GIF image here --> |
| 12 | + |
| 13 | +> [!NOTE] |
| 14 | +> This is a unavailable with the **Copilot Free** tier. [[docs]](https://docs.github.com/en/enterprise-cloud@latest/copilot/using-github-copilot/using-github-copilot-for-pull-requests/creating-a-pull-request-summary-with-github-copilot) |
| 15 | +
|
| 16 | +#### Copilot Review |
| 17 | + |
| 18 | +More eyes on our work is always useful so let's ask Copilot to do a first pass before we do a normal peer review process. Copilot is great at catching common mistakes that can are fixed by simple adjustment, but please remember to use it responsibily. |
| 19 | + |
| 20 | +Here is what that process looks like: |
| 21 | + |
| 22 | +<!-- Add GIF image here --> |
| 23 | + |
| 24 | +> [!IMPORTANT] |
| 25 | +> This is in **Public Preview** for organizations. [[docs]](https://docs.github.com/en/copilot/using-github-copilot/code-review/using-copilot-code-review) |
| 26 | +
|
| 27 | +### :keyboard: Activity: Summarize and review a PR with Copilot |
| 28 | + |
| 29 | +Both **pull request summaries** and **copilot review** have limited access, so this activity is mostly optional. If you have access, Mona will gladly check your work though! If not, you can skip the optional steps. |
| 30 | + |
| 31 | +1. In a web browser, open another tab and navigate to your exercise repository. |
| 32 | + |
| 33 | +1. You might notice a **notification banner** suggesting to create a new pull request. Click that or use the **Pull Requests** tab at the top to create a new pull request. Please use the following details: |
12 | 34 |
|
13 | 35 | - **base:** `main`
|
14 | 36 | - **compare:** `accelerate-with-copilot`
|
15 | 37 | - **title:** `Add registration validation and more activities`
|
16 | 38 |
|
17 |
| -1. **Use Copilot to add a description** - In the **Add a description** toolbar, click the **Copilot actions** icon and **Summary** action to describe your changes. :memo: |
| 39 | +1. (Optional) In the **Add a description** area, enter edit mode if needed, then click the **Copilot actions** icon and **Summary** action. After a moment, Copilot will add a description. :memo: |
18 | 40 |
|
19 |
| -1. **Ask Copilot to review your changes** - In the right side information panel at the top, locate the **Reviewers** section and click the **Request** button next to a **Copilot icon**. |
| 41 | + <img alt="Copilot " width="400px" src="https://docs.github.com/assets/cb-42638/mw-1440/images/help/copilot/copilot-description-suggestion.webp"> |
20 | 42 |
|
21 |
| -1. Below the pull request description, press the green **Create pull request** one more time. |
| 43 | +1. (Optional) In the right side information panel at the top, locate the **Reviewers** section and click the **Request** button next to a **Copilot icon**. Wait a moment for Copilot to add a review comment to your pull request! |
22 | 44 |
|
23 |
| -1. Wait a moment for Copilot to add a review comment to your pull request! |
| 45 | + > **Tip:** Notice a log entry was added to indicate a Copilot review was requested. |
24 | 46 |
|
25 |
| - - Notice the log entry indicating a Copilot review was requested. |
| 47 | + < img alt= "Copilot " height= "230px" src= "https://docs.github.com/assets/cb-68049/mw-1440/images/help/copilot/code-review/[email protected]"> |
| 48 | + < img alt= "Copilot " height= "200px" src= "https://docs.github.com/assets/cb-266339/mw-1440/images/help/copilot/code-review/[email protected]"> |
26 | 49 |
|
27 |
| -1. Wait a moment for Mona to check your work, provide feedback, and post a final review of this lesson! |
| 50 | +1. At the bottom, press the **Merge pull request** button. Nice work! You are all done! :tada: |
28 | 51 |
|
29 |
| -1. At the bottom, press the green **Merge pull request** button. Nice work! You are all done! :tada: |
| 52 | +1. Wait a moment for Mona to check your work, provide feedback, and post a final review of this lesson! |
30 | 53 |
|
31 | 54 | <details>
|
32 | 55 | <summary>Having trouble? 🤷</summary><br/>
|
|
0 commit comments