{
  "nodes": [
    {
      "name": "Get latest release",
      "type": "n8n-nodes-base.github",
      "position": [
        540,
        340
      ],
      "parameters": {
        "limit": 1,
        "resource": "release",
        "operation": "getAll"
      },
      "typeVersion": 1,
      "id": "bf7d4605-b066-4c6d-ad34-7fd02f5f081e",
      "notes": "This github node performs automated tasks as part of the workflow."
    },
    {
      "name": "Cron",
      "type": "n8n-nodes-base.cron",
      "position": [
        240,
        500
      ],
      "parameters": {
        "triggerTimes": {
          "item": [
            {
              "mode": "everyWeek"
            }
          ]
        }
      },
      "typeVersion": 1,
      "id": "19c51102-b256-4ee7-bdb4-86b214a69123",
      "notes": "This cron node performs automated tasks as part of the workflow."
    },
    {
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        740,
        420
      ],
      "parameters": {},
      "typeVersion": 1,
      "id": "14000e84-dd29-4a74-b2e6-42eb2d9f0295",
      "notes": "This merge node performs automated tasks as part of the workflow."
    },
    {
      "name": "No issue for release?",
      "type": "n8n-nodes-base.function",
      "position": [
        920,
        420
      ],
      "parameters": {
        "functionCode": "const _ = require('lodash')\n\n// differentiate merged inputs (didnt find a way to get both inputs into one function invocation)\nconst releases = _.filter(items, i => _.has(i, 'json.assets'))\nif (releases.length != 1) throw new Error(`Invalid release count: ${releases.length}`)\nconst release = releases[0]\nconst issues = _.without(items, release)\n//console.log({release,issues})\n\n// check if there's an issue for the release\nconst matchingIssue = _.find(issues, i => i.json.title.includes(release.json.tag_name))\n//console.log({release,issues,matchingIssue})\n\nif (matchingIssue)\n  return []\nelse\n  return [release]"
      },
      "executeOnce": false,
      "typeVersion": 1,
      "id": "55245df8-20a5-4d6c-9ce8-d32dfa0f6764",
      "notes": "This function node performs automated tasks as part of the workflow."
    },
    {
      "name": "Create issue",
      "type": "n8n-nodes-base.gitlab",
      "position": [
        1100,
        420
      ],
      "parameters": {
        "body": "={{$json[\"url\"]}}\n\n{{$json[\"body\"]}}",
        "owner": "txlab",
        "title": "=Upstream release: {{$json[\"tag_name\"]}}",
        "labels": [],
        "repository": "docker-linkcheck",
        "assignee_ids": []
      },
      "typeVersion": 1,
      "id": "85f9b593-e414-49fc-b00b-0e52e7444acc",
      "notes": "This gitlab node performs automated tasks as part of the workflow."
    },
    {
      "name": "List issues",
      "type": "n8n-nodes-base.gitlab",
      "position": [
        540,
        500
      ],
      "parameters": {
        "owner": "txlab",
        "resource": "repository",
        "repository": "docker-linkcheck",
        "getRepositoryIssuesFilters": {}
      },
      "typeVersion": 1,
      "id": "5e1625b0-67c3-47a5-a4fc-f35eaa7d528b",
      "notes": "This gitlab node performs automated tasks as part of the workflow."
    },
    {
      "id": "error-bf00e6df",
      "name": "Error Handler",
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        1000,
        400
      ],
      "parameters": {
        "message": "Workflow execution error",
        "options": {}
      }
    },
    {
      "id": "e4f21348-0907-5812-86a9-ff22890ec123",
      "name": "Publication · Overview and setup",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -800,
        0
      ],
      "parameters": {
        "content": "# Github Workflow\n\n## Purpose and structure\nThis folder contains the **Github Workflow** workflow. Its executable nodes use `cron`, `function`, `github`, `gitlab`, `merge`, `stopAndError`. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.\n\n## Setup\nImport inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.\n\n## Entry points\nCron\n\n## Verification\nSanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.\n\n## Attribution\nhttps://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Github/0135_GitHub_Cron_Create_Scheduled.json\nMIT; preserve source notices.",
        "width": 700,
        "height": 800,
        "color": 1
      }
    }
  ],
  "connections": {},
  "name": "Github Workflow",
  "description": "Automated workflow: Github Workflow. This workflow processes data and performs automated tasks.",
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": null,
    "timezone": "UTC",
    "executionTimeout": 3600,
    "maxExecutions": 1000,
    "retryOnFail": true,
    "retryCount": 3,
    "retryDelay": 1000
  },
  "notes": "Excellent quality workflow: Github Workflow. This workflow has been optimized for production use with comprehensive error handling, security, and documentation.",
  "active": false
}
