You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/steps/1-preparing.md
+36-28Lines changed: 36 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,12 @@ Welcome to your **"Getting Started with GitHub Copilot"** exercise! :robot:
4
4
5
5
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. 🎻 ⚽️ ♟️
6
6
7
+
<imgwidth="600"alt="screenshot of Mergington High School WebApp"src="https://github.com/user-attachments/assets/472398fd-1aa1-4084-b443-4e242deb30d9" />
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.
10
14
11
15
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:
17
21
-**Copilot Edits**: Similar to Copilot Chat, but less conversational and more big picture or goal oriented.
18
22
19
23
> [!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!
24
25
25
26
### How can I use GitHub Copilot?
26
27
27
28
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).
28
29
29
-
### :keyboard: Activity: Get a project intro from Copilot Chat:robot:
30
+
### :keyboard: Activity: Get a project intro from Copilot Chat
30
31
31
32
Let's start up our development environment, use copilot to learn a bit about the project, and then give it a test run.
32
33
@@ -43,52 +44,56 @@ Let's start up our development environment, use copilot to learn a bit about the
43
44
44
45
1. In the left sidebar, click the extensions tab and verify that the `GitHub Copilot` and `Python` extensions are installed and enabled.
> @workspace Please briefly explain the structure of this project.
63
+
> What should I do to run it?
64
+
> ```
58
65
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.
60
67
61
68
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.
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.
66
73
67
74
1. In the list, find port `8000` and the related link. Hover over the link and select the **Open in browser** icon.
> **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 🙋
74
79
75
80
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.
76
81
77
82
1. If not already there, return to VS Code.
78
83
79
84
1. In the bottom panel, select the **Terminal** tab. On the right side, click the plus `+` sign to create a new terminal window.
80
85
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.
82
87
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).
84
89
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
86
91
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?
> Hey copilot, how can I create and publish a new Git branch?
96
+
> ```
92
97
93
98
> **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.
94
99
@@ -99,17 +104,20 @@ Great work! Now that we are familiar with the app and we know it works, let's as
99
104
git push -u origin {new_branch_name}
100
105
```
101
106
102
-
```text
103
-
Awesome! Thanks, Copilot! Let's use the branch name "accelerate-with-copilot".
> **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.
107
115
108
116
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!
109
117
110
118
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!
111
119
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.
> @workspace Students are able to register twice for an activity.
29
+
> Where could this bug be coming from?
30
+
> ```
28
31
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.
30
33
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.
32
35
33
36
1. Scroll near the bottom of the file and find the `signup_for_activity` method.
34
37
@@ -71,12 +74,11 @@ In short, you can think of Copilot like a very focused coworker. To be effective
71
74
72
75
</details>
73
76
74
-
### :keyboard: Activity: Let Copilot generate sample data :robot:
77
+
### :keyboard: Activity: Let Copilot generate sample data 📋
75
78
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**
77
80
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.
80
82
81
83
1. If not already open, open the `src/app.py` file.
82
84
@@ -88,9 +90,12 @@ In new project developments, it's often helpful to have some realistic looking f
88
90
89
91
1. Enter the following prompt text and press enter or the **Send and Dispatch** button.
90
92
91
-
```text
92
-
Add 2 more sports related activities, 2 more artistic activities, and 2 more intellectual activities.
> Add 2 more sports related activities, 2 more artistic
97
+
> activities, and 2 more intellectual activities.
98
+
> ```
94
99
95
100
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.
96
101
@@ -161,7 +166,7 @@ activities = {
161
166
162
167
</details>
163
168
164
-
### :keyboard: Activity: Use Copilot to describe our work :robot:
169
+
### :keyboard: Activity: Use Copilot to describe our work 💬
165
170
166
171
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!
167
172
@@ -179,7 +184,7 @@ Nice work fixing that bug and expanding the example activities! Now let's get ou
179
184
180
185
1. To the right of the **Message** text box, find and click the **Generate Commit Message with Copilot** button (sparkles icon).
181
186
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.
183
188
184
189
1. Wait a moment for Mona to check your work, provide feedback, and share the next lesson.
Copy file name to clipboardExpand all lines: .github/steps/3-copilot-edits.md
+9-4Lines changed: 9 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -37,9 +37,12 @@ In our previous steps, we used features of Copilot that require more hands-on gu
37
37
38
38
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.
39
39
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.
> 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
+
> ```
43
46
44
47
- An extra icon has appeared next to the file names and open editor windows indicating they have suggested edits.
45
48
- 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
57
60
58
61
</details>
59
62
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.
61
64
62
65
<img width="350" alt="Activity card with participant info" src="https://github.com/user-attachments/assets/59fe792e-d587-487d-8525-2548ac0a7adf" />
63
66
67
+
> **Note:** Your activity card may look different. Copilot won't always produce the same results.
68
+
64
69
<details>
65
70
<summary>Need help? 🤷</summary><br/>
66
71
If the website is not loading, here are some things to check.
Copy file name to clipboardExpand all lines: .github/steps/4-copilot-on-github.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
## Step 4: Using GitHub Copilot within a pull request
2
2
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!
4
4
5
5
#### Copilot Pull Request Summaries
6
6
@@ -13,7 +13,7 @@ Typically, you would review your notes and commit messages then summarize them f
13
13
14
14
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.
15
15
16
-
> [!IMPORTANT]
16
+
> [!NOTE]
17
17
> This is in **Public Preview** for organizations. [[docs]](https://docs.github.com/en/copilot/using-github-copilot/code-review/using-copilot-code-review)
18
18
19
19
### :keyboard: Activity: Summarize and review a PR with Copilot
_Get started using GitHub Copilot in less than an hour._
9
9
10
10
## Welcome
11
11
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
16
19
-**How long**: This exercise takes less than one hour to complete.
17
20
18
21
In this exercise, you will:
19
22
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.
23
26
24
27
### How to start this exercise
25
28
@@ -35,10 +38,11 @@ In this exercise, you will:
35
38
- 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).
36
39
- Scroll down and click the **Create repository** button at the bottom of the form.
37
40
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.
39
42
40
43
- The **Copy Exercise** button will deactivate, changing to gray.
41
44
- The **Start Exercise** button will activate, changing to green.
45
+
- You will likely need to refresh the page.
42
46
43
47
4. Click **Start Exercise**. Follow the step-by-step instructions and feedback will be provided as you progress.
0 commit comments