Skip to content

wemake-services/kira-stale

Repository files navigation

Kira Stale Bot

wemake.services kira-family Build Status Dependencies Status

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.

Features

  • 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

Installation

Requirements:

  • Docker
  • An existing GitLab project
  • A GitLab access token with api permissions
  • The labels expected by the triage policy
docker pull wemakeservices/kira-stale

Quick Start

Test 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.

Required Labels

The bundled policy expects these labels to exist:

  • deadline::soft
  • deadline::hard
  • deadline::miss
  • validation:labels
  • validation:stale
  • validation:estimate
  • validation:invalid
  • mr::processed

Unlike deadline::* and mr::*, the validation:* 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.

Why Use It

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.

Related Projects

  • kira: the full bots family
  • kira-setup: project setup and shared labels for new repositories
  • kira-release: automated semantic releases

About

🐿️ Kira's micro-bot to fight with stale GitLab issues and merge requests

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

 
 
 

Contributors