Beyond Autocomplete: GitHub Copilot Now Owns Issues, Delivers Pull Requests

Imagine a world where routine coding tasks, bug fixes, or minor feature additions could be delegated directly to an AI agent, freeing your team to focus on complex architectural challenges or innovative new features. That world is now a reality with GitHub Copilot’s enhanced capabilities!

GitHub Copilot, especially in its powerful “coding agent” mode, is no longer just a clever autocomplete tool. It can now take on a much more active role in repository management, autonomously working on assigned issues and even drafting pull requests for your review. This marks a significant leap towards truly intelligent, AI-powered development workflows.

How Does It Work? Meet Your New AI Colleague

The core idea is simple: you assign an issue to Copilot just as you would to a human developer. Copilot then takes the reins, plans a solution, writes code, tests it, and proposes a solution via a pull request.

Here’s a step-by-step guide on how to get Copilot started on a task:

Assigning an Issue to GitHub Copilot

The most straightforward way to assign an issue is directly on GitHub.com:

  1. Navigate to Your Repository: Go to the main page of the repository where the issue resides.
  2. Access Issues: Click on the Issues tab.
  3. Open the Target Issue: Select the specific issue you want Copilot to address.
  4. Assign Copilot: In the right-hand sidebar, locate the Assignees section and click on it. From the dropdown list, you’ll now see Copilot as an option. Select it!

And just like that, Copilot has been assigned its first task!

Other Assignment Methods:
For those who prefer different workflows, you can also assign issues to Copilot using:

  • The GitHub API
  • GitHub Mobile (currently in beta)
  • The GitHub CLI with the command gh issue edit

What Copilot Knows (and Doesn’t Know):
When you assign an issue, Copilot receives the issue title, its full description, and any existing comments at the time of assignment. It’s crucial to note that Copilot will NOT be aware of any comments added to the original issue after it has been assigned. If you need to provide further details, clarify requirements, or change scope, add these as comments directly to the pull request Copilot creates.

Copilot’s Workflow: From Issue to Pull Request Magic

Once assigned, Copilot kicks into gear. Here’s a glimpse into its autonomous workflow:

  1. Deep Analysis & Planning: Copilot analyzes the issue meticulously, understanding the problem, planning a solution, and strategizing how to implement it within the repository’s existing codebase.
  2. Code Generation & Testing: It proceeds to write the necessary code, potentially iterating on its approach. It can even leverage GitHub Actions to run tests and validate its proposed changes, ensuring a robust solution.
  3. Automated Pull Request Creation: Once satisfied with its solution, Copilot will automatically create a new pull request (PR).
  4. Review Request: It will then add you (or the relevant reviewer configured in your repository settings) to the pull request for review and feedback.

Iterating with Copilot:
This is where the collaboration truly shines. Once Copilot creates the PR, you can further guide it. Simply add comments to the pull request, providing feedback, suggesting refinements, or asking for alternative approaches. Copilot will then attempt to iterate on its solution based on your input.

Need a PR Without an Issue? Copilot Chat Has You Covered!

Beyond handling assigned issues, you can also directly instruct Copilot to create a pull request using Copilot Chat. This is incredibly useful for ad-hoc tasks or quick documentation updates.

You can do this in supported IDEs (VS Code, Visual Studio, JetBrains) or directly on GitHub.com. Just type a prompt like this:

@github Create a PR to update the README with the new installation instructions.

Copilot will then generate the pull request, notifying you for review, saving you the manual steps of creating a branch, committing, and opening the PR.

Requirements & Availability

This groundbreaking feature is currently available in public preview. To leverage Copilot as your coding agent, you’ll need:

  • GitHub Copilot Pro+ or Copilot Enterprise plan.
  • The Copilot coding agent enabled in your specific repository.

Embrace the Future of Development

The ability to assign issues to GitHub Copilot and have it autonomously generate pull requests is a game-changer for development teams. It empowers you to:

  • Delegate routine tasks: Free up human developers for more complex, creative, or strategic work.
  • Accelerate development cycles: Get smaller issues addressed and PRs drafted much faster.
  • Standardize contributions: Copilot adheres to the repository’s existing patterns and tests.

This new workflow is a testament to the evolving power of AI in software development, turning Copilot from an assistant into a true collaborator. So, next time you have a small task on your plate, consider assigning it to your newest team member: GitHub Copilot!

Further Reading:
For more in-depth details and best practices, dive into the official GitHub documentation:

If you have an questions or would like a consultation, feel free to contact us.