You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Migrate the tags functionality to the community bot #84
We can track the tag's last used date. we can simply use that to check if (last_used > N days) { prune() }
Staff should be the one who prunes.
To prune, we could have a slash command for it that lists the unused tags, and show a multiple select dropdown to choose and prune them.
we could also have a cron job that runs daily/weekly/monthly that checks for tags that are last used since more the N days, and return that same list/dropdown.
For example we could have a very specific tag something like $breakpoints that shows the common breakpoints to handle when doing responsive development. We don't get the question that often, but it's still a very useful tag. And pretty sure it won't survive the 14 days. I was thinking something like 90 days. The cron doesn't matter how often it runs, that depends on how often to we intended to prune, it could run weekly but would still be returning tags that are last used more than 90 days ago, not a week ago
I've added a last_used_at db column that's by default null when creating a tag, when the tag gets used, that gets updated.
I've also added a customizable DAYS_TO_KEEP_TAGS bot option that we use to check if the tag is pruneable or not. Currently I'm checking if it is based on 2 conditions, either last_used_at is null and tag created_at is > DAYS_TO_KEEP_TAGS, or if last_used_at is > DAYS_TO_KEEP_TAGS.
The /tags prune command shows a paginated list of pruneable tags, with a dropdown to select tags to KEEP, and a button to prune other tags in that list. Cron sends the same message weekly.
@hmd-ali I am fine with 90 days as well. Maybe no cron job then, i think that is too much after all. A simple command, like you suggest /tags prune will show a list of pruneable tags sorted by last used in ascending order. Then we run the command manually whenever we want to take a look and take an action. Howerever, the prune droddown should select tags to PRUNE not to keep. anything not selected is kept. anythign selected is pruned. This is better UX.
To summaries
no cron job
90 days before tags becomes pruneable
/tags prune is a command which shows a select where we select tags to prune
Activity
[-]Add the tags functionality to the community bot[/-][+]Migrate the tags functionality to the community bot[/+]hmd-ali commentedon Aug 16, 2026
We can track the tag's last used date. we can simply use that to check
if (last_used > N days) { prune() }Staff should be the one who prunes.
To prune, we could have a slash command for it that lists the unused tags, and show a multiple select dropdown to choose and prune them.
we could also have a cron job that runs daily/weekly/monthly that checks for tags that are last used since more the N days, and return that same list/dropdown.
We just need to define N.
wiktoriavh commentedon Aug 17, 2026
How about a cron job every 14 days that shows us the tags that were last used 14 days ago.
hmd-ali commentedon Aug 17, 2026
for which purpose? to prune everything else? In that case, I think 14 days is really short
hmd-ali commentedon Aug 17, 2026
For example we could have a very specific tag something like
$breakpointsthat shows the common breakpoints to handle when doing responsive development. We don't get the question that often, but it's still a very useful tag. And pretty sure it won't survive the 14 days. I was thinking something like 90 days. The cron doesn't matter how often it runs, that depends on how often to we intended to prune, it could run weekly but would still be returning tags that are last used more than 90 days ago, not a week agohmd-ali commentedon Aug 18, 2026
I've added a
last_used_atdb column that's by defaultnullwhen creating a tag, when the tag gets used, that gets updated.I've also added a customizable
DAYS_TO_KEEP_TAGSbot option that we use to check if the tag is pruneable or not. Currently I'm checking if it is based on 2 conditions, eitherlast_used_atis null and tagcreated_atis >DAYS_TO_KEEP_TAGS, or iflast_used_atis >DAYS_TO_KEEP_TAGS.The
/tags prunecommand shows a paginated list of pruneable tags, with a dropdown to select tags to KEEP, and a button to prune other tags in that list. Cron sends the same message weekly.wiktoriavh commentedon Aug 18, 2026
@hmd-ali I am fine with 90 days as well. Maybe no cron job then, i think that is too much after all. A simple command, like you suggest
/tags prunewill show a list of pruneable tags sorted by last used in ascending order. Then we run the command manually whenever we want to take a look and take an action. Howerever, the prune droddown should select tags to PRUNE not to keep. anything not selected is kept. anythign selected is pruned. This is better UX.To summaries
/tags pruneis a command which shows a select where we select tags to prunefeat(#84): add tags functionality (#91)