{ "name": "GitHub Repository Profile", "nodes": [ { "name": "On clicking 'execute'", "type": "n8n-nodes-base.manualTrigger", "position": [ 540, 350 ], "parameters": {}, "typeVersion": 1, "id": "github-repository-profile-0" }, { "id": "github-repository-profile-read", "name": "Read GitHub community profile", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 520, 300 ], "parameters": { "method": "GET", "url": "https://api.github.com/repos/YOUR_OWNER/YOUR_REPO/community/profile", "authentication": "predefinedCredentialType", "nodeCredentialType": "githubApi", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Accept", "value": "application/vnd.github+json" }, { "name": "X-GitHub-Api-Version", "value": "2022-11-28" } ] }, "options": { "response": { "response": { "responseFormat": "json", "fullResponse": true } }, "timeout": 30000, "redirect": { "redirect": { "followRedirects": false } } } } }, { "id": "github-repository-profile-confirm", "name": "Confirm community profile", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 760, 300 ], "parameters": { "mode": "runOnceForEachItem", "jsCode": "function profileResult({ body, statusCode, bodyEncoding }) {\n if (statusCode !== 200 || bodyEncoding != null || !body || typeof body !== 'object' || Array.isArray(body) || typeof body.health_percentage !== 'number' || !Number.isFinite(body.health_percentage) || body.health_percentage < 0 || body.health_percentage > 100) throw new Error('GitHub did not return a completed community profile response');\n return { profile: body };\n}\n\nreturn { json: profileResult({ body: $json.body, statusCode: $json.statusCode, bodyEncoding: null }).profile };" } } ], "active": false, "settings": { "executionOrder": "v1" }, "connections": { "On clicking 'execute'": { "main": [ [ { "node": "Read GitHub community profile", "type": "main", "index": 0 } ] ] }, "Read GitHub community profile": { "main": [ [ { "node": "Confirm community profile", "type": "main", "index": 0 } ] ] } }, "pinData": {} }