From 78b77c230a8439473329616b447cbdb823b69d24 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 18 May 2024 02:50:18 +0000 Subject: [PATCH] Update to 1 in STEP and README.md --- .github/steps/-step.txt | 2 +- README.md | 81 +++++++++++++++++++++++++++-------------- 2 files changed, 54 insertions(+), 29 deletions(-) diff --git a/.github/steps/-step.txt b/.github/steps/-step.txt index 573541a..d00491f 100644 --- a/.github/steps/-step.txt +++ b/.github/steps/-step.txt @@ -1 +1 @@ -0 +1 diff --git a/README.md b/README.md index 8cddafa..97b379c 100644 --- a/README.md +++ b/README.md @@ -16,42 +16,67 @@ _GitHub Copilot can help you code by offering autocomplete-style suggestions rig -## Welcome +## Step 1: Leverage Codespaces with VS Code for Copilot -GitHub Copilot can help you code by offering autocomplete-style suggestions. You can learn how GitHub Copilot works, and what to consider while using GitHub Copilot. GitHub Copilot analyzes the context in the file you are editing, as well as related files, and offers suggestions from within your text editor. GitHub Copilot is powered by OpenAI Codex, a new AI system created by OpenAI. +_Welcome to "Develop With AI Powered Code Suggestions Using GitHub Copilot and VS Code"! :wave:_ -- **Who this is for**: Developers, DevOps Engineers, Software development managers, Testers. -- **What you'll learn**: How to install Copilot into a Codespace, accept suggestions from code, accept suggestions from comments. -- **What you'll build**: Javascript files that will have code generated by Copilot AI for code and comment suggestions. -- **Prerequisites**: To use GitHub Copilot you must have an active GitHub Copilot subscription. Sign up for 30 days free [Copilot](https://github.com/settings/copilot). -- **Timing**: This course can be completed in under an hour. +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. -### How to start this course +**Copilot works with many code editors including VS Code, Visual Studio, JetBrains IDE, and Neovim.** - +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. + +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. + +> **Note** +> 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. + +### :keyboard: Activity: Enable Copilot inside a Codespace + +**We recommend opening another browser tab to work through the following activities so you can keep these instructions open for reference.** + +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. + +1. Navigating back to your **Code** tab of your repository, click the **Add file** drop-down button, and then click `Create new file`. +1. Type or paste the following in the empty text field prompt to name your file. + ``` + .devcontainer/devcontainer.json + ``` +1. In the body of the new **.devcontainer/devcontainer.json** file, add the following content: + ``` + { + // Name this configuration + "name": "Codespace for Skills!", + "customizations": { + "vscode": { + "extensions": [ + "GitHub.copilot" + ] + } + } + } + ``` +1. Select the option to **Commit directly to the `main` branch**, and then click the **Commit new file** button. +1. Navigate back to the home page of your repository by clicking the **Code** tab located at the top left of the screen. +1. Click the **Code** button located in the middle of the page. +1. Click the **Codespaces** tab on the box that pops up. +1. Click the **Create codespace on main** button. + + **Wait about 2 minutes for the codespace to spin itself up.** -[![start-course](https://user-images.githubusercontent.com/1221423/235727646-4a590299-ffe5-480d-8cd5-8194ea184546.svg)](https://github.com/new?template_owner=skills&template_name=copilot-codespaces-vscode&owner=%40me&name=skills-copilot-codespaces-vscode&description=My+clone+repository&visibility=public) +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: + ![Screen Shot 2023-03-09 at 9 09 07 AM](https://user-images.githubusercontent.com/26442605/224102962-d0222578-3f10-4566-856d-8d59f28fcf2e.png) +1. The `copilot` extension should show up in the VS Code extension list. Click the extensions sidebar tab. You should see the following: + ![Screen Shot 2023-03-09 at 9 04 13 AM](https://user-images.githubusercontent.com/26442605/224102514-7d6d2f51-f435-401d-a529-7bae3ae3e511.png) -1. Right-click **Start course** and open the link in a new tab. -2. In the new tab, most of the prompts will automatically fill in for you. - - For owner, choose your personal account or an organization to host the repository. - - 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). - - Scroll down and click the **Create repository** button at the bottom of the form. -3. After your new repository is created, wait about 20 seconds, then refresh the page. Follow the step-by-step instructions in the new repository's README. +**Wait about 60 seconds then refresh your repository landing page for the next step.**