GitHub Copilot Workspace: Turn Issues into Pull Requests with AI-Generated Plans and Edits
GitHub Copilot Workspace: From Issue to Pull Request with AI
GitHub Copilot Workspace is an AI-native development environment that transforms GitHub issues into fully implemented pull requests. It generates implementation plans, applies file-level edits, and lets you validate changes with an integrated terminal — all without leaving your browser. This guide walks you through the complete workflow.
Prerequisites
- A GitHub account with Copilot Enterprise or Copilot Workspace access enabled- A repository you own or have write access to- At least one open GitHub issue describing a feature or bug fix
Step-by-Step: Issue to Pull Request
Step 1 — Open an Issue in Copilot Workspace
Navigate to any open issue in your repository. Click the “Open in Workspace” button that appears at the top of the issue page. This launches the Copilot Workspace session linked to that specific issue.
# You can also open Workspace directly via URL:
https://copilot-workspace.githubnext.com/{owner}/{repo}/issues/{issue_number}
Copilot Workspace reads the issue title, description, labels, and any linked discussions to build context for the task.
Step 2 — Review the AI-Generated Specification
Workspace produces a specification — a natural-language summary of what needs to change and why. This acts as a bridge between the issue description and the implementation plan.
- Read through the specification carefully- Click “Edit” to refine any misinterpreted requirements- Add constraints such as “Do not modify the public API” or “Use the existing utility function in
src/utils/helpers.ts”
Step 3 — Examine the Implementation Plan
After confirming the specification, Workspace generates a plan that lists every file to be created, modified, or deleted, along with a description of the changes for each file.
| Column | Description |
|---|---|
| File Path | The file to be changed (e.g., src/auth/login.ts) |
| Action | Create, Modify, or Delete |
| Change Summary | Plain-English description of edits |
Step 4 — Generate File-Level Edits
Click “Implement” to have Copilot Workspace generate the actual code changes. Each file shows a diff-style view with additions and deletions highlighted.
// Example: Workspace-generated edit for src/auth/login.ts
export async function loginUser(credentials: UserCredentials): Promise {
const validated = validateCredentials(credentials);
if (!validated.success) {
throw new AuthValidationError(validated.errors);
}
const token = await authService.authenticate(validated.data);
await auditLog.record(‘login_success’, { userId: validated.data.userId }); return { token, expiresIn: TOKEN_TTL }; }Review each file’s diff. Click into any code block to make manual edits directly in the Workspace editor. Every change you make is preserved alongside the AI-generated code.
Step 5 — Validate with the Integrated Terminal
Copilot Workspace provides a cloud-based terminal connected to a Codespace running your repository. Use it to build, lint, and test your changes before opening a PR.
# Install dependencies
npm install
Run the test suite
npm test
Run a specific test file related to your change
npm test — —grep “loginUser”
Lint the modified files
npx eslint src/auth/login.ts
If tests fail, return to the code view, fix the issue manually or ask Workspace to revise, then re-run validation.
Step 6 — Create the Pull Request
Once validation passes, click “Create Pull Request”. Workspace automatically:
- Creates a new branch (e.g.,
copilot-ws/{issue-number}-{short-slug})- Commits all file-level edits with a descriptive commit message- Opens a pull request linked to the original issue- Populates the PR description with the specification and plan summary# The resulting branch follows this naming convention: git checkout copilot-ws/42-add-audit-logging
Pro Tips for Power Users
- Stack multiple issues: You can reference additional issues or PRs in the specification step to give Workspace broader context across related tasks.- Use follow-up prompts: After the initial implementation, type natural-language instructions like “Also add unit tests for the new audit logging function” to extend the plan without starting over.- Pin context files: If Workspace misses a critical file, manually add it to the plan and describe what role it plays. This anchors the AI to your architecture.- Iterate on branches: Re-open an existing Workspace session from the PR page to continue refining code. Each revision adds new commits to the same branch.- Brainstorm mode: Open Workspace without an issue by navigating to
https://copilot-workspace.githubnext.com/{owner}/{repo}and typing a free-form task description.
Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
| "Open in Workspace" button missing | Copilot Workspace is not enabled for your organization or account | Ask your org admin to enable Copilot Workspace under **Settings → Copilot → Workspace** |
| Plan generates irrelevant files | Issue description is too vague or references ambiguous components | Edit the specification to narrow scope; explicitly name target files and modules |
| Terminal fails to start | Codespace quota exceeded or devcontainer config error | Check your Codespace usage at github.com/settings/codespaces; verify .devcontainer/devcontainer.json is valid |
| Generated code has import errors | Workspace may not have full visibility into monorepo package boundaries | Add missing dependency paths to the specification or manually fix imports in the editor |
| PR creation fails | Branch protection rules block the push | Ensure the Copilot app has bypass permissions, or push to an unprotected branch first |
This end-to-end workflow reduces the time from issue triage to reviewable PR from hours to minutes, while keeping you in full control of every line of code. ## Frequently Asked Questions
Can Copilot Workspace handle issues across multiple repositories?
Currently, each Workspace session is scoped to a single repository. For cross-repo changes, open separate Workspace sessions for each repository and coordinate the pull requests manually. You can reference external repos in the specification text to give context, but edits are limited to the active repository.
Does Copilot Workspace replace Copilot code completion in my IDE?
No. Copilot Workspace is a browser-based environment for planning and implementing entire features from issues. Copilot code completion in VS Code, JetBrains, or Neovim continues to work independently for line-by-line suggestions. They are complementary tools — Workspace handles the big picture, while inline Copilot assists with moment-to-moment coding.
How do I control which files Copilot Workspace is allowed to modify?
During the plan step, you have full control over the file list. Remove any file you do not want modified, or add a constraint in the specification such as “Do not modify any files under the migrations/ directory.” Workspace respects these boundaries when generating edits. You can also review every diff before committing, giving you a final gate before any code reaches your repository.