├── .github ├── steps │ ├── -step.txt │ ├── 0-welcome.md │ ├── 1-copilot-extension.md │ ├── 2-skills-javascript.md │ ├── 3-copilot-hub.md │ ├── 4-copilot-comment.md │ └── X-finish.md └── workflows │ ├── 0-welcome.yml │ ├── 1-copilot-extension.yml │ ├── 2-skills-javascript.yml │ ├── 3-copilot-hub.yml │ └── 4-copilot-comment.yml ├── .gitignore ├── LICENSE └── README.md /.github/steps/-step.txt: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /.github/steps/0-welcome.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.github/steps/1-copilot-extension.md: -------------------------------------------------------------------------------- 1 | 8 | 9 | ## Step 1: Leverage Codespaces with VS Code for Copilot 10 | 11 | _Welcome to "Develop With AI Powered Code Suggestions Using GitHub Copilot and VS Code"! :wave:_ 12 | 13 | GitHub Copilot is an AI pair programmer that helps you write code faster and with less work. It draws context from comments and code to suggest individual lines and whole functions instantly. GitHub Copilot is powered by OpenAI Codex, a generative pretrained language model created by OpenAI. 14 | 15 | **Copilot works with many code editors including VS Code, Visual Studio, JetBrains IDE, and Neovim.** 16 | 17 | Additionally, GitHub Copilot is trained on all languages that appear in public repositories. For each language, the quality of suggestions you receive may depend on the volume and diversity of training data for that language. 18 | 19 | Using Copilot inside a Codespace shows just how easy it is to get up and running with GitHub's suite of [Collaborative Coding](https://github.com/features#features-collaboration) tools. 20 | 21 | > **Note** 22 | > 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. 23 | 24 | ### :keyboard: Activity: Enable Copilot inside a Codespace 25 | 26 | **We recommend opening another browser tab to work through the following activities so you can keep these instructions open for reference.** 27 | 28 | 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. 29 | 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: 36 | ``` 37 | { 38 | // Name this configuration 39 | "name": "Codespace for Skills!", 40 | "customizations": { 41 | "vscode": { 42 | "extensions": [ 43 | "GitHub.copilot" 44 | ] 45 | } 46 | } 47 | } 48 | ``` 49 | 1. Select the option to **Commit directly to the `main` branch**, and then click the **Commit new file** button. 50 | 1. Navigate back to the home page of your repository by clicking the **Code** tab located at the top left of the screen. 51 | 1. Click the **Code** button located in the middle of the page. 52 | 1. Click the **Codespaces** tab on the box that pops up. 53 | 1. Click the **Create codespace on main** button. 54 | 55 | **Wait about 2 minutes for the codespace to spin itself up.** 56 | 57 | 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: 58 | ![Screen Shot 2023-03-09 at 9 09 07 AM](https://user-images.githubusercontent.com/26442605/224102962-d0222578-3f10-4566-856d-8d59f28fcf2e.png) 59 | 1. The `copilot` extension should show up in the VS Code extension list. Click the extensions sidebar tab. You should see the following: 60 | ![Screen Shot 2023-03-09 at 9 04 13 AM](https://user-images.githubusercontent.com/26442605/224102514-7d6d2f51-f435-401d-a529-7bae3ae3e511.png) 61 | 62 | **Wait about 60 seconds then refresh your repository landing page for the next step.** 63 | -------------------------------------------------------------------------------- /.github/steps/2-skills-javascript.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | ## Step 2: Seeing AI code suggestions in a Javascript file! 8 | 9 | _Nice work! :tada: You created a Codespace using a devcontainer file that installed Copilot!_ 10 | 11 | GitHub Copilot provides suggestions for numerous languages and a wide variety of frameworks, but works especially well for Python, JavaScript, TypeScript, Ruby, Go, C# and C++. The following samples are in JavaScript, but other languages will work similarly. 12 | 13 | Let's try this out utilizing Javascript for Copilot. 14 | 15 | ### :keyboard: Activity: Add a Javascript file and start writing code 16 | 17 | 1. From inside the codespace in the VS Code explorer window, create a new file. 18 | 19 | > **Note**: 20 | > If you closed the Codespace from above, please open it back up or create a new Codespace. 21 | 22 | 2. Name the file `skills.js` 23 | 3. Verify your new file looks like: 24 | ![Screen Shot 2023-03-09 at 9 21 34 AM](https://user-images.githubusercontent.com/26442605/224105906-d1beb531-b747-4c7a-85ba-a12526488422.png) 25 | 4. In the `skills.js` file, type the following function header. 26 | 27 | ``` 28 | function calculateNumbers(var1, var2) 29 | ``` 30 | 31 | GitHub Copilot will automatically suggest an entire function body in grayed text. Below is an example of what you'll most likely see, but the exact suggestion may vary. 32 | ![Screen Shot 2023-04-27 at 10 23 06 AM](https://user-images.githubusercontent.com/26442605/234941079-b4bf3e9d-fc70-4b20-b74c-0ee753ba344e.png) 33 | 34 | 5. Press `Tab` to accept the suggestion. 35 | 36 | ### :keyboard: Activity: Push code to your repository from the codespace 37 | 38 | 1. Use the VS Code terminal to add the `skills.js` file to the repository: 39 | 40 | ``` 41 | git add skills.js 42 | ``` 43 | 44 | 2. Next from the VS Code terminal stage and commit the changes to the repository: 45 | 46 | ``` 47 | git commit -m "Copilot first commit" 48 | ``` 49 | 50 | 3. Finally from the VS Code terminal push to code to the repository: 51 | 52 | ``` 53 | git push 54 | ``` 55 | 56 | **Wait about 60 seconds then refresh your repository landing page for the next step.** 57 | -------------------------------------------------------------------------------- /.github/steps/3-copilot-hub.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | ## Step 3: View the GitHub Copilot tab with multiple suggestions 8 | 9 | _Nice work! You just used AI code suggestions within a Javascript file by using GitHub Copilot :sparkles:_ 10 | 11 | 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. 12 | 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 Javascript method and view all suggestions 25 | 26 | 1. From inside the codespace in the VS Code explorer window, create a new file. Note: If you closed the Codespace from above please open it back up or create a new Codespace. 27 | 2. Name the file `member.js` 28 | 3. In the `member.js` file, type the following function header. 29 | ``` 30 | function skillsMember() 31 | ``` 32 | 4. Stop typing and view the Copilot suggestion by hovering over the red squiggly and select the `...` 33 | 5. Click `Open Completions Panel`. Copilot will synthesize around 10 different code suggestions. You should see something like this: 34 | ![Screen Shot 2023-04-27 at 10 06 55 AM](https://user-images.githubusercontent.com/26442605/234937592-d196bd5e-8ac2-4d9a-87f4-94e8a9b6a417.png) 35 | 6. Find a solution you like and click `Accept Solution`. 36 | 7. Your `member.js` file will be updated with your solution. 37 | 38 | ### :keyboard: Activity: Push code to your repository from the codespace 39 | 40 | 1. Use the VS Code terminal to add the `member.js` file to the repository: 41 | 42 | ``` 43 | git add member.js 44 | ``` 45 | 46 | 2. Next from the VS Code terminal stage and commit the changes to the repository: 47 | 48 | ``` 49 | git commit -m "Copilot second commit" 50 | ``` 51 | 52 | 3. Finally from the VS Code terminal push to code to the repository: 53 | 54 | ``` 55 | git push 56 | ``` 57 | 58 | **Wait about 60 seconds then refresh your repository landing page for the next step.** 59 | -------------------------------------------------------------------------------- /.github/steps/4-copilot-comment.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | ## Step 4: Using comments to generate code with Copilot 8 | 9 | _Nicely done utilizing the Copilot tab!_ :partying_face: 10 | 11 | You now have leveraged the Copilot quick tab auto-suggest as well as the Copilot hub to accept AI generated suggestions. 12 | 13 | Now lets see how you can leverage comments to generate Copilot suggestions! 14 | 15 | ### :keyboard: Activity: Pull the latest code to the Codespace repo. 16 | 17 | > **Note** 18 | > Pull MUST be done prior to the next activity. 19 | 20 | 1. Use the VS Code terminal to pull the latest code: 21 | 22 | ``` 23 | git pull 24 | ``` 25 | 26 | ### :keyboard: Activity: Generate Copilot suggested code from comments. 27 | 28 | 1. From inside the codespace in the VS Code explorer window, create a new file. (If you closed the Codespace from above, please open it back up or create a new Codespace.) 29 | 2. Name the file `comments.js`. 30 | 3. Type the following comment into the file: 31 | ``` 32 | // Create web server 33 | ``` 34 | 4. Press `enter` to go to a new line. 35 | 5. Copilot will suggest a code block. 36 | 6. Hover over the red squiggly and select the `...` 37 | 38 | > **Note** 39 | > If you don't see the copilot code block suggestion or the red squiggly and the three dots `...`, you can type `control + enter` to bring up the GitHub Copilot completions panel. 40 | 41 | 7. Click `Open Completions Panel`. Copilot will synthesise around 10 different code suggestions. You should see something like this: 42 | ![Screen Shot 2023-04-25 at 3 59 42 PM](https://user-images.githubusercontent.com/26442605/234425509-74ea96e0-bbd6-417b-84c5-73546ac7b2cd.png) 43 | 8. Find a solution you like and click `Accept Solution`. 44 | 9. Your `comments.js` file will be updated with your solution. 45 | 46 | ### :keyboard: Activity: Push code to your repository from the codespace 47 | 48 | 1. Use the VS Code terminal to add the `comments.js` file to the repository: 49 | 50 | ``` 51 | git add comments.js 52 | ``` 53 | 54 | 2. Next from the VS Code terminal stage and commit the changes to the repository: 55 | 56 | ``` 57 | git commit -m "Copilot third commit" 58 | ``` 59 | 60 | 3. Finally from the VS Code terminal push to code to the repository: 61 | 62 | ``` 63 | git push 64 | ``` 65 | 66 | **Wait about 60 seconds then refresh your repository landing page for the next step.** 67 | -------------------------------------------------------------------------------- /.github/steps/X-finish.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | ## Finish 7 | 8 | _Congratulations friend, you've completed this course!_ 9 | 10 | celebrate 11 | 12 | Here's a recap of all the tasks you completed: 13 | 14 | - Set up Copilot inside a Codespace. 15 | - Use Copilot to accept suggested code. 16 | - Use Copilot's hub for alternate suggestions. 17 | - Leverage comments to have Copilot auto-suggest code. 18 | 19 | ### Additional learning and resources 20 | 21 | - [What is GitHub Copilot](https://docs.github.com/en/copilot/about-github-copilot/what-is-github-copilot) 22 | - [About enterprise accounts for Copilot Business](https://docs.github.com/en/enterprise-cloud@latest/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business) 23 | - [Getting started with Copilot](https://docs.github.com/en/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio-code) 24 | - [Configure Copilot settings](https://docs.github.com/en/copilot/configuring-github-copilot/configuring-github-copilot-settings-on-githubcom) 25 | 26 | ### What's next? 27 | 28 | - [We'd love to hear what you thought of this course](https://github.com/orgs/skills/discussions/categories/code-with-copilot). 29 | - [Learn another GitHub skill](https://github.com/skills). 30 | - [Read the Get started with GitHub docs](https://docs.github.com/en/get-started). 31 | - To find projects to contribute to, check out [GitHub Explore](https://github.com/explore). 32 | -------------------------------------------------------------------------------- /.github/workflows/0-welcome.yml: -------------------------------------------------------------------------------- 1 | name: Step 0, Welcome 2 | 3 | # This step triggers after the learner creates a new repository from the template. 4 | # This workflow updates from step 0 to step 1. 5 | 6 | # This will run every time we create push a commit to `main`. 7 | # Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows 8 | on: 9 | workflow_dispatch: 10 | push: 11 | branches: 12 | - main 13 | 14 | # Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication 15 | permissions: 16 | # Need `contents: read` to checkout the repository. 17 | # Need `contents: write` to update the step metadata. 18 | contents: write 19 | 20 | jobs: 21 | get_current_step: 22 | name: Check current step number 23 | runs-on: ubuntu-latest 24 | steps: 25 | - name: Checkout 26 | uses: actions/checkout@v4 27 | - id: get_step 28 | run: echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT 29 | outputs: 30 | current_step: ${{ steps.get_step.outputs.current_step }} 31 | 32 | on_start: 33 | name: On start 34 | needs: get_current_step 35 | 36 | # We will only run this action when: 37 | # 1. This repository isn't the template repository. 38 | # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts 39 | # Reference: https://docs.github.com/en/actions/learn-github-actions/expressions 40 | if: ${{ !github.event.repository.is_template && needs.get_current_step.outputs.current_step == 0}} 41 | 42 | # We'll run Ubuntu for performance instead of Mac or Windows. 43 | runs-on: ubuntu-latest 44 | 45 | steps: 46 | # We'll need to check out the repository so that we can edit the README. 47 | - name: Checkout 48 | uses: actions/checkout@v4 49 | with: 50 | fetch-depth: 0 # Let's get all the branches. 51 | 52 | # In README.md, switch step 0 for step 1. 53 | - name: Update to step 1 54 | uses: skills/action-update-step@v2 55 | with: 56 | token: ${{ secrets.GITHUB_TOKEN }} 57 | from_step: 0 58 | to_step: 1 59 | -------------------------------------------------------------------------------- /.github/workflows/1-copilot-extension.yml: -------------------------------------------------------------------------------- 1 | name: Step 1, Copilot Extension in a Codespace 2 | 3 | # This step triggers after push to main#devcontainer.json. 4 | # This workflow updates from step 1 to step 2. 5 | 6 | # This will run every time we main#devcontainer.json 7 | # Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows 8 | on: 9 | workflow_dispatch: 10 | push: 11 | paths: 12 | - ".devcontainer/devcontainer.json" 13 | branches: 14 | - main 15 | 16 | # Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication 17 | permissions: 18 | # Need `contents: read` to checkout the repository. 19 | # Need `contents: write` to update the step metadata. 20 | contents: write 21 | 22 | jobs: 23 | # The purpose of this job is to output the current step number 24 | # (retreived from the step file). This output variable can 25 | # then be referenced in other jobs and used in conditional. 26 | # expressions. 27 | get_current_step: 28 | name: Check current step number 29 | runs-on: ubuntu-latest 30 | steps: 31 | - name: Checkout 32 | uses: actions/checkout@v4 33 | - id: get_step 34 | run: echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT 35 | outputs: 36 | current_step: ${{ steps.get_step.outputs.current_step }} 37 | 38 | on_add_devcontainer: 39 | name: On Add Devcontainer 40 | needs: get_current_step 41 | 42 | # We will only run this action when: 43 | # 1. This repository isn't the template repository. 44 | # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts 45 | # Reference: https://docs.github.com/en/actions/learn-github-actions/expressions 46 | if: ${{ !github.event.repository.is_template && needs.get_current_step.outputs.current_step == 1 }} 47 | 48 | # We'll run Ubuntu for performance instead of Mac or Windows. 49 | runs-on: ubuntu-latest 50 | 51 | steps: 52 | # We'll need to check out the repository so that we can edit the README. 53 | - name: Checkout 54 | uses: actions/checkout@v4 55 | 56 | # Verify the learner added the file contents. 57 | - name: Check workflow contents, jobs 58 | uses: skills/action-check-file@v1 59 | with: 60 | file: ".devcontainer/devcontainer.json" 61 | search: "GitHub\\.copilot" 62 | 63 | # In README.md, switch step 1 for step 2. 64 | - name: Update to step 2 65 | uses: skills/action-update-step@v2 66 | with: 67 | token: ${{ secrets.GITHUB_TOKEN }} 68 | from_step: 1 69 | to_step: 2 70 | -------------------------------------------------------------------------------- /.github/workflows/2-skills-javascript.yml: -------------------------------------------------------------------------------- 1 | name: Step 2, Javascript function 2 | 3 | # This step triggers after push to main#skills.js. 4 | # This workflow updates from step 2 to step 3. 5 | 6 | # This will run every time we push to main#skills.js. 7 | # Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows 8 | on: 9 | workflow_dispatch: 10 | push: 11 | paths: 12 | - "skills.js" 13 | branches: 14 | - main 15 | 16 | # Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication 17 | permissions: 18 | # Need `contents: read` to checkout the repository. 19 | # Need `contents: write` to update the step metadata. 20 | contents: write 21 | 22 | jobs: 23 | # The purpose of this job is to output the current step number 24 | # (retreived from the step file). This output variable can 25 | # then be referenced in other jobs and used in conditional 26 | # expressions. 27 | get_current_step: 28 | name: Check current step number 29 | runs-on: ubuntu-latest 30 | steps: 31 | - name: Checkout 32 | uses: actions/checkout@v4 33 | - id: get_step 34 | run: echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT 35 | outputs: 36 | current_step: ${{ steps.get_step.outputs.current_step }} 37 | 38 | on_functionadded: 39 | name: On Creation of a Javascript function 40 | needs: get_current_step 41 | 42 | # We will only run this action when: 43 | # 1. This repository isn't the template repository. 44 | # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts 45 | # Reference: https://docs.github.com/en/actions/learn-github-actions/expressions 46 | if: ${{ !github.event.repository.is_template && needs.get_current_step.outputs.current_step == 2 }} 47 | 48 | # We'll run Ubuntu for performance instead of Mac or Windows. 49 | runs-on: ubuntu-latest 50 | 51 | steps: 52 | # We'll need to check out the repository so that we can edit the README. 53 | - name: Checkout 54 | uses: actions/checkout@v4 55 | with: 56 | fetch-depth: 0 # Let's get all the branches. 57 | 58 | # Verify the PR updated package.json 59 | - name: Check package.json 60 | uses: skills/action-check-file@v1 61 | with: 62 | file: "skills.js" 63 | search: "function calculateNumbers" 64 | 65 | # In README.md, switch step 2 for step 3. 66 | - name: Update to step 3 67 | uses: skills/action-update-step@v2 68 | with: 69 | token: ${{ secrets.GITHUB_TOKEN }} 70 | from_step: 2 71 | to_step: 3 72 | -------------------------------------------------------------------------------- /.github/workflows/3-copilot-hub.yml: -------------------------------------------------------------------------------- 1 | name: Step 3, Copilot hub suggestion 2 | 3 | # This step triggers after push to main#member.js. 4 | # This workflow updates from step 3 to step 4. 5 | 6 | # This will run every time we push to main#member.js. 7 | # Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows 8 | on: 9 | workflow_dispatch: 10 | push: 11 | paths: 12 | - "member.js" 13 | branches: 14 | - main 15 | 16 | # Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication 17 | permissions: 18 | # Need `contents: read` to checkout the repository. 19 | # Need `contents: write` to update the step metadata. 20 | contents: write 21 | 22 | jobs: 23 | # The purpose of this job is to output the current step number 24 | # (retreived from the step file). This output variable can 25 | # then be referenced in other jobs and used in conditional 26 | # expressions. 27 | get_current_step: 28 | name: Check current step number 29 | runs-on: ubuntu-latest 30 | steps: 31 | - name: Checkout 32 | uses: actions/checkout@v4 33 | - id: get_step 34 | run: echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT 35 | outputs: 36 | current_step: ${{ steps.get_step.outputs.current_step }} 37 | 38 | on_Copilothubsuggestions: 39 | name: On Copilot hub suggestion 40 | needs: get_current_step 41 | 42 | # We will only run this action when: 43 | # 1. This repository isn't the template repository. 44 | # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts 45 | # Reference: https://docs.github.com/en/actions/learn-github-actions/expressions 46 | if: ${{ !github.event.repository.is_template && needs.get_current_step.outputs.current_step == 3 }} 47 | 48 | # We'll run Ubuntu for performance instead of Mac or Windows. 49 | runs-on: ubuntu-latest 50 | 51 | steps: 52 | # We'll need to check out the repository so that we can edit the README. 53 | - name: Checkout 54 | uses: actions/checkout@v4 55 | with: 56 | fetch-depth: 0 # Let's get all the branches. 57 | 58 | # Verify the skills member function is present. 59 | - name: Check package for axios version 0.21.2 60 | uses: skills/action-check-file@v1 61 | with: 62 | file: "member.js" 63 | search: "skillsMember" 64 | 65 | # In README.md, switch step 3 for step 4. 66 | - name: Update to step 4 67 | uses: skills/action-update-step@v2 68 | with: 69 | token: ${{ secrets.GITHUB_TOKEN }} 70 | from_step: 3 71 | to_step: 4 72 | -------------------------------------------------------------------------------- /.github/workflows/4-copilot-comment.yml: -------------------------------------------------------------------------------- 1 | name: Step 4, Add Copilot suggestion from comment 2 | 3 | # This step triggers after push to main#comments.js. 4 | # This step updates from step 3 to step 4. 5 | 6 | # This will run every time we main#comments.js. 7 | # Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows 8 | on: 9 | workflow_dispatch: 10 | push: 11 | branches: 12 | - main 13 | paths: 14 | - "comments.js" 15 | 16 | # Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication 17 | permissions: 18 | # Need `contents: read` to checkout the repository. 19 | # Need `contents: write` to update the step metadata. 20 | contents: write 21 | 22 | jobs: 23 | # The purpose of this job is to output the current step number 24 | # (retreived from the step file). This output variable can 25 | # then be referenced in other jobs and used in conditional 26 | # expressions. 27 | get_current_step: 28 | name: Check current step number 29 | runs-on: ubuntu-latest 30 | steps: 31 | - name: Checkout 32 | uses: actions/checkout@v4 33 | - id: get_step 34 | run: echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT 35 | outputs: 36 | current_step: ${{ steps.get_step.outputs.current_step }} 37 | 38 | on_push_to_comments: 39 | name: On code generated from comment 40 | needs: get_current_step 41 | 42 | # We will only run this action when: 43 | # 1. This repository isn't the template repository. 44 | # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts 45 | # Reference: https://docs.github.com/en/actions/learn-github-actions/expressions 46 | if: ${{ !github.event.repository.is_template && needs.get_current_step.outputs.current_step == 4}} 47 | 48 | # We'll run Ubuntu for performance instead of Mac or Windows. 49 | runs-on: ubuntu-latest 50 | 51 | steps: 52 | # We'll need to check out the repository so that we can edit the README. 53 | - name: Checkout 54 | uses: actions/checkout@v4 55 | with: 56 | fetch-depth: 0 # Let's get all the branches. 57 | 58 | # Verify the learner added the file contents. 59 | - name: Check workflow contents, jobs 60 | uses: skills/action-check-file@v1 61 | with: 62 | file: "comments.js" 63 | search: "Create web server" 64 | 65 | # In README.md, switch step 3 for step X. 66 | - name: Update to step X 67 | uses: skills/action-update-step@v2 68 | with: 69 | token: ${{ secrets.GITHUB_TOKEN }} 70 | from_step: 4 71 | to_step: X 72 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.com 4 | *.class 5 | *.dll 6 | *.exe 7 | *.o 8 | *.so 9 | 10 | # Packages # 11 | ############ 12 | # it's better to unpack these files and commit the raw source 13 | # git has its own built in compression methods 14 | *.7z 15 | *.dmg 16 | *.gz 17 | *.iso 18 | *.jar 19 | *.rar 20 | *.tar 21 | *.zip 22 | 23 | # Logs and databases # 24 | ###################### 25 | *.log 26 | *.sql 27 | *.sqlite 28 | 29 | # OS generated files # 30 | ###################### 31 | .DS_Store 32 | .DS_Store? 33 | ._* 34 | .Spotlight-V100 35 | .Trashes 36 | ehthumbs.db 37 | Thumbs.db 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) GitHub and others 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | ![Deprecation Badge](https://img.shields.io/badge/Skills-Deprecated-333?logo=github&labelColor=454c54&color=bf8700) 4 | 5 | This course has been deprecated. Please visit the [Getting Started with GitHub Copilot](https://github.com/skills/getting-started-with-github-copilot) exercise for the newest learning content. 6 | --------------------------------------------------------------------------------