Skip to content

Commit 5738846

Browse files
authored
Merge pull request #2 from microsoft/module3upate
update files and steps and multipel devconatines
2 parents b960d72 + 1dbc869 commit 5738846

File tree

18 files changed

+35
-111
lines changed

18 files changed

+35
-111
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
// Name this configuration
3+
"name": "Introduction to Copilot"
4+
}

.devcontainer/devcontainer.json renamed to .devcontainer/mini-game/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
33
{
4-
"name": "GitHub Copilot Workshop",
4+
"name": "GitHub Copilot Mini Game",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
66
"image": "mcr.microsoft.com/devcontainers/dotnet:9.0",
77
"features": {

.devcontainer/welcome

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Welcome to the Mastering Github Copilot for .Net / C# Developers lab.
1+
Welcome to the Mastering Github Copilot for .NET / C# Developers lab.

03-Introduction-to-GitHub-Copilot/.github/steps/-step.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

03-Introduction-to-GitHub-Copilot/.github/steps/0-welcome.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

03-Introduction-to-GitHub-Copilot/.github/steps/X-finish.md

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

03-Introduction-to-GitHub-Copilot/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,20 @@ By the end of this module, you'll be able to:
3838

3939
### How to start this course
4040

41-
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/mastering-github-copilot-for-dotnet-csharp-developers)
41+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/mastering-github-copilot-for-dotnet-csharp-developers?devcontainer_path=.devcontainer%2Fintroduction%2Fdevcontainer.json)
4242

4343
Now that you've learned about GitHub Codespaces and GitHub Copilot, let's take the next step and use Codespaces to complete hands-on labs with GitHub Copilot. Right-click **Open in GitHub Codespaces** and open the link in a new tab.
4444

