Skip to content
Merged
24 changes: 4 additions & 20 deletions .github/steps/1-preparing.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Let's start up our development environment, use copilot to learn a bit about the

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

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

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

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

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

> ![Static Badge](https://img.shields.io/badge/-Prompt-text?style=social&logo=github%20copilot)
>
Expand Down Expand Up @@ -98,28 +98,12 @@ Great work! Now that we are familiar with the app and we know it works, let's as
> ![Static Badge](https://img.shields.io/badge/-Prompt-text?style=social&logo=github%20copilot)
>
> ```prompt
> Hey copilot, how can I create and publish a new Git branch?
> ```

> **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.

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.

```bash
git checkout -b {new_branch_name}
git push -u origin {new_branch_name}
```

> ![Static Badge](https://img.shields.io/badge/-Prompt-text?style=social&logo=github%20copilot)
>
> ```prompt
> Awesome! Thanks, Copilot! Let's use the
> branch name "accelerate-with-copilot".
> Hey copilot, how can I create and publish a new Git branch called "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.

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!
1. Press the `Run` button to let Copilot insert the terminal command for us. No need to copy and paste!

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!

Expand Down
6 changes: 3 additions & 3 deletions .github/steps/4-copilot-on-github.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ Congratulations! You are finished with coding for this exercise (and VS Code). N

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!

> [!NOTE]
> [!NOTE]
> 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)

#### Copilot code review

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.

> [!NOTE]
> [!NOTE]
> 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)

### :keyboard: Activity: Summarize and review a PR with Copilot

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

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

Expand Down
2 changes: 1 addition & 1 deletion .github/steps/x-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Here's a recap of your accomplishments:
- Use Copilot to fix issues found during a pull request review.
- Use Copilot to generate tests and documentation.
- Use Copilot with different models.
- Check out the other [GitHub Skills exercises](https://skills.github.com).
- Check out the other [GitHub Skills exercises](https://learn.github.com/skills).
- Learn how to [Integrate MCP with Copilot](https://github.com/skills/integrate-mcp-with-copilot)
- Try GitHub Copilot Coding Agent in the [Expand your team with Copilot](https://github.com/skills/expand-your-team-with-copilot) exercise

Expand Down
38 changes: 16 additions & 22 deletions .github/workflows/0-start-exercise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
if: |
!github.event.repository.is_template
name: Start Exercise
uses: skills/exercise-toolkit/.github/workflows/start-exercise.yml@v0.6.0
uses: skills/exercise-toolkit/.github/workflows/start-exercise.yml@v0.7.0
with:
exercise-title: "Getting Started with GitHub Copilot"
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! 💻✨"
Expand All @@ -28,7 +28,8 @@ jobs:
runs-on: ubuntu-latest
needs: [start_exercise]
env:
ISSUE_URL: ${{ needs.start_exercise.outputs.issue-url }}
ISSUE_NUMBER: ${{ needs.start_exercise.outputs.issue-number }}
ISSUE_REPOSITORY: ${{ github.repository }}

steps:
- name: Checkout
Expand All @@ -39,33 +40,26 @@ jobs:
with:
repository: skills/exercise-toolkit
path: exercise-toolkit
ref: v0.6.0
ref: v0.7.0

- name: Build comment - add step content
id: build-comment
uses: skills/action-text-variables@v2
- name: Create comment - add step content
uses: GrantBirki/comment@v2.1.1
with:
template-file: ${{ env.STEP_1_FILE }}
template-vars: |
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: ${{ env.STEP_1_FILE }}
vars: |
login: ${{ github.actor }}
full_repo_name: ${{ github.repository }}

- name: Create comment - add step content
run: |
gh issue comment "$ISSUE_URL" \
--body "$ISSUE_BODY"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_BODY: ${{ steps.build-comment.outputs.updated-text }}

- name: Create comment - watching for progress
run: |
gh issue comment "$ISSUE_URL" \
--body-file "exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md

- name: Disable current workflow and enable next one
- name: Enable next step workflow
run: |
gh workflow enable "Step 1"
env:
Expand Down
88 changes: 24 additions & 64 deletions .github/workflows/1-preparing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ env:
jobs:
find_exercise:
name: Find Exercise Issue
uses: skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.6.0
uses: skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.7.0

check_step_work:
name: Check step work
runs-on: ubuntu-latest
post_next_step_content:
name: Post next step content
needs: [find_exercise]
runs-on: ubuntu-latest
env:
ISSUE_URL: ${{ needs.find_exercise.outputs.issue-url }}
ISSUE_REPOSITORY: ${{ github.repository }}
ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }}

steps:
- name: Checkout
Expand All @@ -34,75 +35,34 @@ jobs:
with:
repository: skills/exercise-toolkit
path: exercise-toolkit
ref: v0.6.0

- name: Update comment - checking work
run: |
gh issue comment "$ISSUE_URL" \
--body-file exercise-toolkit/markdown-templates/step-feedback/checking-work.md \
--edit-last
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# START: Check practical exercise

# Nothing to verify. Creating the branch is enough for now.
# In a future update, we will check that the codepsace is running and that the website is visible.
ref: v0.7.0

# END: Check practical exercise

- name: Build message - step finished
id: build-message-step-finish
uses: skills/action-text-variables@v2
- name: Create comment - step finished
uses: GrantBirki/comment@v2.1.1
with:
template-file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
template-vars: |
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
vars: |
next_step_number: 2

- name: Update comment - step finished
run: |
gh issue comment "$ISSUE_URL" \
--body "$ISSUE_BODY" \
--edit-last
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_BODY: ${{ steps.build-message-step-finish.outputs.updated-text }}

post_next_step_content:
name: Post next step content
needs: [find_exercise, check_step_work]
runs-on: ubuntu-latest
env:
ISSUE_URL: ${{ needs.find_exercise.outputs.issue-url }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get response templates
uses: actions/checkout@v4
with:
repository: skills/exercise-toolkit
path: exercise-toolkit
ref: v0.6.0

- name: Create comment - add step content
run: |
gh issue comment "$ISSUE_URL" \
--body-file "$STEP_2_FILE"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: ${{ env.STEP_2_FILE }}

- name: Create comment - watching for progress
run: |
gh issue comment "$ISSUE_URL" \
--body-file exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md

- name: Disable current workflow and enable next one
run: |
gh workflow disable "Step 1"
gh workflow disable "${{github.workflow}}"
gh workflow enable "Step 2"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading