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.
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
Every five minutes, ClickRuntime picks up new issues in your GitHub repo that it hasn't seen before.
It reads the titles of your other open issues.
AI decides whether each new issue is a bug, feature request or question, and whether it repeats an existing issue.
The label is added, and likely duplicates get a comment pointing to the original.
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
- 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
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?
How does it find duplicates?
Will it close an issue it thinks is a duplicate?
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 an AI review on every new pull request
Each new pull request gets a review comment within minutes, checked against your own guidelines.
See how it worksWrite GitHub release notes from commits
When a new tag appears, readable release notes are written from the commits since the last tag and published on the release.
See how it worksAssign new issues automatically
New issues get an owner based on their label, and anyone can take an issue by commenting /assign.
See how it worksKeep exploring
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.