4545
### 🗃️ Lessons
4646
| | Lesson Link | Concepts Taught | Learning Goal |
4747
| :---: | :------------------------------------: | :---------------------------------------------------------: | ----------------------------------------------------------- |
48-
| 01 | [Leverage Codespaces with VS Code for Copilot](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers/blob/main/03-Introduction-to-GitHub-Copilot/.github/steps/1-copilot-extension.md) | Learn how to set up and enable GitHub Copilot within a Codespace using VS Code by configuring a development container and installing necessary extensions.| This guide enable developers to leverage GitHub Codespaces and VS Code to integrate and utilize GitHub Copilot for AI-powered code suggestions efficiently. |
49-
| 02 | [Seeing AI code suggestions in a C# file!](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers/blob/main/03-Introduction-to-GitHub-Copilot/.github/steps/2-skills-dotnet.md) | Setting up a Codespace with GitHub Copilot, creating a C# project, using Copilot for code suggestions, and pushing code to a repository using Git. | Familiarize users with GitHub Copilot's AI-powered code suggestions in C# by creating a .NET project, generating code completions, and pushing changes to a repository using Git. |
50-
| 03 | [View the GitHub Copilot tab with multiple suggestions](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers/blob/main/03-Introduction-to-GitHub-Copilot/.github/steps/3-copilot-hub.md) | Learn how to use GitHub Copilot for AI-powered code suggestions in C#, manage a Codespace, pull the latest code, create and edit files, review AI-generated code completions, and push changes to a Git repository using Git commands in VS Code. | Familiarize users with GitHub Copilot’s code suggestions, how to review and accept AI-generated completions, and how to manage code changes in a GitHub Codespace using Git commands. |
51-
| 04 | [Using comments to generate code with Copilot](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers/blob/main/03-Introduction-to-GitHub-Copilot/.github/steps/4-copilot-comment.md) | Understand how to use GitHub Copilot to generate code from comments, navigating Copilot suggestions, and managing code versioning with Git commands in a Codespace environment. | Using comments to generate AI-suggested code with GitHub Copilot in VS Code |
48+
| 01 | [Leverage Codespaces with VS Code for Copilot](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers/blob/main/03-Introduction-to-GitHub-Copilot/steps/1-copilot-extension.md) | Learn how to set up and enable GitHub Copilot within a Codespace using VS Code by configuring a development container and installing necessary extensions.| This guide enable developers to leverage GitHub Codespaces and VS Code to integrate and utilize GitHub Copilot for AI-powered code suggestions efficiently. |
49+
| 02 | [Seeing AI code suggestions in a C# file!](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers/blob/main/03-Introduction-to-GitHub-Copilot/steps/2-skills-dotnet.md) | Setting up a Codespace with GitHub Copilot, creating a C# project, using Copilot for code suggestions, and pushing code to a repository using Git. | Familiarize users with GitHub Copilot's AI-powered code suggestions in C# by creating a .NET project, generating code completions, and pushing changes to a repository using Git. |
50+
| 03 | [View the GitHub Copilot tab with multiple suggestions](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers/blob/main/03-Introduction-to-GitHub-Copilot/steps/3-copilot-hub.md) | Learn how to use GitHub Copilot for AI-powered code suggestions in C#, manage a Codespace, pull the latest code, create and edit files, review AI-generated code completions, and push changes to a Git repository using Git commands in VS Code. | Familiarize users with GitHub Copilot’s code suggestions, how to review and accept AI-generated completions, and how to manage code changes in a GitHub Codespace using Git commands. |
51+
| 04 | [Using comments to generate code with Copilot](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers/blob/main/03-Introduction-to-GitHub-Copilot/steps/4-copilot-comment.md) | Understand how to use GitHub Copilot to generate code from comments, navigating Copilot suggestions, and managing code versioning with Git commands in a Codespace environment. | Using comments to generate AI-suggested code with GitHub Copilot in VS Code |
5252

5353

54-
## :books: Additional learning and resources
54+
## 📚 Additional learning and resources
5555

5656
- [What is GitHub Copilot](https://docs.github.com/en/copilot/about-github-copilot/what-is-github-copilot)
5757
- [About enterprise accounts for Copilot Business](https://docs.github.com/en/enterprise-cloud@latest/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)
Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
<!--
2-
<<< Author notes: Step 1 >>>
3-
Choose 3-5 steps for your course.
4-
The first step is always the hardest, so pick something easy!
5-
Link to docs.github.com for further explanations.
6-
Encourage users to open new tabs for steps!
7-
-->
8-
91
## Step 1: Leverage Codespaces with VS Code for Copilot
102

113
_Welcome to "Develop With AI Powered Code Suggestions Using GitHub Copilot and VS Code"! :wave:_
@@ -21,22 +13,17 @@ Using Copilot inside a Codespace shows just how easy it is to get up and running
2113
> **Note**
2214
> This skills exercise will focus on leveraging GitHub Codespace. It is recommended that you complete the GitHub skill, [Codespaces](https://github.com/skills/code-with-codespaces), before moving forward with this exercise.
2315
24-
### :keyboard: Activity: Enable Copilot inside a Codespace
16+
### ⌨️ Activity: Enable Copilot inside a Codespace
2517

2618
**We recommend opening another browser tab to work through the following activities so you can keep these instructions open for reference.**
2719

2820
Before you open up a codespace on a repository, you can create a development container and define specific extensions or configurations that will be used or installed in your codespace. Let's create this development container and add copilot to the list of extensions.
2921

30-
1. Navigating back to your **Code** tab of your repository, click the **Add file** drop-down button, and then click `Create new file`.
31-
1. Type or paste the following in the empty text field prompt to name your file.
32-
```
33-
.devcontainer/devcontainer.json
34-
```
35-
1. In the body of the new **.devcontainer/devcontainer.json** file, add the following content:
22+
1. In the body of the **.devcontainer/introduction/devcontainer.json** file, add the following content:
3623
```
3724
{
3825
// Name this configuration
39-
"name": "Codespace for Skills!",
26+
"name": "Introduction to Copilot",
4027
"customizations": {
4128
"vscode": {
4229
"extensions": [
@@ -47,17 +34,21 @@ Before you open up a codespace on a repository, you can create a development con
4734
}
4835
}
4936
```
50-
1. Select the option to **Commit directly to the `main` branch**, and then click the **Commit new file** button.
37+
1. Select the option to **Commit directly to the `main` branch**, and then click the **Commit** button.
38+
1. Reload the codespace
39+
40+
If you run into issues you can create a new codespace:
41+
5142
1. Navigate back to the home page of your repository by clicking the **Code** tab located at the top left of the screen.
5243
1. Click the **Code** button located in the middle of the page.
5344
1. Click the **Codespaces** tab on the box that pops up.
54-
1. Click the **Create codespace on main** button.
45+
1. Click the **Create codespace on main** button and select Introduction to Copilot.
5546

5647
**Wait about 2 minutes for the codespace to spin itself up.**
5748

5849
1. Verify your codespace is running. The browser should contain a VS Code web-based editor and a terminal should be present such as the below:
59-
![Screen Shot 2023-03-09 at 9 09 07 AM](https://user-images.githubusercontent.com/26442605/224102962-d0222578-3f10-4566-856d-8d59f28fcf2e.png)
50+
![Screen Shot 2023-03-09 at 9 09 07 AM](./img/1-skills-0.png)
6051
1. The `copilot` extension should show up in the VS Code extension list. Click the extensions sidebar tab. You should see the following:
61-
![Screen Shot 2023-03-09 at 9 04 13 AM](https://user-images.githubusercontent.com/26442605/224102514-7d6d2f51-f435-401d-a529-7bae3ae3e511.png)
52+
![Screen Shot 2023-03-09 at 9 04 13 AM](./img/1-skills-1.png)
6253

63-
**Wait about 60 seconds then refresh your repository landing page for the next step.**
54+
Head to [Part 2 of the Exercise](./2-skills-dotnet.md)

03-Introduction-to-GitHub-Copilot/.github/steps/2-skills-dotnet.md renamed to 03-Introduction-to-GitHub-Copilot/steps/2-skills-dotnet.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
<!--
2-
<<< Author notes: Step 2 >>>
3-
Start this step by acknowledging the previous step.
4-
Define terms and link to docs.github.com.
5-
-->
6-
71
## Step 2: Seeing AI code suggestions in a C# file!
82

93
_Nice work! :tada: You created a Codespace using a devcontainer file that installed Copilot!_
@@ -12,7 +6,7 @@ GitHub Copilot provides suggestions for numerous languages and a wide variety of
126

137
Let's try this out utilizing C# for Copilot.
148

15-
### :keyboard: Activity: Add a C# file and start writing code
9+
### ⌨️ Activity: Add a C# file and start writing code
1610

1711
> **Note**:
1812
> If you closed the Codespace from above, please open it back up or create a new Codespace.
@@ -34,7 +28,7 @@ Let's try this out utilizing C# for Copilot.
3428

3529
5. Press `Tab` to accept the suggestion.
3630

37-
### :keyboard: Activity: Push code to your repository from the codespace
31+
### ⌨️ Activity: Push code to your repository from the codespace
3832

3933
1. Use the VS Code terminal to add all files to the repository:
4034

@@ -54,4 +48,5 @@ Let's try this out utilizing C# for Copilot.
5448
git push
5549
```
5650

57-
**Wait about 60 seconds then refresh your repository landing page for the next step.**
51+
52+
Head to [Part 3 of the Exercise](./3-copilot-hub.md)

03-Introduction-to-GitHub-Copilot/.github/steps/3-copilot-hub.md renamed to 03-Introduction-to-GitHub-Copilot/steps/3-copilot-hub.md

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,10 @@
1-
<!--
2-
<<< Author notes: Step 3 >>>
3-
Start this step by acknowledging the previous step.
4-
Define terms and link to docs.github.com.
5-
-->
6-
71
## Step 3: View the GitHub Copilot tab with multiple suggestions
82

93
_Nice work! You just used AI code suggestions within a C# file by using GitHub Copilot :sparkles:_
104

115
Keep in mind that as you continue to use copilot, you may not want some of the suggestions GitHub Copilot offers. GitHub Copilot will show you multiple suggestions in a new tab.
126

13-
### :keyboard: Activity: Pull the latest code to the Codespace repo.
14-
15-
> **Note**
16-
> Pull MUST be done prior to the next activity.
17-
18-
1. Use the VS Code terminal to pull the latest code:
19-
20-
```
21-
git pull
22-
```
23-
24-
### :keyboard: Activity: Add another C# method and view all suggestions
7+
### ⌨️ Activity: Add another C# method and view all suggestions
258

269
1. From inside the codespace in the Solution Explorer, right click on the project, create a new file.
2710

@@ -43,7 +26,7 @@ Keep in mind that as you continue to use copilot, you may not want some of the s
4326
7. Find a solution you like and click `Accept Solution`.
4427
8. Your `Member.cs` file will be updated with your solution.
4528

46-
### :keyboard: Activity: Push code to your repository from the codespace
29+
### ⌨️ Activity: Push code to your repository from the codespace
4730

4831
1. Use the VS Code terminal to add the `Member.cs` file to the repository:
4932

@@ -63,4 +46,5 @@ Keep in mind that as you continue to use copilot, you may not want some of the s
6346
git push
6447
```
6548

66-
**Wait about 60 seconds then refresh your repository landing page for the next step.**
49+
50+
Head to [Part 4 of the Exercise](./4-copilot-comment.md)

0 commit comments

Comments
 (0)