Weekly
Label and close stale issues every week
Issues with no activity for 60 days are labelled stale, closed 14 days later if nothing happens, and you get the list.
- Runs
- Weekly
- Apps
- GitHub
- AI
- Not needed
- Access
- Issues: read+write
Send this to your assistant
Create a ClickRuntime automation: every Monday, label issues in acme/app with no activity for 60 days as stale with a short comment, close issues that have been stale for 14 more days, and email me the list.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A repository that has been active for a couple of years accumulates hundreds of open issues that nobody is going to work on: bugs from versions long gone, questions that were answered in a comment and never closed, feature requests from users who left. The open count reaches 400, new contributors are discouraged, and genuine priorities disappear in the pile.
Each week, open issues are listed oldest-activity first. Those quiet for 60 days get a stale label and a polite comment asking whether it is still relevant, and issues that were already marked stale and stayed silent are closed. A summary email tells you what was labeled and what was closed.
Maintainers of mature open source projects and teams that treat GitHub issues as a working backlog tend to use it. It works for any project that has outgrown manual grooming.
What you get out of it
The issue count means something again
A smaller list of live issues shows the real size of the work ahead, which makes it easier for contributors to find a worthwhile place to start. A manageable list also invites more contributions from people who were put off.
Reporters get a fair warning
The stale comment gives people a chance to respond before closure, so a user who still cares can say so and the issue remains open with fresh information. Respectful notice keeps goodwill with the community while still getting work done.
Triage time shrinks
Maintainers no longer re-read year-old threads at every planning session, because the dead ones are retired automatically and the remaining ones deserve attention. That time returns to fixing actual bugs and shipping features that matter.
Closed does not mean lost
Closed issues stay searchable and can be reopened by anyone with a new reproduction, so tidying up never destroys the history that future bug reports rely on. Nothing of value is erased by the cleanup, only moved out of sight.
A weekly summary keeps you informed
The email lists exactly what was labeled or closed, so you can spot a mistake quickly and reopen something that should have stayed, without auditing the whole backlog. Mistakes get reversed quickly and with very little effort.
How it works
What happens, step by step
Once a week, the automation goes through the open issues in your GitHub repo, starting with the least recently updated.
Issues with no activity for 60 days get a stale label and a comment saying they will close soon.
Stale issues still quiet 14 days later are closed.
You get an email listing what was marked stale and what was closed.
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
- Run it at a different time, more or less often, or only on weekdays
- 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, timedelta, timezone
from clickruntime import on_trigger, credentials, http, notify
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"
@on_trigger
def run(event):
now = datetime.now(timezone.utc)
age = lambda ts: now - datetime.fromisoformat(ts.replace("Z", "+00:00"))
issues = [i for i in gh("GET", f"/repos/{REPO}/issues", params={"state": "open", "sort": "updated",
"direction": "asc", "per_page": 100}) if "pull_request" not in i]
marked, closed = [], []
for i in issues:
stale = any(l["name"] == "stale" for l in i["labels"])
if stale and age(i["updated_at"]) > timedelta(days=14):
gh("PATCH", f"/repos/{REPO}/issues/{i['number']}", json={"state": "closed", "state_reason": "not_planned"})
closed.append(f"#{i['number']} {i['title']}")
elif not stale and age(i["updated_at"]) > timedelta(days=60):
gh("POST", f"/repos/{REPO}/issues/{i['number']}/labels", json={"labels": ["stale"]})
gh("POST", f"/repos/{REPO}/issues/{i['number']}/comments",
json={"body": "No activity for 60 days, so this is marked stale. It will close in 14 days unless there's an update."})
marked.append(f"#{i['number']} {i['title']}")
if marked or closed:
notify.email_me("Stale issue clean-up", "Marked stale:\n" + "\n".join(marked or ["none"]) +
"\n\nClosed:\n" + "\n".join(closed or ["none"]))
return {"marked": len(marked), "closed": len(closed)}FAQ
Common questions
Can I exempt issues from being closed?
How is inactivity measured?
Does it touch pull requests?
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
Back up your data to a GitHub repo every night
Your exports and configs are committed to a private repo each night, only when something changed, with a summary by email.
See how it worksGet weekly stats for your repos by email
Every Monday you see stars, forks, open issues and open pull requests for your repos, and how they changed since last week.
See how it worksGet a morning digest of new pull requests
Each weekday morning you get one email with the pull requests opened in the last day, grouped by repo.
See how it worksKeep exploring
Set up “Label and close stale issues every week” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.