AutomationFlowsWeb Scraping › Sdlc - Code Quality & Review

Sdlc - Code Quality & Review

SDLC - Code Quality & Review. Uses github, httpRequest. Webhook trigger; 7 nodes.

Webhook trigger★★★★☆ complexityAI-powered7 nodesGitHubHTTP Request
Web Scraping Trigger: Webhook Nodes: 7 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the GitHub → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "SDLC - Code Quality & Review",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "code-quality-check",
        "responseMode": "lastNode",
        "options": {}
      },
      "id": "webhook-trigger",
      "name": "Code Quality Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "operation": "getFileContent",
        "repository": "={{ $json.repository }}",
        "filePath": "={{ $json.file_path }}",
        "branch": "={{ $json.branch }}",
        "additionalFields": {}
      },
      "id": "fetch-code",
      "name": "Fetch Changed Files",
      "type": "@n8n/n8n-nodes-langchain.github",
      "typeVersion": 1,
      "position": [
        450,
        300
      ],
      "credentials": {
        "githubApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// Run ESLint checks\nconst code = $input.item.json.content;\nconst filePath = $input.item.json.file_path;\n\n// Simulate ESLint checks (in production, call actual ESLint API)\nconst issues = [];\n\n// Check for common issues\nif (code.includes('console.log')) {\n  issues.push({\n    line: code.split('\\n').findIndex(l => l.includes('console.log')) + 1,\n    severity: 'warning',\n    message: 'console.log should be removed before production',\n    rule: 'no-console'\n  });\n}\n\nif (code.includes('var ')) {\n  issues.push({\n    line: code.split('\\n').findIndex(l => l.includes('var ')) + 1,\n    severity: 'error',\n    message: 'Use let or const instead of var',\n    rule: 'no-var'\n  });\n}\n\nreturn [{\n  json: {\n    file: filePath,\n    issues: issues,\n    severity: issues.length > 0 ? (issues.some(i => i.severity === 'error') ? 'error' : 'warning') : 'success',\n    totalIssues: issues.length\n  }\n}];"
      },
      "id": "run-eslint",
      "name": "Run ESLint",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        650,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// Check code complexity and maintainability\nconst code = $input.all()[0].json.content;\nconst lines = code.split('\\n');\n\n// Calculate metrics\nconst complexity = {\n  linesOfCode: lines.length,\n  functionCount: (code.match(/function\\s+\\w+/g) || []).length,\n  cyclomaticComplexity: 1 + (code.match(/if|else|for|while|switch|catch/g) || []).length\n};\n\n// Determine if code needs refactoring\nlet needsRefactoring = false;\nlet suggestions = [];\n\nif (complexity.cyclomaticComplexity > 10) {\n  needsRefactoring = true;\n  suggestions.push('Cyclomatic complexity is high. Consider breaking down this function.');\n}\n\nif (complexity.linesOfCode > 200) {\n  needsRefactoring = true;\n  suggestions.push('File is quite large. Consider splitting into smaller modules.');\n}\n\nreturn [{\n  json: {\n    ...complexity,\n    needsRefactoring,\n    suggestions\n  }\n}];"
      },
      "id": "complexity-check",
      "name": "Complexity Analysis",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        650,
        500
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.severity }}",
              "operation": "equals",
              "value2": "error"
            }
          ]
        }
      },
      "id": "check-errors",
      "name": "Check for Errors",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        850,
        300
      ]
    },
    {
      "parameters": {
        "operation": "update",
        "repository": "={{ $json.repository }}",
        "pullRequestNumber": "={{ $json.pr_number }}",
        "body": "={{ '## Code Quality Report\\n\\n' + ($json.severity === 'error' ? '\u274c **Errors Found**\\n' : '\u26a0\ufe0f **Warnings Found**\\n') + '\\n### Issues:\\n' + $json.issues.map(i => `- **Line ${i.line}**: ${i.message} (${i.rule})`).join('\\n') + '\\n\\n### Suggestions:\\n' + ($json.suggestions || []).join('\\n') }}",
        "additionalFields": {
          "commentOn": "pr"
        }
      },
      "id": "comment-on-pr",
      "name": "Comment on PR",
      "type": "@n8n/n8n-nodes-langchain.github",
      "typeVersion": 1,
      "position": [
        1050,
        200
      ],
      "credentials": {
        "githubApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "url": "={{ $env.SLACK_WEBHOOK_URL }}",
        "authentication": "none",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"text\": \"{{ $json.severity === 'error' ? '\u274c' : '\u26a0\ufe0f' }} Code Quality Issues Found\",\n  \"blocks\": [\n    {\n      \"type\": \"section\",\n      \"text\": {\n        \"type\": \"mrkdwn\",\n        \"text\": \"*File:* {{ $json.file }}\\n*Issues:* {{ $json.totalIssues }}\\n*Severity:* {{ $json.severity }}\"\n      }\n    }\n  ]\n}",
        "options": {}
      },
      "id": "notify-quality-issues",
      "name": "Notify Quality Issues",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        1050,
        400
      ],
      "disabled": true
    }
  ],
  "connections": {
    "Code Quality Webhook": {
      "main": [
        [
          {
            "node": "Fetch Changed Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Changed Files": {
      "main": [
        [
          {
            "node": "Run ESLint",
            "type": "main",
            "index": 0
          },
          {
            "node": "Complexity Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run ESLint": {
      "main": [
        [
          {
            "node": "Check for Errors",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check for Errors": {
      "main": [
        [
          {
            "node": "Comment on PR",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Notify Quality Issues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Complexity Analysis": {
      "main": [
        [
          {
            "node": "Comment on PR",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [],
  "triggerCount": 1,
  "updatedAt": "2024-01-01T00:00:00.000Z",
  "versionId": "1"
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

SDLC - Code Quality & Review. Uses github, httpRequest. Webhook trigger; 7 nodes.

Source: https://github.com/sudheermanday/n8n-integration/blob/fff5afd8d3584f842d13f3a22590cff1d8d6a9c2/workflows/code-quality.json — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di

n8n, Execute Workflow Trigger, HTTP Request +1
Web Scraping

NexusAI - Error Handler & Auto-Fix. Uses httpRequest, github. Webhook trigger; 15 nodes.

HTTP Request, GitHub
Web Scraping

AI Workflow Orchestrator - MVP. Uses httpRequest, github. Webhook trigger; 10 nodes.

HTTP Request, GitHub
Web Scraping

Fully automated meeting documentation workflow that uses AI to transform raw transcripts into professional PDFs and actionable tasks. AI-powered summary generation (GPT-4) Automatic action item extrac

OpenAI, N8N Nodes Htmlcsstopdf, Gmail +4
Web Scraping

This comprehensive workflow automates the entire testimonial collection and publishing process, from submission to social media-ready content. It uses AI to enhance testimonials, generates beautiful b

OpenAI, N8N Nodes Htmlcsstoimage, HTTP Request +3