Automate GitHub Issue Assignment
detail.loadingPreview
Automatically assigns GitHub issues to the creator or a commenter based on specific keywords.
About This Workflow
This workflow automates the process of assigning GitHub issues. It listens for new issues and comments on issues. If an issue is opened and has no assignee, it assigns the issue creator. If a comment is made on an issue and contains the phrase 'assign me', it checks if the issue is already assigned. If not, it assigns the commenter.
Key Features
- Triggers on GitHub issue and issue_comment events.
- Routes workflows based on issue action (opened, created).
- Checks if an issue has assignees.
- Detects 'assign me' keywords in issue body and comments.
- Assigns the issue creator to newly opened, unassigned issues.
- Assigns a commenter to an issue if they request it and the issue is unassigned.
- Adds a 'assigned' label to issues upon assignment.
- Adds a comment to an issue if a user requests assignment but the issue is already assigned to someone else.
How To Use
- Trigger: The workflow starts with a
Github Trigger1node, configured to listen forissue_commentandissuesevents in a specific repository. - Action Switch: A
Switchnode determines the action based on the GitHub event'sactionfield. It routes to different paths for 'opened' or 'created' issue events, and for comment-related events. - **Issue Opened/Created Logic:
- IF no assignee? This
IFnode checks two conditions:- If the
assigneesarray of the issue is empty (.lengthequals 0). - If the
bodyof the issue contains the regex/^[a,A]ssign[\w*\s*]*me/gm(a case-insensitive check for 'assign me' or similar phrases).
- If the
- If both conditions are met, the
Assign Issue Creatornode is triggered. This node uses the GitHub API toeditthe issue, adding the issue's creator as an assignee and applying the 'assigned' label. - If the conditions are not met, a
NoOpnode is used to do nothing.
- IF no assignee? This
- **Comment Logic:
- IF wants to work? This
IFnode checks if thebodyof the comment contains the regex/^[a,A]ssign[\w*\s*]*me/gm. - If the comment indicates a desire to work on the issue, it then proceeds to the IF not assigned? node.
- IF not assigned? This
IFnode checks if theassigneesarray of the issue is empty.- If the issue has no assignees, the
Assign Commenternode is triggered. This node assigns the commenter to the issue and adds the 'assigned' label. - If the issue already has assignees, the
Add Commentnode is triggered. This node posts a message to the issue informing the commenter that the issue is already assigned.
- If the issue has no assignees, the
- If the comment does not indicate a desire to work on the issue, a
NoOp1node is used to do nothing.
- IF wants to work? This
Apps Used
Workflow JSON
{
"id": "c74f1725-0a1b-4430-940c-ee9ca537c260",
"name": "Automate GitHub Issue Assignment",
"nodes": 16,
"category": "Automation",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: c74f1725-0a1b...
About the Author
SaaS_Connector
Integration Guru
Connecting CRM, Notion, and Slack to automate your life.
Statistics
Related Workflows
Discover more workflows you might like
Dynamic Prompt Generation from GitHub with Language Model Integration
Fetches prompts from a GitHub repository, substitutes variables, and processes them with an AI agent.
Inventory Slack Alert Workflow
Triggers an alert based on inventory changes, processes data using RAG, and logs results.
Automated Google Drive Backup for n8n Workflows
Automatically back up n8n workflows to Google Drive on a schedule.