Automated Code Review Comment Generator for GitHub PRs

This agentic workflow automates the process of generating a code review comment for a GitHub pull request based on predefined guidelines. It retrieves the pull request details, analyzes the code changes, and formats a structured comment that can be posted back to GitHub.
Vellum Team
Created By
David Vargas
Expand to interact
Created By
David Vargas
Last Updated
July 31, 2025
Categories
Coding

How it Works / How to Build It

  1. CreatePullRequestURL: This node constructs the URL for the specific pull request using the organization name, repository name, and pull request number provided in the inputs.
  2. GetPullRequest: This node makes an API call to GitHub to retrieve the details of the specified pull request, including the code diff that needs to be reviewed.
  3. GithubReviewerPrompt: This node uses a prompt to instruct an AI model (GPT-4.5) to analyze the code diff and provide feedback based on the guidelines provided in the prompt.
  4. FormatPostGitHubComment: This node formats the feedback generated by the AI into a structured comment that can be posted on GitHub.
  5. FinalOutput: This node outputs the final formatted comment, ready to be sent to GitHub.

What You Can Use This For

  • Automating code reviews for development teams.
  • Providing consistent feedback based on established coding guidelines.
  • Enhancing collaboration by streamlining the review process on GitHub.

Prerequisites

  • Vellum account.
  • GitHub repository with pull requests.
  • GitHub personal access token with permissions to read pull requests and post comments.

How to Set It Up

  1. Clone the workflow template into your Vellum account.
  2. Configure the Inputs node with your GitHub organization name, repository name, and the pull request number you want to review.
  3. Set up the bearer token in the Vellum secret manager for GitHub API access.
  4. Customize the GithubReviewerPrompt node if you want to adjust the feedback guidelines or the AI model's behavior.
  5. Run the workflow to generate and post the review comment on the specified pull request.
Related Templates

Discover more AI agent templates to automate different aspects of your business

AI Agents
Data extraction
E-commerce shopping agent
Created By
Anita Kirkovska
AI Agents
Page scraping
Web Search
Retail pricing optimizer agent
Created By
Rasam Tooloee
AI Agents
Data extraction
Evaluation
Web Search
Risk assessment agent for supply chain operations
Created By
Rasam Tooloee
AI Agents
Document extraction
Insurance claims automation agent
Created By
Rasam Tooloee
Content generation
LinkedIn Content Planning Agent
Created By
Nicolas Zeeb
Data extraction
Personalized healthcare explanations of a patient-doctor match
Created By
Lawrence Perera
Data extraction
Document extraction
SOAP Note Generation Agent
Created By
Anita Kirkovska
Document extraction
AI Agents
Agent that summarizes lengthy reports (PDF -> Summary)
Created By
Anita Kirkovska
Data extraction
PDF Data Extraction to CSV
Created By
Anita Kirkovska
AI Agents
Web Search
Page scraping
React Agent for Web Search and Page Scraping
Created By
Aaron Levin
Evaluation
AI Agents
Synthetic Dataset Generator
Created By
Nico Finelli
RAG
Chatbot / Assistant
Q&A RAG Chatbot with Cohere reranking
Created By
Aaron Levin
Document extraction
Data extraction
Evaluation
Financial Statement Review Workflow
Created By
Anita Kirkovska
Content generation
Turn LinkedIn Posts into Articles and Push to Notion
Created By
Anita Kirkovska
Chatbot / Assistant
RAG
Trust Center RAG Chatbot
Created By
Akash Sharma
sucCCESS STORIES

Hear it from our customers

We know the power of AI, but how do we make it secure and ensure that we're not compromising privacy and security while still providing value? Vellum has been a big part of accelerating that experimentation part, allowing us to validate that a feature is high-impact and feasible.
Pratik Bhat
ai Product manager
We sped up AI development by 50 percent and decoupled updates from releases with Vellum. This allowed us to fix errors instantly without worrying about infrastructure uptime or costs.
Jordan Nemrow
Co-Founder & CTO @ Woflow
Vellum helped us quickly evaluate prompt designs and workflows, saving us hours of development. This gave us the confidence to launch our virtual assistant in 14 U.S. markets.
Sebi Lozano
Sr. Product Manager @ Redfin
GET STARTED

Build any AI agent with Vellum

Get started today and transform your business with intelligent automation
👋 Your partners in AI Excellence