Welcome to the technical preview for GitHub Copilot Workspace (CW)! GitHub CW is a “task-centric” improvement setting that allows you to outline duties for a repository utilizing pure language and collaborate with AI to finish them. This information will stroll you thru find out how to get began with Copilot Workspace by using numerous entry factors.
Entry Factors for Beginning a Job
Beginning a activity effectively is essential for sustaining productiveness and streamlining workflows. CW affords a number of entry factors that will help you start duties with ease, whether or not it’s primarily based on present GitHub points or creating new duties from scratch. By leveraging these versatile choices, you possibly can rapidly transition from figuring out a activity to actively engaged on it, making certain a easy and arranged workflow tailor-made to your wants.
1. GitHub Subject
If you have already got a GitHub difficulty that describes a activity you wish to carry out, beginning with it’s simple. Comply with these steps:
- Open the GitHub difficulty.
- On the right-side panel, beneath the “Improvement” part, click on the “Open in Workspace” button.
This motion will open the difficulty inside Copilot Workspace and provoke the method of analyzing and fixing it.
2. Advert-hoc Job through CW Dashboard
You can too begin a activity straight from the CW dashboard:
- Open the CW dashboard.
- Click on the “Select a repository” choice beneath the “Begin a brand new session” part.
- Seek for the repository you wish to work on.
- Choose the repository and outline a brand new activity from scratch, much like drafting a difficulty.
When you’ve carried out a activity for a repository, it’ll seem within the session record beneath the “Begin a brand new session” part, making it straightforward to select up new duties for ongoing tasks.
3. Advert-hoc Job through Repository Web page
One other approach to provoke a activity is straight from the repository web page:
- Navigate to the repository web page of the challenge you wish to work on.
- Click on the inexperienced “Code” button.
- Enter a brand new activity within the “Copilot” tab.
- Submit the duty.
This may take you into CW and start the method of analyzing and fixing the duty.
Creating Repositories from Templates
Copilot Workspace means that you can create repositories from templates utilizing pure language.
Utilizing “Use this template” from GitHub.com
To create a repository with Copilot Workspace, navigate to a template repository on GitHub.com and select “Use this template”:
- Click on “Use this template” to begin creating your repository.
- The duty is predicated on the software program description you present, together with the README of the template repository.
As soon as began, a create repository activity appears like this:
- The duty is labelled as “Repository,” and the “Template” panel signifies the template repository.
Copilot Workspace will generate a specification for the repository primarily based in your description, a plan for creating it, and the ultimate implementation.
Utilizing “New session” on the Dashboard
You can too create a repository from a template by clicking the “New session” button within the Copilot Workspace dashboard and trying to find a template. This may open a brand new activity within the workspace the place you possibly can describe the software program you wish to create.
Utilizing the URL
You may allow “Create Repository” mode for any repository URL by including ?template=true as a question parameter. For instance:
https://copilot-workspace.githubnext.com/githubnext/hello-world?template=true
Sure repositories are handled as templates by default:
- Any GitHub template repository.
- Any repository in a corporation containing “templates” in its identify.
- Any repository with “-template,” “-scaffold,” “-starter,” or “-boilerplate” in its identify.
GitHub Copilot Workspace for Repository Maintainers
Copilot Workspace can help you as a repository maintainer in a number of methods:
- You may discover potential options to points.
- You may generate sketches of options to points for potential contributors, decreasing the barrier of entry.
- It could actually assist encourage a tradition the place issue-creators go away extra useful notes on find out how to remedy points, to be used by each contributors and AI assistants.
For instance, when a brand new difficulty is filed in your repository, you should use Copilot Workspace to generate a sketch of an answer to the difficulty. You may then use the “Share” button to publish this sketch again to the difficulty thread, with extra feedback about whether or not you suppose it’s helpful or not, and the place it’d want enchancment. This will help potential contributors perceive the issue higher and supply a place to begin for his or her work.
Equally, when a brand new difficulty is filed, you possibly can ask the contributor to create a Copilot Workspace session for the difficulty. This will likely assist the contributor perceive the issue higher and supply a place to begin for his or her work. You can too embody this steerage within the difficulty template on your repository, assuming your customers have entry to Copilot Workspace. You can too ask contributors to go away extra notes within the Copilot Workspace session, which will help future contributors and AI assistants perceive the issue higher.
Proscribing the Use of GitHub Copilot Workspace in Your Repository
It’s attainable for undisciplined contributors to overuse AI-assisted code era. Due to this, we give repository maintainers the choice of disabling the direct use of Copilot Workspaces for creating pull requests and/or difficulty feedback of their repositories.
To disable the direct creation of pull requests utilizing Copilot Workspace, create a file .github/copilot-workspace/coverage.json within the default department of the repository containing the next content material:
{
"allowPullRequests": false
}
To disable using Copilot Workspace to straight generate difficulty feedback that comprise hyperlinks to Copilot Workspace classes, add the next content material to the coverage.json file:
{
"allowComments": false
}
Customers of Copilot Workspace will nonetheless be capable to:
- Create sharing hyperlinks to Copilot Workspace classes and paste them into difficulty feedback.
- Push to new branches in your repository (if they’ve write entry).
- Push to new branches within the forks of your repository.
- Manually create pull requests from branches.
- Use Copilot Workspace to generate code snippets and information for their very own use in their very own pull requests and difficulty feedback to your repository.
Identified Points and Future Enhancements
Please do not forget that GitHub Copilot Workspace is a technical preview and is an space of energetic improvement. This doc lists some identified points and identified areas the place we’d wish to make future enhancements to the product.
The next are core areas the place we’re actively working to enhance Copilot Workspace:
Rewriting Giant Information
When it implements a plan that entails modifications in a big file, it may possibly take a very long time to finish. Copilot Workspace at the moment makes use of “entire file rewriting” as we now have discovered this achieves a excessive degree of thoroughness on the very heterogeneous vary of duties Copilot Workspace can be utilized for. We’re engaged on partial-file rewriting strategies, each automated and beneath person steerage, to enhance the efficiency of this operation.
Code Technology
The standard of the code generated by Copilot Workspace just isn’t at all times excellent. It’s extremely associated to the standard of the underlying AI fashions used. We’re engaged on bettering the standard of the code generated by Copilot Workspace on many ranges. For instance, the standard of code era is affected by the standard of the planning and specification of the duty and the general person expertise of assessing and clarifying these. We’re working to enhance these too. The achieved high quality can be associated to the expertise of iterating on the generated code. We’re actively taking a look at extra fine-grained iteration strategies.
Content material Choice
The content material choice in Copilot Workspace can typically be suboptimal, resulting in the era of code that’s not related to the duty. We’re engaged on bettering the content material choice in Copilot Workspace.
Internet Retrieval
Duties can embody direct hyperlinks to internet assets reminiscent of documentation. Additional, some internet retrieval can be deduced from the duty. Copilot Workspace doesn’t at the moment carry out internet retrieval and we’re engaged on including this function.
Construct/take a look at Restore
After code is generated, each AI and conventional tooling can be utilized to “restore” the code primarily based on diagnostics generated from constructing, testing, and operating the code. We have already got some help for this in Copilot Workspace, and we’re engaged on bettering this.
Duties Small, Duties Giant
Some duties are very small: updating a number of strains of a file. Some duties are very giant: implementing a wholly new repository function by function. Copilot Workspace is at the moment designed for the mid-range of duties typical of GitHub points. We’re fascinated by delivering variations on the core ideas of Copilot Workspace in preparations extra appropriate to duties each small and huge. For instance, for small duties, we could supply a “lite” model of Copilot Workspace the place there is just one activity. For big duties, we could supply a approach to decompose the duty into sub-tasks.
Authorization
It makes use of a GitHub OAuth App for authentication. Some organizations can have insurance policies which limit OAuth purposes from interacting with their repositories. You won’t be able to carry out duties in personal repositories with Copilot Workspace or create pull requests in public repositories until the group admin approves the Copilot Workspace OAuth utility. We’re working so as to add a second authorization choice for Copilot Workspace primarily based on a GitHub App, and can replace this doc when that is out there.
Conclusion
Getting began with Copilot Workspace is straightforward and versatile, with a number of entry factors to fit your workflow. Whether or not ranging from a GitHub difficulty, the CW dashboard, or a repository web page, you possibly can simply outline duties and collaborate with AI to boost your improvement course of. So, what are you ready for? Discover it at this time!
Ceaselessly Requested Questions
Ans. CW is a task-centric improvement setting that permits customers to outline duties for a repository utilizing pure language and collaborate with AI to finish them effectively.
Ans. You can begin a activity by means of numerous entry factors:
A. From a GitHub difficulty by clicking “Open in Workspace.”
B. Straight through the CW dashboard by deciding on a repository and defining a brand new activity.
C. From a repository web page by getting into a activity within the “Copilot” tab.
Ans. Sure, you possibly can create repositories utilizing templates by:
A. Choosing “Use this template” on GitHub.com.
B. Clicking “New session” on the CW dashboard and selecting a template.
C. Including ?template=true to any repository URL.
Ans. It helps maintainers by:
A. Exploring potential options to points.
B. Producing resolution sketches for contributors.
C. Encouraging detailed difficulty descriptions and notes.
Ans. Sure, some identified points embody:
A. Gradual rewriting of huge information.
B. Occasional suboptimal content material choice.
C. Ambiguity detection being overly delicate.
D. No ‘Cease’ button when producing pull request descriptions