Templates / Automate GitHub PR linting with Google Gemini AI and auto-fix PRs

Automate GitHub PR linting with Google Gemini AI and auto-fix PRs

Needs changes

by Adam Bertram ✓ · 466 views · created 2025-05-15 · DevOps, Multimodal AI

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 20 nodes and runs when an HTTP GET request hits its webhook URL. Along the way it connects HTTP Request and Google Gemini Chat Model.

How it runs

Trigger: When an HTTP GET request hits its webhook URL.

  1. Set Common Fields (Code): runs custom JavaScript code
  2. Get PR GitHub Branch (HTTP Request): calls an HTTP API
  3. Get Latest Main Branch Commit SHA (HTTP Request): calls an HTTP API
  4. Get Latest Main Branch Tree Hash (HTTP Request): calls an HTTP API
  5. Get PR Files (HTTP Request): calls an HTTP API
  6. Get File Contents (HTTP Request): calls an HTTP API
  7. Convert Base64 to Text File (Convert to File): converts data to a file (to binary)
  8. Extract from File: extracts data from a file (text)
  9. Create Code/FilePath Object (Edit Fields (Set)): sets 2 fields: code, filePath
  10. Collect All Files Changed (Aggregate): combines items into one

…plus 2 more steps. See the full node list below.

Services it uses

HTTP RequestGoogle Gemini Chat Model

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • AI Agent v1 (old agent modes) in AI Agent (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).

Removed in 3.0Replace with
AI Agent v1 (old agent modes)
AI Agent (v1.9)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (11)

From the author

LintGuardian: Automated PR Linting with n8n & AI What It Does LintGuardian is an n8n workflow template that automates code quality enforcement for GitHub repositories. When a pull request is created, the workflow automatically analyzes the changed files,…

Excerpt from Adam Bertram's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.