Skip to content

Commit 3d3cb7d

Browse files
feat: restructure workflows to use latest conventions, remove step 4b, simplify step1 (#81)
Co-authored-by: Christopher W. Blake <[email protected]>
1 parent 9bacd7d commit 3d3cb7d

File tree

10 files changed

+202
-411
lines changed

10 files changed

+202
-411
lines changed

.github/steps/1-preparing.md

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Let's start up our development environment, use copilot to learn a bit about the
3838

3939
1. Confirm the **Repository** field is your copy of the exercise, not the original, then click the green **Create Codespace** button.
4040

41-
- ✅ Your copy: `/{{{full_repo_name}}}`
41+
- ✅ Your copy: `/{{full_repo_name}}`
4242
- ❌ Original: `/skills/getting-started-with-github-copilot`
4343

4444
1. Wait a moment for Visual Studio Code to load in your browser.
@@ -55,7 +55,7 @@ Let's start up our development environment, use copilot to learn a bit about the
5555

5656
1. If this is your first time using GitHub Copilot, you will need to accept the usage terms to continue.
5757

58-
1. Enter the below prompt to ask Copilot to introduce you to the project.
58+
1. Enter the below prompt to ask Copilot to introduce you to the project. Use Copilot **Ask Mode** for this prompt.
5959

6060
> ![Static Badge](https://img.shields.io/badge/-Prompt-text?style=social&logo=github%20copilot)
6161
>
@@ -98,28 +98,12 @@ Great work! Now that we are familiar with the app and we know it works, let's as
9898
> ![Static Badge](https://img.shields.io/badge/-Prompt-text?style=social&logo=github%20copilot)
9999
>
100100
> ```prompt
101-
> Hey copilot, how can I create and publish a new Git branch?
102-
> ```
103-
104-
> **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.
105-
106-
1. Copilot probably gave us a command like the following. Rather than manually modify it, let's respond back to tell Copilot to use a particular name.
107-
108-
```bash
109-
git checkout -b {new_branch_name}
110-
git push -u origin {new_branch_name}
111-
```
112-
113-
> ![Static Badge](https://img.shields.io/badge/-Prompt-text?style=social&logo=github%20copilot)
114-
>
115-
> ```prompt
116-
> Awesome! Thanks, Copilot! Let's use the
117-
> branch name "accelerate-with-copilot".
101+
> Hey copilot, how can I create and publish a new Git branch called "accelerate-with-copilot"?
118102
> ```
119103
120104
> **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.
121105
122-
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!
106+
1. Press the `Run` button to let Copilot insert the terminal command for us. No need to copy and paste!
123107
124108
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!
125109

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ Congratulations! You are finished with coding for this exercise (and VS Code). N
66

77
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 documented well. Fortunately, Copilot can consider all changes in the pull request and provide the important highlights, and with references too!
88

9-
> [!NOTE]
9+
> [!NOTE]
1010
> This feature is not available in **GitHub Copilot Free**. [[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)
1111
1212
#### Copilot code review
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 are fixed by simple adjustments, but please remember to use it responsibly.
1515

16-
> [!NOTE]
16+
> [!NOTE]
1717
> This feature is not available in **GitHub Copilot Free**. [[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
2020

21-
Both **Copilot pull request summaries** and **Copilot code 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.
21+
Both **Copilot pull request summaries** and **Copilot code review** have limited access, so this activity is mostly optional. If you have access, go ahead and try them though! If not, you can skip the optional steps.
2222

2323
1. In a web browser, open another tab and navigate to your exercise repository.
2424

.github/steps/x-review.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Here's a recap of your accomplishments:
1818
- Use Copilot to fix issues found during a pull request review.
1919
- Use Copilot to generate tests and documentation.
2020
- Use Copilot with different models.
21-
- Check out the other [GitHub Skills exercises](https://skills.github.com).
21+
- Check out the other [GitHub Skills exercises](https://learn.github.com/skills).
2222
- Learn how to [Integrate MCP with Copilot](https://github.com/skills/integrate-mcp-with-copilot)
2323
- Try GitHub Copilot Coding Agent in the [Expand your team with Copilot](https://github.com/skills/expand-your-team-with-copilot) exercise
2424

.github/workflows/0-start-exercise.yml

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
if: |
1919
!github.event.repository.is_template
2020
name: Start Exercise
21-
uses: skills/exercise-toolkit/.github/workflows/start-exercise.yml@v0.6.0
21+
uses: skills/exercise-toolkit/.github/workflows/start-exercise.yml@v0.7.0
2222
with:
2323
exercise-title: "Getting Started with GitHub Copilot"
2424
intro-message: "Welcome to the exciting world of GitHub Copilot! 🚀 In this exercise, you'll unlock the potential of this AI-powered coding assistant to accelerate your development process. Let's dive in and have some fun exploring the future of coding together! 💻✨"
@@ -28,7 +28,8 @@ jobs:
2828
runs-on: ubuntu-latest
2929
needs: [start_exercise]
3030
env:
31-
ISSUE_URL: ${{ needs.start_exercise.outputs.issue-url }}
31+
ISSUE_NUMBER: ${{ needs.start_exercise.outputs.issue-number }}
32+
ISSUE_REPOSITORY: ${{ github.repository }}
3233

3334
steps:
3435
- name: Checkout
@@ -39,33 +40,26 @@ jobs:
3940
with:
4041
repository: skills/exercise-toolkit
4142
path: exercise-toolkit
42-
ref: v0.6.0
43+
ref: v0.7.0
4344

44-
- name: Build comment - add step content
45-
id: build-comment
46-
uses: skills/action-text-variables@v2
45+
- name: Create comment - add step content
46+
uses: GrantBirki/[email protected]
4747
with:
48-
template-file: ${{ env.STEP_1_FILE }}
49-
template-vars: |
48+
repository: ${{ env.ISSUE_REPOSITORY }}
49+
issue-number: ${{ env.ISSUE_NUMBER }}
50+
file: ${{ env.STEP_1_FILE }}
51+
vars: |
5052
login: ${{ github.actor }}
5153
full_repo_name: ${{ github.repository }}
5254
53-
- name: Create comment - add step content
54-
run: |
55-
gh issue comment "$ISSUE_URL" \
56-
--body "$ISSUE_BODY"
57-
env:
58-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59-
ISSUE_BODY: ${{ steps.build-comment.outputs.updated-text }}
60-
6155
- name: Create comment - watching for progress
62-
run: |
63-
gh issue comment "$ISSUE_URL" \
64-
--body-file "exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md"
65-
env:
66-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
uses: GrantBirki/[email protected]
57+
with:
58+
repository: ${{ env.ISSUE_REPOSITORY }}
59+
issue-number: ${{ env.ISSUE_NUMBER }}
60+
file: exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md
6761

68-
- name: Disable current workflow and enable next one
62+
- name: Enable next step workflow
6963
run: |
7064
gh workflow enable "Step 1"
7165
env:

.github/workflows/1-preparing.yml

Lines changed: 24 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ env:
1616
jobs:
1717
find_exercise:
1818
name: Find Exercise Issue
19-
uses: skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.6.0
19+
uses: skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.7.0
2020

21-
check_step_work:
22-
name: Check step work
23-
runs-on: ubuntu-latest
21+
post_next_step_content:
22+
name: Post next step content
2423
needs: [find_exercise]
24+
runs-on: ubuntu-latest
2525
env:
26-
ISSUE_URL: ${{ needs.find_exercise.outputs.issue-url }}
26+
ISSUE_REPOSITORY: ${{ github.repository }}
27+
ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }}
2728

2829
steps:
2930
- name: Checkout
@@ -34,75 +35,34 @@ jobs:
3435
with:
3536
repository: skills/exercise-toolkit
3637
path: exercise-toolkit
37-
ref: v0.6.0
38-
39-
- name: Update comment - checking work
40-
run: |
41-
gh issue comment "$ISSUE_URL" \
42-
--body-file exercise-toolkit/markdown-templates/step-feedback/checking-work.md \
43-
--edit-last
44-
env:
45-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
47-
# START: Check practical exercise
48-
49-
# Nothing to verify. Creating the branch is enough for now.
50-
# In a future update, we will check that the codepsace is running and that the website is visible.
38+
ref: v0.7.0
5139

52-
# END: Check practical exercise
53-
54-
- name: Build message - step finished
55-
id: build-message-step-finish
56-
uses: skills/action-text-variables@v2
40+
- name: Create comment - step finished
41+
uses: GrantBirki/[email protected]
5742
with:
58-
template-file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
59-
template-vars: |
43+
repository: ${{ env.ISSUE_REPOSITORY }}
44+
issue-number: ${{ env.ISSUE_NUMBER }}
45+
file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
46+
vars: |
6047
next_step_number: 2
6148
62-
- name: Update comment - step finished
63-
run: |
64-
gh issue comment "$ISSUE_URL" \
65-
--body "$ISSUE_BODY" \
66-
--edit-last
67-
env:
68-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69-
ISSUE_BODY: ${{ steps.build-message-step-finish.outputs.updated-text }}
70-
71-
post_next_step_content:
72-
name: Post next step content
73-
needs: [find_exercise, check_step_work]
74-
runs-on: ubuntu-latest
75-
env:
76-
ISSUE_URL: ${{ needs.find_exercise.outputs.issue-url }}
77-
78-
steps:
79-
- name: Checkout
80-
uses: actions/checkout@v4
81-
82-
- name: Get response templates
83-
uses: actions/checkout@v4
84-
with:
85-
repository: skills/exercise-toolkit
86-
path: exercise-toolkit
87-
ref: v0.6.0
88-
8949
- name: Create comment - add step content
90-
run: |
91-
gh issue comment "$ISSUE_URL" \
92-
--body-file "$STEP_2_FILE"
93-
env:
94-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
uses: GrantBirki/[email protected]
51+
with:
52+
repository: ${{ env.ISSUE_REPOSITORY }}
53+
issue-number: ${{ env.ISSUE_NUMBER }}
54+
file: ${{ env.STEP_2_FILE }}
9555

9656
- name: Create comment - watching for progress
97-
run: |
98-
gh issue comment "$ISSUE_URL" \
99-
--body-file exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md
100-
env:
101-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
uses: GrantBirki/[email protected]
58+
with:
59+
repository: ${{ env.ISSUE_REPOSITORY }}
60+
issue-number: ${{ env.ISSUE_NUMBER }}
61+
file: exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md
10262

10363
- name: Disable current workflow and enable next one
10464
run: |
105-
gh workflow disable "Step 1"
65+
gh workflow disable "${{github.workflow}}"
10666
gh workflow enable "Step 2"
10767
env:
10868
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)