Skip to content

Commit 6edb9da

Browse files
authored
feat: Adjustments from review feedback (#9)
1 parent d38953b commit 6edb9da

File tree

6 files changed

+81
-59
lines changed

6 files changed

+81
-59
lines changed

.github/steps/1-preparing.md

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ Welcome to your **"Getting Started with GitHub Copilot"** exercise! :robot:
44

55
In this exercise, you will be using different GitHub Copilot features to work on a website that allows students of Mergington High School to sign up for extracurricular activities. 🎻 ⚽️ ♟️
66

7+
<img width="600" alt="screenshot of Mergington High School WebApp" src="https://github.com/user-attachments/assets/472398fd-1aa1-4084-b443-4e242deb30d9" />
8+
79
### What is GitHub Copilot?
810

11+
<img width="150" align="right" alt="copilot logo" src="https://github.com/user-attachments/assets/4d22496d-850b-4785-aafe-11cba03cd5f2" />
12+
913
GitHub Copilot is an AI coding assistant that helps you write code faster and with less effort, allowing you to focus more energy on problem solving and collaboration.
1014

1115
GitHub Copilot has been proven to increase developer productivity and accelerate the pace of software development. For more information, see [Research: quantifying GitHub Copilot’s impact on developer productivity and happiness in the GitHub blog.](https://github.blog/news-insights/research/research-quantifying-github-copilots-impact-on-developer-productivity-and-happiness/)
@@ -17,16 +21,13 @@ Your most common interactions will likely be:
1721
- **Copilot Edits**: Similar to Copilot Chat, but less conversational and more big picture or goal oriented.
1822

1923
> [!TIP]
20-
> You can learn more about current and preview features in the [GitHub Copilot Features](https://docs.github.com/en/copilot/about-github-copilot/github-copilot-features) documentation.
21-
22-
> [!TIP]
23-
> You can also select different [models](https://docs.github.com/en/github-models) and [extensions](https://github.com/features/copilot/extensions), but that's for a different lesson!
24+
> You can learn more about current and upcoming features in the [GitHub Copilot Features](https://docs.github.com/en/copilot/about-github-copilot/github-copilot-features) documentation. You can also select different [models](https://docs.github.com/en/github-models) and make your own [extensions](https://github.com/features/copilot/extensions), but that's for a different lesson!
2425
2526
### How can I use GitHub Copilot?
2627

2728
As you work, you'll find GitHub Copilot can help out in several places across the website and in your favorite coding environments such as VS Code, Jet Brains, and Xcode! For today's coding though, we will practice with VS Code in a preconfigured development environment known as [Codespace](https://github.com/features/codespaces).
2829

29-
### :keyboard: Activity: Get a project intro from Copilot Chat :robot:
30+
### :keyboard: Activity: Get a project intro from Copilot Chat
3031

3132
Let's start up our development environment, use copilot to learn a bit about the project, and then give it a test run.
3233

@@ -43,52 +44,56 @@ Let's start up our development environment, use copilot to learn a bit about the
4344

4445
1. In the left sidebar, click the extensions tab and verify that the `GitHub Copilot` and `Python` extensions are installed and enabled.
4546

46-
<img width="350" alt="image" src="https://github.com/user-attachments/assets/ef1ef984-17fc-4b20-a9a6-65a866def468" />
47-
48-
<img width="350" alt="image" src="https://github.com/user-attachments/assets/3040c0f5-1658-47e2-a439-20504a384f77" />
47+
<img width="350" alt="copilot extension for VS Code" src="https://github.com/user-attachments/assets/ef1ef984-17fc-4b20-a9a6-65a866def468" />
4948

49+
<img width="350" alt="python extension for VS Code" src="https://github.com/user-attachments/assets/3040c0f5-1658-47e2-a439-20504a384f77" />
5050

5151
1. At the top of VS Code, locate and click the **Copilot icon** to open a Copilot Chat panel.
5252

53+
<img width="150" alt="image" src="https://github.com/user-attachments/assets/5e64db46-95cb-415d-badc-b6b8677f10c1" />
54+
55+
1. If this is your first, time using GitHub Copilot, you will have to accept the usage terms to continue.
56+
5357
1. Enter the below prompt to ask Copilot to introduce you to the project.
5458

55-
```txt
56-
@workspace Please briefly explain the structure of this project. What should I do to run it?
57-
```
59+
> <img width="13px" src="https://github.com/user-attachments/assets/98fd5d2e-ea29-4a4a-9212-c7050e177a69" /> **Prompt**
60+
>
61+
> ```prompt
62+
> @workspace Please briefly explain the structure of this project.
63+
> What should I do to run it?
64+
> ```
5865
59-
> **Tip**: No need to follow Copilot's recommended steps. We already prepared the environment for you.
66+
> **Note**: It is not necesesary to follow Copilot's recommended instructions. We have already prepared the environment for you.
6067
6168
1. Now that we know a bit more about the project, let's actually try running it! In the left sidebar, select the `Run and Debug` tab and then press the **Start Debugging** icon.
6269
6370
<img width="300" alt="image" src="https://github.com/user-attachments/assets/50b27f2a-5eab-4827-9343-ab5bce62357e" />
6471
65-
1. We want to see our webpage running in a browser, so let's find the url and port. If it isn't visible, expand the the lower panel and select the **Ports** tab.
72+
1. We want to see our webpage running in a browser, so let's find the url and port. If it isn't visible, expand the lower panel and select the **Ports** tab.
6673
6774
1. In the list, find port `8000` and the related link. Hover over the link and select the **Open in browser** icon.
6875
6976
![image](https://github.com/user-attachments/assets/92d5642e-ce99-4a66-850c-2d311a673596)
7077
71-
> **Tip:** If the webpage doesn't open, make sure you still have the program running.
72-
73-
### :keyboard: Activity: Use Copilot to help remember a terminal command :robot:
78+
### :keyboard: Activity: Use Copilot to help remember a terminal command 🙋
7479
7580
Great work! Now that we are familiar with the app and we know it works, let's ask copilot for help starting a branch so we can do some customizing.
7681
7782
1. If not already there, return to VS Code.
7883
7984
1. In the bottom panel, select the **Terminal** tab. On the right side, click the plus `+` sign to create a new terminal window.
8085
81-
> **Tip:** This will avoid stopping the existing debug session that is hosting our web application service.
86+
> **Note:** This will avoid stopping the existing debug session that is hosting our web application service.
8287
83-
1. Within the new terminal window, `right click` and select `Copilot` then `Terminal Inline Chat`.
88+
1. Within the new terminal window, `right click` and select `Copilot` then `Terminal Inline Chat`. Alternately, you can use the keyboard shortcut `Ctrl + I` (windows) or `Cmd + I` (mac).
8489
85-
> **Pro Tip:** You can also open inline chat with the keyboard shortcut `Ctrl + I` (windows) or `Cmd + I` (mac).
90+
1. Let's ask Copilot to help us remember a command we have forgotten: creating a branch and publishing it
8691
87-
1. Let's ask Copilot to help us remember a command we have forgotten, creating a branch and publishing it.
88-
89-
```txt
90-
Hey copilot, how can I create and publish a new Git branch?
91-
```
92+
> <img width="13px" src="https://github.com/user-attachments/assets/98fd5d2e-ea29-4a4a-9212-c7050e177a69" /> **Prompt**
93+
>
94+
> ```prompt
95+
> Hey copilot, how can I create and publish a new Git branch?
96+
> ```
9297
9398
> **Tip:** This is a simple example, but Copilot is great at providing more tailored commands that might involve loops, pattern matching, file modification, and more! Don't be afraid to ask Copilot for a suggestion. Just remember it is a suggestion and you should always verify it first to be safe.
9499
@@ -99,17 +104,20 @@ Great work! Now that we are familiar with the app and we know it works, let's as
99104
git push -u origin {new_branch_name}
100105
```
101106
102-
```text
103-
Awesome! Thanks, Copilot! Let's use the branch name "accelerate-with-copilot".
104-
```
107+
> <img width="13px" src="https://github.com/user-attachments/assets/98fd5d2e-ea29-4a4a-9212-c7050e177a69" /> **Prompt**
108+
>
109+
> ```prompt
110+
> Awesome! Thanks, Copilot! Let's use the
111+
> branch name "accelerate-with-copilot".
112+
> ```
105113
106114
> **Tip:** If Copilot doesn't give you quite what you want, you can always continue explaining what you need. Copilot will remember the conversation history for follow-up responses.
107115
108116
1. Now that we are happy with the command, press the `Run` button to let Copilot run it for us. No need to copy and paste!
109117
110118
1. After a moment, look in the VS Code lower status bar, on the left, to see the active branch. It should now say `accelerate-with-copilot`. If so, you are all done with this step!
111119
112-
1. Mona should already be busy checking your work. Give her a moment and keep watch of the comments. You will see her respond with progress info and the next lesson.
120+
1. Now that your branch is pushed to GitHub, Mona should already be busy checking your work. Give her a moment and keep watch in the comments. You will see her respond with progress info and the next lesson.
113121
114122
<details>
115123
<summary>Having trouble? 🤷</summary><br/>

.github/steps/2-first-introduction.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,18 @@ In short, you can think of Copilot like a very focused coworker. To be effective
2020

2121
### :keyboard: Activity: Use Copilot to fix our registration bug :bug:
2222

23-
1. Let's ask Copilot to suggest where our bug might be coming from. Open the Copilot Chat panel and ask the following.
23+
1. Let's ask Copilot to suggest where our bug might be coming from. Open the **Copilot Chat** panel and ask the following.
2424

25-
```text
26-
@workspace Students are able to register twice for an activity. Where could this bug be coming from?
27-
```
25+
> <img width="13px" src="https://github.com/user-attachments/assets/98fd5d2e-ea29-4a4a-9212-c7050e177a69" /> **Prompt**
26+
>
27+
> ```prompt
28+
> @workspace Students are able to register twice for an activity.
29+
> Where could this bug be coming from?
30+
> ```
2831
29-
1. Now that we know the issue is in the `src/appy.py` file and the `signup_for_activity` method, let's go fix it (semi-manually). We'll start with a comment and let Copilot finish the correction.
32+
1. Now that we know the issue is in the `src/appy.py` file and the `signup_for_activity` method, let's follow Copilot's recommendation and go fix it (semi-manually). We'll start with a comment and let Copilot finish the correction.
3033
31-
1. In VS Code, select the **Navigation** tab to show the project files and open the `src/app.py` file.
34+
1. In VS Code, select the file **Explorer tab** to show the project files and open the `src/app.py` file.
3235
3336
1. Scroll near the bottom of the file and find the `signup_for_activity` method.
3437
@@ -71,12 +74,11 @@ In short, you can think of Copilot like a very focused coworker. To be effective
7174
7275
</details>
7376

74-
### :keyboard: Activity: Let Copilot generate sample data :robot:
77+
### :keyboard: Activity: Let Copilot generate sample data 📋
7578

76-
In new project developments, it's often helpful to have some realistic looking fake data for testing. Copilot is excellent at this task, so let's add some more sample activities and introduce another way to interact with Copilot: **Inline Chat**
79+
In new project developments, it's often helpful to have some realistic looking fake data for testing. Copilot is excellent at this task, so let's add some more sample activities and introduce another way to interact with Copilot using **Inline Chat**
7780

78-
> [!TIP]
79-
> **Inline Chat** and the **Copilot Chat** panel are very similar tools, but with slightly different automatic context. As such, while Copilot Chat is good at explaining about the project, inline chat might feel more natural for asking about a particular line or function.
81+
**Inline Chat** and the **Copilot Chat** panel are very similar tools, but with slightly different automatic context. As such, while Copilot Chat is good at explaining about the project, inline chat might feel more natural for asking about a particular line or function.
8082

8183
1. If not already open, open the `src/app.py` file.
8284

@@ -88,9 +90,12 @@ In new project developments, it's often helpful to have some realistic looking f
8890
8991
1. Enter the following prompt text and press enter or the **Send and Dispatch** button.
9092

91-
```text
92-
Add 2 more sports related activities, 2 more artistic activities, and 2 more intellectual activities.
93-
```
93+
> <img width="13px" src="https://github.com/user-attachments/assets/98fd5d2e-ea29-4a4a-9212-c7050e177a69" /> **Prompt**
94+
>
95+
> ```prompt
96+
> Add 2 more sports related activities, 2 more artistic
97+
> activities, and 2 more intellectual activities.
98+
> ```
9499
95100
1. After a moment, Copilot will directly start making changes to the code. The changes will be stylized differently to make any additions and removals easy to identify. Take a moment to inspect and then press the **Accept** button.
96101
@@ -161,7 +166,7 @@ activities = {
161166
162167
</details>
163168

164-
### :keyboard: Activity: Use Copilot to describe our work :robot:
169+
### :keyboard: Activity: Use Copilot to describe our work 💬
165170

166171
Nice work fixing that bug and expanding the example activities! Now let's get our work committed and pushed to GitHub, again with the help of Copilot!
167172

@@ -179,7 +184,7 @@ Nice work fixing that bug and expanding the example activities! Now let's get ou
179184

180185
1. To the right of the **Message** text box, find and click the **Generate Commit Message with Copilot** button (sparkles icon).
181186

182-
1. Press the **Commit** button and **Sync Changes** button push your chagnes to GitHub.
187+
1. Press the **Commit** button and **Sync Changes** button to push your changes to GitHub.
183188

184189
1. Wait a moment for Mona to check your work, provide feedback, and share the next lesson.
185190

.github/steps/3-copilot-edits.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,12 @@ In our previous steps, we used features of Copilot that require more hands-on gu
3737
3838
1. Ask Copilot to update our project to display the current participants of activities. Wait a moment for the edit suggestions to arrive and be applied.
3939

40-
```txt
41-
Hey Copilot, can you please edit the area where activities are listed on the website to show what participants are already signed up for that activity.
42-
```
40+
> <img width="13px" src="https://github.com/user-attachments/assets/98fd5d2e-ea29-4a4a-9212-c7050e177a69" /> **Prompt**
41+
>
42+
> ```prompt
43+
> Hey Copilot, can you please edit the area where activities are
44+
> listed on the website to show what participants are already signed up for that activity.
45+
> ```
4346
4447
- An extra icon has appeared next to the file names and open editor windows indicating they have suggested edits.
4548
- A suggested edits panel has appeared in the bottom right of the editor window providing controls to jump to the recommended changes.
@@ -57,10 +60,12 @@ In our previous steps, we used features of Copilot that require more hands-on gu
5760
5861
</details>
5962
60-
1. Before we simply accept the changes, please check our website again and verify everything is updated as expected. Here is an example of an updated activity card. **Important:** Your results may look slightly different!
63+
1. Before we simply accept the changes, please check our website again and verify everything is updated as expected. Here is an example of an updated activity card. You may need to restart the app or refresh the page.
6164
6265
<img width="350" alt="Activity card with participant info" src="https://github.com/user-attachments/assets/59fe792e-d587-487d-8525-2548ac0a7adf" />
6366
67+
> **Note:** Your activity card may look different. Copilot won't always produce the same results.
68+
6469
<details>
6570
<summary>Need help? 🤷</summary><br/>
6671
If the website is not loading, here are some things to check.

.github/steps/4-copilot-on-github.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Step 4: Using GitHub Copilot within a pull request
22

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!
3+
Congratulations! You are finished with coding for this exercise (and VS Code). 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!
44

55
#### Copilot Pull Request Summaries
66

@@ -13,7 +13,7 @@ Typically, you would review your notes and commit messages then summarize them f
1313

1414
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.
1515

16-
> [!IMPORTANT]
16+
> [!NOTE]
1717
> This is in **Public Preview** for organizations. [[docs]](https://docs.github.com/en/copilot/using-github-copilot/code-review/using-copilot-code-review)
1818
1919
### :keyboard: Activity: Summarize and review a PR with Copilot

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"version": "0.2.0",
66
"configurations": [
77
{
8-
"name": "FastAPI: Launch Mergington",
8+
"name": "Launch Mergington WebApp",
99
"type": "debugpy",
1010
"request": "launch",
1111
"module": "uvicorn",

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,26 @@
33
![](../../actions/workflows/1-preparing.yml/badge.svg)
44
![](../../actions/workflows/2-first-introduction.yml/badge.svg)
55
![](../../actions/workflows/3-copilot-edits.yml/badge.svg)
6-
![](../../actions/workflows/4-copilot-on-github.yml/badge.svg)
6+
![](../../actions/workflows/4a-copilot-on-github.yml/badge.svg)
77

88
_Get started using GitHub Copilot in less than an hour._
99

1010
## Welcome
1111

12-
- **Who is this for**: Developers at any experience level that are looking to speed up their code workflow
13-
- **What you'll learn**: We'll introduce you to several GitHub Copilot features.
14-
- **What you'll build**: You will work on a simple Python API and a single static page.
15-
- **Prerequisites**: Basic programming skills.
12+
- **Who is this for**: Developers at any experience level looking to accelerate their code workflow.
13+
- **What you'll learn**: The different ways to interact with Copilot to explain, write, debug, and develop code.
14+
- **What you'll build**: You will guide Copilot to update Mergington High School's extracurricular activities website.
15+
- **Prerequisites**:
16+
- Skills exercise: [Introduction to GitHub](https://github.com/skills/introduction-to-github)
17+
- Familiarity with [VS Code](https://code.visualstudio.com/)
18+
- Basic coding principles
1619
- **How long**: This exercise takes less than one hour to complete.
1720

1821
In this exercise, you will:
1922

20-
1. Use a preconfigured Codespace to run VS Code in your browser
21-
1. Learn different ways on how to use Copilot to accelerate your coding process
22-
1. Use Copilot to summarize and review your pull requests
23+
1. Use a preconfigured Codespace to run VS Code in your browser.
24+
1. Learn different interaction options to develop with GitHub Copilot.
25+
1. Use Copilot to summarize and review your pull request.
2326

2427
### How to start this exercise
2528

@@ -35,10 +38,11 @@ In this exercise, you will:
3538
- We recommend creating a public repository, as private repositories will use [Actions minutes](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions).
3639
- Scroll down and click the **Create repository** button at the bottom of the form.
3740

38-
3. After your new repository is created, wait about 20 seconds for the exercise to be prepared.
41+
3. After your new repository is created, wait about 20 seconds for the exercise to be prepared and buttons updated. You will continue working from your copy of the exercise.
3942

4043
- The **Copy Exercise** button will deactivate, changing to gray.
4144
- The **Start Exercise** button will activate, changing to green.
45+
- You will likely need to refresh the page.
4246

4347
4. Click **Start Exercise**. Follow the step-by-step instructions and feedback will be provided as you progress.
4448

0 commit comments

Comments
 (0)