Every 5 minutes
Assign new issues automatically
New issues get an owner based on their label, and anyone can take an issue by commenting /assign.
- Runs
- Every 5 minutes
- Apps
- GitHub
- AI
- Not needed
- Access
- Issues: read+write
Send this to your assistant
Create a ClickRuntime automation: every 5 minutes, assign new unassigned issues in acme/app: bug goes to @sam, docs goes to @lee. If someone comments /assign on an issue, assign it to them and reply to confirm.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
New issues in a GitHub repository often sit with no assignee, and the people who would take them do not know they exist. In a team repo that means bugs wait for triage. In an open source project it means a contributor writes "can I work on this?" and gets no answer for a week, then loses interest and the issue stays open.
Every 5 minutes the run looks at issues and comments created since the last check. An issue labeled backend can be assigned to the backend owner, and when someone comments "assign me" on an open issue, they are added as assignee. A short reply confirms what was done, so nobody is left guessing.
It is a good match for projects that label issues as good first issue, and for small teams that route work by label.
What you get out of it
Contributors are never left waiting
Someone who asks to work on an issue gets confirmation within minutes, which keeps volunteers motivated and reduces the chance of two people building the same fix in parallel. Prompt answers keep newcomers engaged with the project.
Issues have owners from day one
Routing by label means a database bug reaches the person who knows the schema, instead of waiting in a shared pile until a triage meeting happens. That also shortens the time between report and first commit toward a fix.
Maintainers skip the assignment chore
No one needs to click through the sidebar for every ticket, and the time saved adds up quickly in a repository that receives dozens of reports a week. It frees maintainers for reviewing code and answering design questions instead.
Clear record of who took what
The confirmation comment is a visible commitment on the issue itself, so anyone browsing later can see who agreed to take it and when. That visible trail is useful for sprint reviews too.
Fewer stale claims to untangle
Because assignment is immediate and visible, there is less chance of an unassigned issue being half-started by two people who never knew about each other. Wasted duplicate effort is one of the quietest costs in volunteer projects.
How it works
What happens, step by step
Every five minutes, ClickRuntime checks your GitHub repo for new issues and comments.
It matches each new issue's label to your rules, such as bug goes to Sam, and spots anyone commenting /assign.
The issue is assigned to the right person.
A short comment confirms who was assigned and why.
Before it runs live
- Connect GitHub
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other GitHub steps into one automation
Under the hood
The code that runs this automation
from datetime import datetime, timezone
from clickruntime import on_trigger, credentials, http, state, report_fetched
def gh(method, path, **kw):
resp = http.request(method, f"https://api.github.com{path}", headers={
"Authorization": f"Bearer {credentials.connection('github', 'work')}",
"Accept": "application/vnd.github+json"}, **kw)
resp.raise_for_status()
return resp.json() if resp.content else None
REPO = "acme/app"
RULES = {"bug": "sam", "docs": "lee"}
@on_trigger
def run(event):
since = state.get("since") or datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
issues = [i for i in gh("GET", f"/repos/{REPO}/issues", params={"since": since, "state": "open", "per_page": 50})
if "pull_request" not in i and not i["assignees"]]
comments = [c for c in gh("GET", f"/repos/{REPO}/issues/comments", params={"since": since, "per_page": 50})
if c["body"].strip().lower().startswith("/assign")]
report_fetched(len(issues) + len(comments))
state.set("since", datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"))
if not issues and not comments:
return {"assigned": 0}
for issue in issues:
who = next((RULES[l["name"]] for l in issue["labels"] if l["name"] in RULES), None)
if who:
gh("POST", f"/repos/{REPO}/issues/{issue['number']}/assignees", json={"assignees": [who]})
for c in comments:
number, user = c["issue_url"].rsplit("/", 1)[1], c["user"]["login"]
gh("POST", f"/repos/{REPO}/issues/{number}/assignees", json={"assignees": [user]})
gh("POST", f"/repos/{REPO}/issues/{number}/comments", json={"body": f"Assigned to @{user}."})
return {"issues": len(issues), "commands": len(comments)}FAQ
Common questions
What exactly does the 'assign me' command look like?
Can two people end up assigned to the same issue?
What if the assignee label rule matches nothing?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Get a Slack message for every new issue
Each new issue on your repo shows up in Slack with its title, author and link.
See how it worksGet pinged when a pull request is opened
You hear about each new pull request within minutes of it being opened.
See how it worksHear about new releases of repos you follow
When a project you depend on ships a release, you get the version and release notes.
See how it worksKeep exploring
Set up “Assign new issues automatically” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.