https://github.com/traefik/aloba
🤖 [Myrmica Aloba 🐜] Bot: Add labels and milestone on pull requests and issues
https://github.com/traefik/aloba
github github-actions github-bot issues labels milestones pull-requests
Last synced: 5 months ago
JSON representation
🤖 [Myrmica Aloba 🐜] Bot: Add labels and milestone on pull requests and issues
- Host: GitHub
- URL: https://github.com/traefik/aloba
- Owner: traefik
- License: apache-2.0
- Created: 2017-08-06T23:27:41.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-03-16T13:33:27.000Z (over 2 years ago)
- Last Synced: 2025-05-07T09:13:31.164Z (5 months ago)
- Topics: github, github-actions, github-bot, issues, labels, milestones, pull-requests
- Language: Go
- Homepage:
- Size: 155 KB
- Stars: 18
- Watchers: 16
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Myrmica Aloba: Add labels and milestone on pull requests and issues.
[](https://github.com/traefik/aloba/releases/latest)
[](https://github.com/traefik/aloba/actions)
[](https://hub.docker.com/r/traefik/aloba/builds/)## Overview
Available Commands:
- `action`: GitHub Action (Add labels and milestone on pull requests and issues.)
- `label`: Add labels and milestone on pull requests and issues.
- `report`: Create a report and publish on Slack.
- `version`: Display the version.## Manage GitHub labels.
- on new issue: adds the label `status/0-needs-triage`
- on new pull request:
- adds the label `status/0-needs-triage`
- add labels based on [rules](#rules).
- adds a milestone (if a milestone matches the based branch of the PR).
- adds a label related to the size of the pull request.### Command `action`
```yaml
GitHub ActionUsage: action [--flag=flag_argument] [-f[flag_argument]] ... set flag_argument to flag(s)
or: action [--flag[=true|false| ]] [-f[true|false| ]] ... set true/false to boolean flag(s)Flags:
--debug Debug mode. (default "false")
--dry-run Dry run mode. (default "true")
-h, --help Print Help (this message) and exit
```- `GITHUB_TOKEN`: Github Token.
- `.github/aloba-rules.toml`: the rules to apply.#### Examples:
```hcl
workflow "Aloba: Issues" {
on = "issues"
resolves = ["issue-labels"]
}action "issue-labels" {
uses = "docker://traefik/aloba"
secrets = ["GITHUB_TOKEN"]
args = "action --dry-run=false"
}workflow "Aloba: Pull Requests" {
on = "pull_request"
resolves = ["pull-request-labels"]
}action "pull-request-labels" {
uses = "docker://traefik/aloba"
secrets = ["GITHUB_TOKEN"]
args = "action --dry-run=false"
}
```### Command `label`
```yaml
Add labels and milestone on pull requests and issues.Usage: label [--flag=flag_argument] [-f[flag_argument]] ... set flag_argument to flag(s)
or: label [--flag[=true|false| ]] [-f[true|false| ]] ... set true/false to boolean flag(s)Flags:
--debug Debug mode. (default "false")
--dry-run Dry run mode. (default "true")
--github GitHub options. (default "true")
-o, --github.owner Repository owner.
-r, --github.repo-name Repository name.
--github.token GitHub token.
--rules-path Path to the rule file. (default "./rules.toml")
--web-hook Run as WebHook. (default "true")
--web-hook.port WebHook port. (default "80")
--web-hook.secret WebHook secret.
-h, --help Print Help (this message) and exit
```- `GITHUB_TOKEN`: Github Token.
- `WEBHOOK_SECRET`: Github WebHook Secret.#### Examples:
```shell
aloba label -o traefik -r traefik --web-hook --github.token="xxxxxxxxxx"
```### Rules
```toml
[[Rules]]
Label = "area/vegetable"
Regex = "(?i).*(tomate|carotte).*"[[Rules]]
Label = "area/cheese"
Regex = "cheese/.*"[[Rules]]
Label = "area/infrastructure"
Regex = "(?i)(\\.github|script/).*"[Limits]
[Limits.Small]
SumLimit = 150
DiffLimit = 70
FilesLimit = 20
[Limits.Medium]
SumLimit = 400
DiffLimit = 200
FilesLimit = 50
```## Command `report`
```yaml
Create a report and publish on Slack.Usage: report [--flag=flag_argument] [-f[flag_argument]] ... set flag_argument to flag(s)
or: report [--flag[=true|false| ]] [-f[true|false| ]] ... set true/false to boolean flag(s)Flags:
--debug Debug mode. (default "false")
--dry-run Dry run mode. (default "true")
--github GitHub options. (default "true")
-o, --github.owner Repository owner.
-r, --github.repo-name Repository name.
--github.token GitHub token.
--slack Slack options. (default "true")
--slack.bot-icon Bot icon emoji. (default ":captainpr:")
--slack.bot-name Bot name. (default "CaptainPR")
--slack.channel Slack channel ID.
--slack.token Slack token.
-h, --help Print Help (this message) and exit
```- `GITHUB_TOKEN`: Github Token.
- `SLACK_TOKEN`: Slack Token.### Examples:
```shell
aloba report -o traefik -r traefik --github.token="xxxxxxxxxx" --slack.token="xxxxxxxxxx" --slack.channel=C0CDT22PJ
```## The Mymirca colony
- [Myrmica Lobicornis](https://github.com/traefik/lobicornis) 🐜: Update and merge pull requests.
- [Myrmica Aloba](https://github.com/traefik/aloba) 🐜: Add labels and milestone on pull requests and issues.
- [Messor Structor](https://github.com/traefik/structor) 🐜: Manage multiple documentation versions with Mkdocs.
- [Lasius Mixtus](https://github.com/traefik/mixtus) 🐜: Publish documentation to a GitHub repository from another.
- [Myrmica Bibikoffi](https://github.com/traefik/bibikoffi) 🐜: Closes stale issues
- [Chalepoxenus Kutteri](https://github.com/traefik/kutteri) 🐜: Track a GitHub repository and publish on Slack.
- [Myrmica Gallienii](https://github.com/traefik/gallienii) 🐜: Keep Forks Synchronized## What does Myrmica Aloba mean?
