Sync GitHub Releases with GitLab Issues
Automate your development workflow by automatically creating a GitLab issue for every new GitHub release. This template prevents duplicate issues and keeps your team in sync with upstream projects.
Overview
Automatically creates a GitLab issue to track new releases from an upstream GitHub repository, ensuring development and update tasks are never missed.
🗂️ Description & Use Case
This workflow automates the process of tracking upstream GitHub releases by creating corresponding issues in a GitLab project. It's designed to run on a schedule, check for the latest release, and intelligently create a new issue only if one doesn't already exist for that release, preventing duplicate tasks.
How It Works:
- Scheduled Trigger: The workflow runs automatically on a weekly schedule using the
Cronnode. You can adjust the schedule to fit your needs (e.g., daily, hourly). - Fetch Data: It simultaneously fetches the latest release from a specified GitHub repository (
Get latest release) and lists all open issues from your target GitLab project (List issues). - Check for Duplicates: The
Mergenode combines the data from GitHub and GitLab. A customFunctionnode then checks if an issue already exists for the latest release by comparing the release tag (tag_name) against the titles of existing GitLab issues. - Create Issue (If Needed): If no corresponding issue is found, the
Create issuenode automatically creates a new issue in GitLab. The issue is pre-populated with the release tag in the title and the release notes and URL in the body, providing all necessary context for your team. - Prevent Redundancy: If an issue for the release already exists, the workflow stops at the function node, ensuring your issue tracker remains clean and free of duplicates.
✅ Real-World Use Cases:
- Upstream Dependency Management: Keep track of new versions of a library or application your project depends on. Automatically create a task for your team to test and integrate the new release.
- Docker Image Updates: Monitor a base project on GitHub (like
linkcheck) and automatically create an issue in GitLab to trigger the process of updating and rebuilding your corresponding Docker image (docker-linkcheck). - Release Management: Ensure that every new release of your public project on GitHub is internally tracked for further actions like documentation updates or deployment announcements within GitLab.
- Streamlining DevOps: Connect your development and operations by creating an auditable trail of releases and the work associated with them, directly within your primary project management tool.
Instructions
Basic steps
- Download workflow JSON
- Import into n8n
- Configure node parameters as needed
- Test and enable the workflow
💡 Tips
After importing, verify all connectors and credentials match your environment.
Preview
Workflow Visualization
Nodes
Get latest release
github
Cron
cron
Merge
merge
No issue for release?
function
Create issue
gitlab
List issues
gitlab
Statistics
View full JSON structure
{
"nodes": [
{
"name": "Get latest release",
"type": "n8n-nodes-base.github",
"position": [
540,
340
],
"parameters": {
"limit": 1,
"resource": "release",
"operation": "getAll"
},
"typeVersion": 1
},
{
"name": "Cron",
"type": "n8n-nodes-base.cron",
"position": [
240,
500
],
"parameters": {
"triggerTimes": {
"item": [
{
"mode": "everyWeek"
}
]
}
},
"typeVersion": 1
},
{
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
740,
420
],
"parameters": {},
"typeVersion": 1
},
{
"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
},
{
"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
},
{
"name": "List issues",
"type": "n8n-nodes-base.gitlab",
"position": [
540,
500
],
"parameters": {
"owner": "txlab",
"resource": "repository",
"repository": "docker-linkcheck",
"getRepositoryIssuesFilters": {}
},
"typeVersion": 1
}
],
"connections": {
"Cron": {
"main": [
[
{
"node": "Get latest release",
"type": "main",
"index": 0
},
{
"node": "List issues",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "No release for issue?",
"type": "main",
"index": 0
}
]
]
},
"Start": {
"main": [
[
{
"node": "Get latest release",
"type": "main",
"index": 0
},
{
"node": "List issues",
"type": "main",
"index": 0
}
]
]
},
"List issues": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Get latest release": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"No release for issue?": {
"main": [
[
{
"node": "Create issue",
"type": "main",
"index": 0
}
]
]
}
}
}Actions
Technical Specs
Compatibility
License
This workflow template follows MIT license, you can freely use, modify and distribute.
Please comply with relevant third-party service terms when using.