AI / GitHub Copilot CLI Fundamentals Interview Questions
What is the /pr slash command in GitHub Copilot CLI and what can it do?
The /pr slash command lets you manage GitHub pull requests directly from the terminal without switching to a browser or using the gh CLI separately.
| Action | Description |
|---|---|
| View PRs | Browse open pull requests in the current repository |
| Create PR | Open a pull request from the current branch with an AI-generated description |
| Fix PR | Ask Copilot to address review comments or CI failures on an existing PR |
| Review PR | Get AI-generated code review suggestions for a PR |
| Create branch + PR in one command | copilot lets you implement a change and open a PR with a single natural language request |
# Inside an interactive Copilot CLI session: /pr # browse and manage PRs # One-command branch + implement + PR workflow: # "Create a branch, add input validation to the login form, and open a PR" # → Copilot creates the branch, makes the code change, opens the PR # Fix review comments on an existing PR: /pr # → navigate to the PR → ask Copilot to address feedback # Non-interactive: create PR from current branch copilot -p "Create a pull request for the current branch with a summary of changes" -s
Branch protections and policies: Copilot CLI respects your repository's branch protection rules, required status checks, and organisation policies - it cannot bypass these even when creating PRs autonomously. Copilot Business or Enterprise settings apply automatically.
More Related questions...