Guides for SE student projects »

Caution: VS Code guides section is a work-in-progress, containing content contributed by students.

AI Coding Tools: Using Copilot in GitHub

This section shows how to use GitHub Copilot directly within GitHub to help draft issues, review pull requests, and streamline your development workflow.

Pre-requisites

  • GitHub account
  • Access to GitHub Copilot (via subscription or educational benefits)

Check out our GitHub Copilot Sign Up guide for detailed instructions on how to sign up for GitHub Copilot.

Issue Creation

  1. Go to your GitHub repository and create a new issue.
  2. Click on Write with Copilot.
  3. You'll be redirected to Copilot Chat within GitHub, where you can describe your issue.
  4. Use the Attach button to link the relevant repository and provide more context to Copilot.
  5. Describe your issue and ask Copilot to generate a checklist. For example: Fix the bug where the UI overflows when the number is too long, and include a checklist to ensure the bug is resolved.
  6. Copilot will generate a structured issue, including a description, steps to reproduce, expected behaviour, and a checklist.
  7. Click on Create to submit the issue.
    Define a standard issue format for your team to ensure consistency across all issues.

Pull Request Creation Summary

  1. Go to your GitHub repository and create a new pull request.
  2. Click on the Copilot icon, then select Summary.
  3. Copilot will generate a summary of the changes included in the pull request.
  4. You can edit or add more details to the summary before submitting, if needed.

Pull Request Review

  1. Open the pull request you want to review.
  2. Hover over the specific line of code where you need assistance, then click on the Copilot icon.
  3. A Copilot chat window will appear, allowing you to ask questions such as: How can I improve this line of code?
  4. Use Copilot's suggestions to enhance your code review comments or make direct improvements.

Copilot is a helpful assistant, but not a full replacement for human code reviews. You will still need to identify potential issues before asking Copilot for suggestions.


Contributors: Norbert Loh (@NorbertLoh )