OpenCoze
Back to template library

GitHub PR Code Review Template with Copilot

DevelopmentCozeUpdated 2026-03-06

A GitHub PR code review template for engineering teams. Trigger Copilot on new pull requests, review the diff, generate a summary, and post feedback back to the PR.

Search Intent Fit

This page is meant to capture high-intent searches such as GitHub PR code review, AI code review workflow, and pull request review prompt, then move engineering teams into the right template and tools.

github code review templateai code review workflowpull request review prompt

FAQ

What is github code review template best for?

GitHub PR Code Review Template with Copilot is best for teams that need a repeatable development workflow with a ready-to-run prompt instead of starting from scratch every time.

What should I prepare before using GitHub PR Code Review Template with Copilot?

Prepare the required variables first, then use the related tools to gather the structured inputs needed for ai code review workflow before running the prompt.

System Prompt
When a new Pull Request is opened in the {repo_name} repository on the {branch} branch, run Copilot to review the changes and post a summary as {reviewer} in the PR comments.

Variable Dictionary (fill in your AI tool)

This section only explains placeholders. It is not an input form on this website. Copy the prompt, then replace variables in Coze / Dify / ChatGPT.

{repo_name}

GitHub repository name, e.g., my-org/my-repo

Filling hint: replace this with your real business context.

{branch}

Branch name that triggers the review, e.g., feature/new-feature

Filling hint: replace this with your real business context.

{reviewer}

GitHub username of the reviewer to tag in the PR comment

Filling hint: replace this with your real business context.

Quick Variable Filler (Optional)

Fill variables below to generate a ready-to-run prompt in your browser.

{repo_name}

GitHub repository name, e.g., my-org/my-repo

{branch}

Branch name that triggers the review, e.g., feature/new-feature

{reviewer}

GitHub username of the reviewer to tag in the PR comment

Generated Prompt Preview

Missing: 3
When a new Pull Request is opened in the {repo_name} repository on the {branch} branch, run Copilot to review the changes and post a summary as {reviewer} in the PR comments.

How to Use This Template

Best for

Teams that need faster development output with more stable prompt quality.

Problem it solves

Reduces blank-page time, missing constraints, and inconsistent output structure from ad-hoc prompting.

Steps

  1. Copy the template prompt.
  2. Paste it into your AI tool (Coze / Dify / ChatGPT).
  3. Replace placeholder variables using the dictionary above.
  4. Run and refine constraints based on output quality.

Not ideal when

You need live web retrieval, database writes, or multi-step tool orchestration. Use full workflow automation for that.

Success Case

Input:
A PR on my-org/my-repo’s feature/new-feature branch with 12 lines of new code.
Output:
Comment: @reviewer Review Summary: Found 2 potential issues: 1) Non‑standard variable naming; 2) Low code readability. Suggested improvements: use camelCase, split functions.

Boundary Case

Input:
A PR that includes an 8MB binary file.
Fix:
Skip binary files or split them into readable text.

What to Try Next

Keep exploring with similar templates and matching tools.

Continue Where You Left Off

No recent items yet.

Workflow Steps

  1. 1. Listen to the GitHub Webhook for PR creation events and extract repo_name, branch, and reviewer.

  2. 2. Call the Copilot API to review the PR diff and obtain review results.

  3. 3. Format the review results into a readable summary, highlighting key issues, improvement suggestions, and code snippets.

  4. 4. Use the GitHub API to comment on the PR, tagging {reviewer} and attaching the summary.

  5. 5. Log the review details to a database for future analysis.

Constraints

  • File size exceeds 5MB
  • Non‑text files (images, archives)
  • Empty PR (no changes)

Explore More in This Category

Development