The bot:
- find all open PRs with a specific label (
marker.needMerge
) - manage all the repositories of a user or an organization
- take one PR
- with a specific label (
marker.mergeInProgress
) if exists - or the least recently updated PR
- with a specific label (
- verify:
- GitHub checks (CI, ...)
- "Mergeability"
- Reviews (
minReview
)
- check if the PR need to be updated
- if yes: rebase or merge with the base PR branch (ex:
master
)
- if yes: rebase or merge with the base PR branch (ex:
- merge the PR with the chosen merge method. (
mergeMethod
,marker.mergeMethodPrefix
) - closes related issues and add the same milestone as the PR
- if errors occurs add a specific label (
marker.needHumanMerge
) - if the description of the PR contains a co-author (
Co-authored-by: login <email@email.com>
) the co-author is set on the merge commit.
Myrmica Lobicornis:
-config string
Path to the configuration file. (default "./lobicornis.yml")
-h Show this help.
-server
Run as a web server.
-version
Display version information.
GITHUB_TOKEN
: GitHub token
Configuration file overview:
github:
# can be organization name or user name.
user: foo
# GitHub token.
token: XXXX
# optional only for GitHub Enterprise.
url: http://my-private-github.com
git:
# Git user email.
email: bot@example.com
# Git user name.
userName: botname
# if true, use SSH instead HTTPS.
ssh: false
server:
# server port. (only used in server mode)
port: 80
extra:
# Debug mode.
debug: false
# Dry run mode.
dryRun: true
# GitHub Labels.
markers:
# Label use when a pull request need a lower minimal review as default.
lightReview: bot/light-review
# Label use when the bot update the PR (merge/rebase).
mergeInProgress: status/4-merge-in-progress
# Use to override default merge method for a PR.
mergeMethodPrefix: bot/merge-method-
# Use to manage merge retry.
mergeRetryPrefix: bot/merge-retry-
# Label use when the bot cannot perform a merge.
needHumanMerge: bot/need-human-merge
# Label use when you want the bot perform a merge.
needMerge: status/3-needs-merge
# Label use when a PR must not be merge.
noMerge: bot/no-merge
# Merge retry configuration.
retry:
# Time between retry.
interval: 1m0s
# Number of retry before failed.
number: 1
# Retry on PR mergeable state (GitHub information).
onMergeable: false
# Retry on GitHub checks (aka statuses).
onStatuses: false
# default configuration used by all repositories of the user.
default:
# Use GitHub repository configuration to check the need to be up-to-date.
checkNeedUpToDate: false
# Forcing need up-to-date. (checkNeedUpToDate must be false)
forceNeedUpToDate: true
# Default merge method. (merge|squash|rebase|ff)
mergeMethod: squash
# Minimal number of review (light review).
minLightReview: 0
# Minimal number of review.
minReview: 1
# Forcing PR to have a milestone.
needMilestone: true
# Add a comment in the pull request when an error occurs.
addErrorInComment: false
# When the merge method is squash, define the strategy to create the commit message. (github|empty|description)
commitMessage: empty
# defines override of the default configuration by repository.
repositories:
'foo/myrepo1':
minLightReview: 1
minReview: 3
needMilestone: true
'foo/myrepo2':
minLightReview: 1
minReview: 1
needMilestone: false
export GITHUB_TOKEN=xxx
lobicornis
export GITHUB_TOKEN=xxx
lobicornis -server
export GITHUB_TOKEN=xxx
lobicornis -config="./my-config.yml"
- Myrmica Lobicornis π: Update and merge pull requests.
- Myrmica Aloba π: Add labels and milestone on pull requests and issues.
- Messor Structor π: Manage multiple documentation versions with Mkdocs.
- Lasius Mixtus π: Publish documentation to a GitHub repository from another.
- Myrmica Bibikoffi π: Closes stale issues
- Chalepoxenus Kutteri π: Track a GitHub repository and publish on Slack.
- Myrmica Gallienii π: Keep Forks Synchronized