Skip to content

Every 5 minutes

Label new issues and flag duplicates

New issues are labelled as a bug, feature or question, and likely duplicates get a comment pointing to the original.

Runs
Every 5 minutes
Apps
GitHub
AI
Yes, uses the built-in AI allowance
Access
Issues: read+write

Send this to your assistant

Create a ClickRuntime automation: when a new issue is opened in acme/app, label it bug, feature or question, compare it with open issues, and if it looks like a duplicate, comment with a link to the existing issue.

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

A popular repository receives issues faster than maintainers can read them. A bug report arrives with no label, a feature request is filed for the third time this month and a support question lands in the bug tracker. Someone has to open each one, decide what it is and search for duplicates, so the backlog turns into a pile that nobody wants to sort.

Every 5 minutes new issues are fetched along with the titles of open issues. ClickRuntime's built-in AI chooses a label such as bug, enhancement or question and looks for an existing issue that describes the same thing. The label is applied and, when a likely match exists, a comment points the reporter to it.

It helps maintainers of open source projects and product teams who accept public feedback and are tired of answering the same report repeatedly.

What you get out of it

  • Backlog arrives pre-sorted

    Labels are present before a maintainer opens the issue, so filters like all open bugs or all enhancements are accurate and planning meetings do not start with a sorting session.

  • Duplicates are caught early

    Pointing a reporter to an existing issue within minutes keeps the discussion in one place, which prevents the same problem being debated in three threads. Fewer parallel threads also means fewer contradictory answers from different maintainers.

  • Reporters get a fast reply

    A first response that arrives almost at once makes the project feel active, and it can answer the reporter's question when the duplicate already has a workaround. Answering quickly helps a young project earn trust with users.

  • Maintainer attention goes further

    Time not spent opening and classifying issues is spent fixing bugs, and the project can handle more reports without anyone being added to the rota. The same team can support a growing user base without more headcount.

  • Labels follow the same logic

    One consistent reading of each report avoids the drift that happens when five people label by gut feel, so release notes and metrics built on labels stay trustworthy. That consistency pays off at release time.

How it works

What happens, step by step

  1. Every five minutes, ClickRuntime picks up new issues in your GitHub repo that it hasn't seen before.

  2. It reads the titles of your other open issues.

  3. AI decides whether each new issue is a bug, feature request or question, and whether it repeats an existing issue.

  4. The label is added, and likely duplicates get a comment pointing to the original.

Before it runs live

  • Connect GitHub

What you get

RunsEvery 5 minutes
Label new issues and flag duplicatestoday, 9:00Succeeded
GitHub · acme/app #921Label: bug · "This looks like a duplicate of #874."

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
  • Change what the AI looks for, or how it writes the result
  • 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.
ai_triage_and_duplicate_check_of_new_issues.pyexample
from clickruntime import on_trigger, credentials, http, ai, 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"
SCHEMA = {"type": "object", "properties": {"label": {"enum": ["bug", "feature", "question"]},
          "duplicate_of": {"type": ["integer", "null"]}}}

@on_trigger
def run(event):
    last = state.get("last_number") or 0
    open_issues = [i for i in gh("GET", f"/repos/{REPO}/issues", params={"state": "open", "per_page": 100})
                   if "pull_request" not in i]
    new = [i for i in open_issues if i["number"] > last]
    report_fetched(len(new))
    if not new:
        return {"triaged": 0}
    for issue in sorted(new, key=lambda i: i["number"]):
        others = "\n".join(f"#{i['number']} {i['title']}" for i in open_issues if i["number"] != issue["number"])[:6000]
        out = ai.generate(f"New issue: {issue['title']}\n{(issue['body'] or '')[:2000]}\n\nOpen issues:\n{others}",
                          system="Label the new issue and give the number of an open issue it duplicates, or null.",
                          json_schema=SCHEMA, max_output_tokens=40).json
        gh("POST", f"/repos/{REPO}/issues/{issue['number']}/labels", json={"labels": [out["label"]]})
        if out.get("duplicate_of"):
            gh("POST", f"/repos/{REPO}/issues/{issue['number']}/comments",
               json={"body": f"This looks like a duplicate of #{out['duplicate_of']}."})
    state.set("last_number", max(i["number"] for i in new))
    return {"triaged": len(new)}

FAQ

Common questions

What labels will it use?
It chooses from labels that exist in your repository, such as bug, enhancement and question. You tell it the label names you want and it uses only those, so it will not create stray labels that clutter the list.
How does it find duplicates?
It compares the new issue with the titles of open issues and asks the AI which one, if any, describes the same problem. It only comments when a likely match exists, and the match is a suggestion for a human to confirm.
Will it close an issue it thinks is a duplicate?
No. It labels the issue and adds a comment with a link, but it never closes anything. A maintainer decides whether the issue really is a duplicate and closes it themselves. This keeps closing decisions in human hands, which matters because similar-looking issues sometimes hide different root causes.
What permissions does it need?
Issues: read+write. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly 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 “Label new issues and flag duplicates” from your assistant

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