├── .devcontainer ├── devcontainer.json ├── icon.png └── welcome-message.txt ├── .tours ├── ConvertCommentsToCode.tour └── JSONtoUser.tour ├── CODEOWNERS.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── SUPPORT.md ├── convert_comments_to_code.py ├── json_to_user.py └── media ├── screenshot1.png ├── screenshot2.png └── screenshot3.png /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "image": "mcr.microsoft.com/devcontainers/universal:2", 3 | "hostRequirements": { 4 | "cpus": 4 5 | }, 6 | "name": "Try Copilot", 7 | "postCreateCommand": "sudo cp --force ./.devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt", 8 | "customizations": { 9 | "vscode": { 10 | "extensions": [ 11 | "github.copilot", 12 | "vsls-contrib.codetour", 13 | "ms-python.python" 14 | ]} 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.devcontainer/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/copilot-codespaces-demo/c8734b6616c38aa57f8beb7c5809cfc0d5191557/.devcontainer/icon.png -------------------------------------------------------------------------------- /.devcontainer/welcome-message.txt: -------------------------------------------------------------------------------- 1 | 👋 Welcome to the Copilot + Codespaces Demo Experience! We are thrilled that you are here and we hope you are excited to explore the capabilities of Copilot! 2 | 🔍 To start a demo, click "CODETOUR" in the bottom left corner, hover over an option, and press the arrow to start! 3 | 📝 If you would like to sign up for Copilot visit here: https://github.com/features/copilot#pricing 4 | -------------------------------------------------------------------------------- /.tours/ConvertCommentsToCode.tour: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://aka.ms/codetour-schema", 3 | "title": "ConvertCommentsToCode", 4 | "steps": [ 5 | { 6 | "file": "convert_comments_to_code.py", 7 | "description": "Welcome to your GitHub Copilot tour! Let's get started by learning to Convert Comments to Code! \n\nPress Next to continue 👇! ", 8 | "line": 1, 9 | "contents": "" 10 | }, 11 | { 12 | "file": "convert_comments_to_code.py", 13 | "description": "Press __ENTER__ at the end of line 2. You should see a suggestion given by Copilot. Lets accept the Copilot suggestion by pressing __TAB__!\n\nPress Next to continue 👇! ", 14 | "line": 2, 15 | "contents": "" 16 | }, 17 | { 18 | "file": "convert_comments_to_code.py", 19 | "line": 9, 20 | "description": "Let's run the code to see if it works. Click the follow hyperlink to execute your convert_comments_to_code.py file. It should count from one to ten. \n\n>> python3 convert_comments_to_code.py\n\nMission complete! You've used GitHub Copilot to create a function that counts to 10!" 21 | }, 22 | { 23 | "file": "convert_comments_to_code.py", 24 | "description": "Thank you for trying out the GitHub Copilot Convert to Comments demo! Try a few different variables of your own! If you would like to sign up for Copilot visit here: https://github.com/features/copilot#pricing", 25 | "line": 10, 26 | "contents": "" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /.tours/JSONtoUser.tour: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://aka.ms/codetour-schema", 3 | "title": "JSONtoUser", 4 | "steps": [ 5 | { 6 | "file": "json_to_user.py", 7 | "description": "Welcome to your GitHub Copilot tour! We're going to jump right into a common use case for Copilot: helping write boilerplate code. Here you can see an example of the User class, as well as a JSON representation of a user. \n\n Press `Next` to continue 👇", 8 | "line": 1 9 | }, 10 | { 11 | "file": "json_to_user.py", 12 | "description": "We can use Copilot to automatically serialize the json into the class. Press __ENTER__ at the end of line 14 to prompt Copilot to generate the boilerplate code, and __TAB__ to accept the generated code. \n\nOnce it's generated the code, press `Next` to continue 👇", 13 | "line": 14 14 | }, 15 | 16 | { 17 | "file": "json_to_user.py", 18 | "description": "We can also use Copilot to write a function to convert from the class to JSON. Press __ENTER__ at the end of line 18 to prompt Copilot to generate the boilerplate code, and __TAB__ to accept the generated code. \n\nOnce it's generated the code, press `Next` to continue 👇", 19 | "line": 18 20 | }, 21 | { 22 | "file": "json_to_user.py", 23 | "description": "Thank you for trying out the GitHub JSONtoUser Demo! Try out some new Code Tours in the bottom left panel! If you would like to sign up for Copilot visit here: https://github.com/features/copilot#pricing", 24 | "line": 42 25 | } 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /CODEOWNERS.md: -------------------------------------------------------------------------------- 1 | # For more information, see [docs](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-syntax) 2 | 3 | # This repository is maintained by: 4 | * @thisiskirsch @iamcjwilliams 5 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, gender identity and expression, level of experience, 9 | nationality, personal appearance, race, religion, or sexual identity and 10 | orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at opensource@github.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at [http://contributor-covenant.org/version/1/4][version] 72 | 73 | [homepage]: http://contributor-covenant.org 74 | [version]: http://contributor-covenant.org/version/1/4/ 75 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | [fork]: https://github.com/github/copilot-codespaces-demo/codes/fork 3 | [pr]: https://github.com/github/copilot-codespaces-demo/compare 4 | [code-of-conduct]: CODE_OF_CONDUCT.md 5 | 6 | Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. 7 | 8 | Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE.md). 9 | 10 | Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms. 11 | 12 | ## Submitting a pull request 13 | 14 | 1. [Fork][fork] and clone the repository 15 | 4. Create a new branch: `git checkout -b my-branch-name` 16 | 5. Make your change, add tests, and make sure the tests still pass 17 | 6. Push to your fork and [submit a pull request][pr] 18 | 7. Pat your self on the back and wait for your pull request to be reviewed and merged. 19 | 20 | Here are a few things you can do that will increase the likelihood of your pull request being accepted: 21 | 22 | - Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests. 23 | - Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). 24 | 25 | ## Resources 26 | 27 | - [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) 28 | - [Using Pull Requests](https://help.github.com/articles/about-pull-requests/) 29 | - [GitHub Help](https://help.github.com) 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 GitHub 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Welcome to the Copilot+Codespaces Playground Demo 2 | 3 | ## Our Mission 4 | Our goal is to provide a self-serve, one-click Copilot experience that will be hosted on Codespaces. 5 | 6 | ## What to Expect 7 | During the the GitHub Copilot+Codespaces Playground Demo, you are in charge! You will have the opportunity to learn more about Copilot, it's features and how it can help you achieve your development Goals! 8 | 9 | If you are in need of assistance, we have provided Codetours located in the left hand corner that help guide you through the current Copilot capabilities! 10 | 11 | ## Getting Started 12 | 1. To get started, start by selecting 'Use this template', and 'Open in a codespace' 13 | 14 | ![Screenshot 2023-05-16 at 4 40 46 PM](media/screenshot1.png) 15 | 16 | 2. Once the codespace has loaded, select 'Codetour' on the lower left corner, and start the JSONtoUser tour! 17 | 18 | ![screenshot2](media/screenshot2.png) 19 | 20 | 21 | 3. Next, select the play button for one of the tours listed. Enjoy! 22 | 23 | ![screenshot3](media/screenshot3.png) 24 | 25 | 26 | ## FAQ 27 |
28 | What is GitHub Copilot?
29 | 30 | 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 Codex, a generative pretrained language model created by OpenAI. It is available as an extension for Visual Studio Code, Visual Studio, Neovim, and the JetBrains suite of integrated development environments (IDEs). Visit here for more information about [GitHub Copilot](https://github.com/features/copilot) 31 |
32 |
33 | What is GitHub Codespaces?
34 | 35 | A codespace is a development environment that's hosted in the cloud. You can customize your project for GitHub Codespaces by configuring dev container files to your repository (often known as Configuration-as-Code), which creates a repeatable codespace configuration for all users of your project. 36 | 37 | GitHub Codespaces run on a variety of VM-based compute options hosted by GitHub.com, which you can configure from 2 core machines up to 32 core machines. You can connect to your codespaces from the browser or locally using an IDE like Visual Studio Code or IntelliJ. Visit here for more information about [GitHub Codespaces](https://github.com/features/codespaces) 38 |
39 |
40 | Are there any prerequisites to get access to the Copilot+Codespaces Playground Demo?
41 | 42 | A GitHub account is the only requirement to use the GitHub Copilot + Github Codespaces playground demo environment. The demo will only be available to the extent of your account’s Codespaces entitlements; if you want to keep utilizing the environment after your limit has been met, you will need to purchase additional entitlements Visit here to signup for a [GitHub Copilot](https://github.com/features/copilot) trial for the full experience! 43 |
44 |
45 | What are the feature limitations of the Copilot+Codespaces Playground Demo?
46 | 47 | This demo will only showcase current GitHub Copilot capabilities that are intended to help programmers, such as autocompletion suggestions, functions, and the ability to convert code comments into actual lines of code. Any features mentioned for GitHub Copilot X will not be offered in this demo experience. Visit here to signup for the [GitHub Copilot X Waitlists](https://github.com/features/preview). 48 | 49 |
50 |
51 | 🛠 Copilot+Codespaces Playground Demo Disclaimer 🛠
52 | 53 | Please note that during the GitHub Copilot+Codespaces Playground Demo, the suggestions generated by GitHub Copilot via Codespaces will differ and may not always be the same. This is due to GitHub Copilot being an artificially intelligent tool that generates code suggestions based on the input it receives. Visit here for more information about [GitHub Codespaces](https://github.com/features/codespaces) and [GitHub Copilot](https://github.com/features/copilot)! 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | Thanks for helping make GitHub safe for everyone. 2 | 3 | # Security 4 | 5 | GitHub takes the security of our software products and services seriously, including all of the open source code repositories managed through our GitHub organizations, such as [GitHub](https://github.com/GitHub). 6 | 7 | Even though [open source repositories are outside of the scope of our bug bounty program](https://bounty.github.com/index.html#scope) and therefore not eligible for bounty rewards, we will ensure that your finding gets passed along to the appropriate maintainers for remediation. 8 | 9 | ## Reporting Security Issues 10 | 11 | If you believe you have found a security vulnerability in any GitHub-owned repository, please report it to us through coordinated disclosure. 12 | 13 | **Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** 14 | 15 | Instead, please send an email to opensource-security[@]github.com. 16 | 17 | Please include as much of the information listed below as you can to help us better understand and resolve the issue: 18 | 19 | * The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting) 20 | * Full paths of source file(s) related to the manifestation of the issue 21 | * The location of the affected source code (tag/branch/commit or direct URL) 22 | * Any special configuration required to reproduce the issue 23 | * Step-by-step instructions to reproduce the issue 24 | * Proof-of-concept or exploit code (if possible) 25 | * Impact of the issue, including how an attacker might exploit the issue 26 | 27 | This information will help us triage your report more quickly. 28 | 29 | ## Policy 30 | 31 | See [GitHub's Safe Harbor Policy](https://docs.github.com/en/github/site-policy/github-bug-bounty-program-legal-safe-harbor#1-safe-harbor-terms) 32 | -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | The Copilot-Codespaces Demo is actively developed and maintained by GitHub staff and the community. We will do our best to respond to support and community questions in a timely manner. 2 | -------------------------------------------------------------------------------- /convert_comments_to_code.py: -------------------------------------------------------------------------------- 1 | # write a function that counts from 1 to 10 and prints the numbers 2 | def count_to_ten(): 3 | 4 | count_to_ten() 5 | -------------------------------------------------------------------------------- /json_to_user.py: -------------------------------------------------------------------------------- 1 | class User: 2 | def __init__(self, name, email, password): 3 | self.name = name 4 | self.email = email 5 | self.password = password 6 | 7 | user = { 8 | "name": "John Doe", 9 | "email": "johndoe@gmail.com", 10 | "password": "password123" 11 | } 12 | 13 | #TODO: write a function that takes in a json and returns a User class 14 | def create_user(json): 15 | 16 | #TODO: create a function that takes in a User class and returns a json 17 | def jsonify_user(user): 18 | -------------------------------------------------------------------------------- /media/screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/copilot-codespaces-demo/c8734b6616c38aa57f8beb7c5809cfc0d5191557/media/screenshot1.png -------------------------------------------------------------------------------- /media/screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/copilot-codespaces-demo/c8734b6616c38aa57f8beb7c5809cfc0d5191557/media/screenshot2.png -------------------------------------------------------------------------------- /media/screenshot3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/copilot-codespaces-demo/c8734b6616c38aa57f8beb7c5809cfc0d5191557/media/screenshot3.png --------------------------------------------------------------------------------