This project is inspired by Prow, and implements chat-ops, automatic PR merging in a form of Probot Github App
Prow is a Kubernetes based CI/CD system. Jobs can be triggered by various types of events and report their status to many different services. In addition to job execution, Prow provides GitHub automation in the form of policy enforcement, chat-ops via /foo style commands, and automatic PR merging.
Kuilei(傀儡) is a kind of wooden puppet in ancient China, usually controlled from above using wires or strings depending on regional variations, and is often used in puppetry.
There are also some masters who are proficient in mechanics who can make puppets that can move automatically, similar to robots today. The two most famous of them are Mo Zi and Lu Ban, who lived in the early portion of the Warring States period in Chinese history.
Slash commands (commands with /
as prefix):
- Labels
-
/lgtm [cancel]
: Add/Removelgtm
label to a pull request or issue. -
/approve [cancel]
: Add/Removeapproved
label to a pull request or issue. -
/[remove-]label xxx
: Add/Remove arbitrary label to a pull request or issue. -
/hold [cancel]
: Add/Removedo-not-merge/hold
label to a pull request or issue.
-
- Issue/PR management
-
/assign
Assign -
/close
Close -
/milestone
-
Natural language parsing:
TODO
Supported pipeline configuration:
- GitHub style pipeline configuration
Supported pipeline backend:
- Tekton pipeline
- Kubeflow pipeline (MLOps specific)
- Argo workflow
- Raw kubernetes
- Raw docker
Just like tide
in prow:
- Merge pull requests with required labels
- e.g. merge pull requests with labels
lgtm
andapproved
- e.g. merge pull requests with labels
- Keep pull requests with certain labels from merging
- e.g. hold pull requests with label
do-not-merge/hold
- e.g. hold pull requests with label
- Reset mandatory CI job before merging
- Using merge-pool to manage multiple pull requests
- E-mail notification
- Slack notification
- WeCom notification
- DingTalk notification
- WeChat notification
- GitHub
- GitLab
- Raw SSH Git Server
- Gerrit
Follow the official document to create your GitHub App.
Then go to the App settings page
- Get the
App ID
- Set in the
webhook secret
blank and save it in local file.env/web_secret
- Generate a
priviate key
and save it in local file.env/private.pem
- Set the
Webhook URL
tohttp://<IP>:7771/hook
# Set App ID
APP_ID=
# Pull latest docker image
docker run -d --name kuilei --restart=always \
-v `pwd`/.env:/etc/kuilei \
-p 7771:7771 airconduct/kuilei hook \
--github.appid ${APP_ID} \
--github.hmac-token-file /etc/kuilei/web_secret \
--github.private-key-file /etc/kuilei/private.pem \
--address="0.0.0.0"
# Build docker image
docker build -t kuilei .
If you have suggestions for how kuilei could be improved, or want to report a bug, open an issue! We'd love all and any contributions.
For more, check out the Contributing Guide.
Apache © 2022 Airconduct