Skip to main content

GitHub Copilot 101 for Engineers and Testers

Introduction to GitHub Copilot

GitHub Copilot is an AI-powered coding assistant that helps you write code faster and with less effort. It uses advanced machine learning models to suggest code and answers based on the context in your editor or repository.

Copilot assists with:

  • Inline code completions as you type.

  • Chat-based assistance to explain code or generate snippets.

  • Summarising pull requests or helping write commit messages.

Copilot supports most modern programming languages and frameworks, and is designed to enhance your productivity without replacing human judgment. Always validate Copilot’s suggestions for accuracy, quality, and adherence to CRUK coding standards.

[!NOTE] If users are using the free version of Copilot or other tools, they must make sure they configure it in a way that actively protects CRUK's IP.

Copilot on GitHub.com

GitHub.com offers several Copilot features:

Copilot Chat on Github

  • Access Copilot Chat directly on all pages in Github.

  • Ask questions like “What does this repo do?”, "Analyse build failures" or “Explain this function.”

  • Copilot responds with context-aware answers.

Copilot chat

Pull Request Summaries

  • Auto-generates pull request descriptions using AI.

  • Provides a prose summary and a bullet point list of changes.

  • Available on creation, edit, or as a PR comment (for supported plans).

Copilot in pull requests

AI-Powered Code Review (Enterprise Plans)

  • Copilot can act as a PR reviewer.

  • Suggests code changes, identifies bugs or improvements.

  • Comments appear in PR threads with suggested fixes.

Requirements

  • Log in with a CRUK GitHub account.

  • Copilot must be enabled by our GitHub org admins.

  • Use a supported editor like VS Code, Vim, XCode with the GitHub Copilot extension if needed.

Copilot in Visual Studio Code (VS Code)

VS Code provides the most complete Copilot experience:

Inline Suggestions

  • Suggests entire lines or blocks of code based on comments or function names.

  • Appears as greyed-out ghost text.

  • Press Tab to accept, Esc to dismiss.

  • Cycle through suggestions with Alt + ] / Alt + [ (Windows/Linux) or Option + ] / [ (Mac).

  • Hover on the suggestion or use Ctrl + Enter / Cmd + Shift + A for a suggestions panel.

Copilot in pull requests

Copilot Chat in VS Code

  • Install the GitHub Copilot Chat extension.

  • Open chat via the toolbar icon or View → Copilot Chat.

  • Ask questions like “Generate unit test for this function.”

  • Context-aware and responds with code, explanations, or fixes.

  • Highlight code and right-click → "Ask Copilot" for context-specific queries.

Useful Shortcuts

CommandShortcut
Accept suggestionTab
Dismiss suggestionEsc
Next/Previous suggestionAlt/Option + ]/[
Open suggestion panelCtrl + Enter / Cmd + Shift + A
Inline chatCtrl + I / Cmd + I or context menu

Use Cases for Testers

  • Generate test stubs or boilerplate.

  • Ask Copilot to validate test logic or improve test coverage.

  • Auto-comment or document test cases for clarity.

Copilot in GitHub Desktop

GitHub Desktop supports commit message generation:

Commit Message Suggestions

  • Copilot generates a title and description based on your staged changes.

  • Click the Copilot icon in the commit input field.

  • Review, edit, or regenerate the suggestion before committing.

Copilot on Github Desktop

Limitations

  • Only supports english commit messages with no support for conventional commits.

  • Only helps with commit messages, not code suggestions.

  • Does not ensure commit messages follow CRUK conventions (e.g., ticket IDs).

Access

  • Feature may be admin-controlled. If Copilot isn’t visible, contact the platform team for the repo.

  • Use your CRUK GitHub account with Copilot enabled.

Access to features and Licensing at CRUK

  • CRUK uses GitHub Enterprise with Copilot for Business.

  • The features enabled by CRUKorg are visible in your account's copilot settings.

  • Copilot access is managed by our organization.

  • For any questions, feedback or requesting access to features, contact engineering on the slack channel #github-copilot.

  • Admins control feature availability (e.g., Copilot Chat, code review).

  • Use GitHub Copilot only for CRUK-approved projects and follow all licensing and data security policies.

[!IMPORTANT] There are numerous other advanced Copilot features available under copilot settings, including the ability to switch between AI models, integrate Bing search for contextual assistance, access experimental coding agents, and connect to MCP (Model Customization Platform) servers. These features offer powerful enhancements to developer productivity, code quality, and automation workflows. For CRUK’s GitHub organization, selectively enabling or disabling these features is an important governance tool. It allows us to align GitHub Copilot’s capabilities with internal policies, security requirements, costs and team needs. Ultimately, thoughtful management of these settings enables CRUK to balance cutting-edge AI capabilities with responsible use, data protection, and mission-driven development practices.

Best Practices

  • Always review suggestions: Copilot can make mistakes or suggest insecure patterns.

  • Ensure code integrity: Users are still responsible for ensuring the code is appropriate for shipping to production.

  • Clean code: Comments and descriptive variable names improve Copilot’s output.

  • Write clear and descriptive prompts: Be specific with your instructions and break complex queries up into sub tasks.

  • Use Copilot iteratively: If the suggestion isn’t right, try rephrasing or asking again.

  • Great for tests and docs: Copilot can help write unit tests, docstrings, or boilerplate.

  • Respect confidentiality: Don’t ask Copilot to generate or process sensitive business logic.

  • Start small: Try it on non-critical code to get comfortable.

By using Copilot responsibly, we can improve code quality and developer experience while maintaining CRUK’s security and engineering standards.