Automate GitHub PR linting with Google Gemini AI and auto-fix PRs
Needs changesWhat 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.
- Set Common Fields (Code): runs custom JavaScript code
- Get PR GitHub Branch (HTTP Request): calls an HTTP API
- Get Latest Main Branch Commit SHA (HTTP Request): calls an HTTP API
- Get Latest Main Branch Tree Hash (HTTP Request): calls an HTTP API
- Get PR Files (HTTP Request): calls an HTTP API
- Get File Contents (HTTP Request): calls an HTTP API
- Convert Base64 to Text File (Convert to File): converts data to a file (to binary)
- Extract from File: extracts data from a file (text)
- Create Code/FilePath Object (Edit Fields (Set)): sets 2 fields: code, filePath
- Collect All Files Changed (Aggregate): combines items into one
…plus 2 more steps. See the full node list below.
Services it uses
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.0 | Replace 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)
- Webhook
n8n-nodes-base.webhook - AI Agent
@n8n/n8n-nodes-langchain.agent - Respond to Webhook
n8n-nodes-base.respondToWebhook - HTTP Request
n8n-nodes-base.httpRequest - Convert to File
n8n-nodes-base.convertToFile - Extract from File
n8n-nodes-base.extractFromFile - Edit Fields (Set)
n8n-nodes-base.set - Aggregate
n8n-nodes-base.aggregate - Http Request Tool
n8n-nodes-base.httpRequestTool - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Code
n8n-nodes-base.code
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,…