Automation for stale GitLab issues, merge requests, and branches.
Part of the @kira bots family.
kira-stale packages a ready-to-run gitlab-triage
policy in a Docker image, so teams can keep project queues clean without
rewriting the same repository maintenance rules for every project.
- Marks stale issues after long inactivity and closes them later
- Validates issue labels and highlights broken label combinations
- Flags issues without descriptions as invalid and closes them automatically
- Detects issues and merge requests without time tracking metadata
- Escalates issue deadlines with
deadline::*labels - Copies metadata from linked issues to merge requests
- Marks stale merge requests that need review or follow-up
- Closes invalid merge requests automatically
- Deletes merged, stale branches after a retention period
Requirements:
- Docker
- An existing GitLab project
- A GitLab access token with
apipermissions - The labels expected by the triage policy
docker pull wemakeservices/kira-staleTest the policy in dry-run mode first:
docker run --rm wemakeservices/kira-stale \
gitlab-triage \
--dry-run \
--source-id="your-gitlab-project-int-id" \
--token="your-gitlab-token-with-api-perm"Run it for real once the output looks correct:
docker run --rm wemakeservices/kira-stale \
gitlab-triage \
--source-id="your-gitlab-project-int-id" \
--token="your-gitlab-token-with-api-perm"Advanced deployment and scheduling options come from
gitlab-triage docs.
GitLab's own
triage policies
are also a useful reference.
The bundled policy expects these labels to exist:
deadline::softdeadline::harddeadline::missvalidation:labelsvalidation:stalevalidation:estimatevalidation:invalidmr::processed
Unlike
deadline::*andmr::*, thevalidation:*group intentionally uses one:instead of GitLab scoped labels. Several validation labels can be present on the same issue or merge request at the same time.
You can use kira-setup
to create these labels for you.
We use this bot to keep GitLab projects in a predictable state.
Instead of handling stale items, broken labels, deadline reminders, and cleanup
rules manually, kira-stale applies the same policy every time through one
reusable Docker image.
kira: the full bots familykira-setup: project setup and shared labels for new repositorieskira-release: automated semantic releases