Implementation:Kubeflow Kubeflow Label Bot Stale Bot Config
| Knowledge Sources | |
|---|---|
| Domains | Issue Management, Automation, YAML Configuration, Bot Configuration |
| Last Updated | 2026-02-13 00:00 GMT |
Overview
Concrete tool for automating issue classification and lifecycle management provided by mlbot.net label bot and Probot Stale configurations.
Description
The Kubeflow repository uses two YAML configuration files to automate issue management:
.github/issue_label_bot.yamlconfigures the mlbot.net issue label bot, which uses machine learning to classify issues and apply standardizedkind/*labels based on the issue content..github/stale.ymlconfigures the Probot Stale bot, which automatically marks and closes issues that have been inactive for a defined period, with configurable exemptions for high-priority and frozen issues.
These two configurations work together: the label bot ensures issues are properly classified when created, and the stale bot manages the lifecycle of those issues over time. The label mappings translate informal categories (bug, feature_request, question) into the project's formal label taxonomy, while the stale configuration enforces a 90-day inactivity threshold with a 7-day grace period.
Usage
Use these configurations when:
- Setting up or modifying automated issue classification in the Kubeflow repository.
- Adjusting stale issue thresholds, exemption labels, or notification messages.
- Adding new label mappings for additional issue categories.
- Debugging why certain issues are or are not being marked as stale.
- Replicating the automation pattern in a new Kubeflow sub-project repository.
Code Reference
Source Location
- Repository: kubeflow/kubeflow
- File:
.github/issue_label_bot.yaml(Lines 1-6) - File:
.github/stale.yml(Lines 1-44)
Signature
Issue Label Bot Configuration:
# for https://mlbot.net
label-alias:
bug: 'kind/bug'
feature_request: 'kind/feature'
feature: 'kind/feature'
question: 'kind/question'
Stale Bot Configuration:
## Configuration for "Probot: Stale"
## https://github.com/probot/stale
daysUntilStale: 90
daysUntilClose: 7
exemptLabels:
- lifecycle/frozen
- priority/p0
- priority/p1
- priority/p2
- priority/p3
exemptProjects: true
exemptMilestones: true
staleLabel: lifecycle/stale
markComment: |
This issue has been automatically marked as stale because it has not had activity in __90 days__.
It will be closed in __7 days__ if no further activity occurs.
...
closeComment: false
Import
# Both files are automatically read by their respective GitHub Apps.
# No manual import or installation is needed by contributors.
# To install the label bot on a repository:
# Visit https://mlbot.net and install the GitHub App
# To install the stale bot on a repository:
# Visit https://github.com/apps/stale and install the Probot App
# To modify configurations:
git clone https://github.com/kubeflow/kubeflow.git
cd kubeflow/.github/
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| label-alias | mapping (string to string) | Yes | Maps informal issue categories to formal Kubeflow label names using kind/* prefix convention.
|
| daysUntilStale | integer | Yes | Number of days of inactivity before an issue is marked stale. Set to 90.
|
| daysUntilClose | integer | Yes | Number of days after stale marking before automatic closure. Set to 7.
|
| exemptLabels | list of strings | No | Labels that exempt an issue from stale processing. Includes lifecycle/frozen and priority/p0 through priority/p3.
|
| exemptProjects | boolean | No | When true, issues associated with GitHub Projects are exempt from stale processing.
|
| exemptMilestones | boolean | No | When true, issues associated with milestones are exempt from stale processing.
|
| staleLabel | string | Yes | The label applied to stale issues. Set to lifecycle/stale.
|
| markComment | string | No | The comment posted when an issue is marked stale. Uses template syntax with __N days__ placeholders.
|
| closeComment | boolean or string | No | Comment posted when closing. Set to false to suppress closing comments.
|
Outputs
| Name | Type | Description |
|---|---|---|
| Classified issue labels | GitHub labels | The label bot applies kind/bug, kind/feature, or kind/question labels to new issues based on content analysis.
|
| Stale label applied | GitHub label | The lifecycle/stale label is applied to issues inactive for 90 days.
|
| Stale notification comment | GitHub comment | A comment is posted to stale issues explaining the policy and 7-day closure timeline. |
| Automatic issue closure | GitHub issue state | Issues that remain inactive for 7 days after stale marking are automatically closed. |
Usage Examples
Example: Adding a New Label Mapping
# In .github/issue_label_bot.yaml, add a new alias:
label-alias:
bug: 'kind/bug'
feature_request: 'kind/feature'
feature: 'kind/feature'
question: 'kind/question'
documentation: 'kind/documentation'
Example: Exempting a New Priority Label
# In .github/stale.yml, add a new exempt label:
exemptLabels:
- lifecycle/frozen
- priority/p0
- priority/p1
- priority/p2
- priority/p3
- priority/critical-urgent
Example: Preventing an Issue from Going Stale
# To prevent a specific issue from being marked stale,
# apply one of the exempt labels:
gh issue edit 1234 --add-label "lifecycle/frozen"
# Or assign a priority label:
gh issue edit 1234 --add-label "priority/p2"
Example: Customizing the Stale Notification Message
# In .github/stale.yml, modify the markComment:
markComment: |
This issue has been automatically marked as stale because
it has not had activity in __90 days__.
It will be closed in __7 days__ if no further activity occurs.
If this issue is still relevant, please comment or add the
`lifecycle/frozen` label to keep it open.