Skip to content

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.

Paste it into your assistant. It tells you what it will send or change before it runs live.

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

  1. Every five minutes, ClickRuntime checks your GitHub repo for new issues and comments.

  2. It matches each new issue's label to your rules, such as bug goes to Sam, and spots anyone commenting /assign.

  3. The issue is assigned to the right person.

  4. A short comment confirms who was assigned and why.

Before it runs live

  • Connect GitHub

What you get

RunsEvery 5 minutes
Assign new issues automaticallytoday, 9:00Succeeded
GitHub · acme/app #915Assigned to @sam (label: bug)

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
auto_assign_issues.pyexample
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?
A comment containing the phrase you choose, such as assign me, on an open issue triggers it. You decide the wording, and the commenter is added as an assignee only if GitHub allows them to be assigned in that repository.
Can two people end up assigned to the same issue?
Only if you allow it. A common setup assigns the first requester and replies to later ones that the issue is taken. If you prefer shared issues, ask for the rule to add everyone who comments.
What if the assignee label rule matches nothing?
Issues that match no rule are left unassigned and untouched, so they remain visible for a human to triage. You can add a fallback assignee, such as the repo owner, for anything the rules do not cover.
What permissions does it need?
Issues: read+write. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Assign new issues automatically” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.