GitAutomator responds to various events in your repository, acting as a smart assistant to enhance maintenance efficiency.
Visit the relevant GitHub APP page to install GitAutomator. After installation, comment /cat
on an issue or PR to check its functionality.
Name | Description |
---|---|
cat | To verify if GitAutomator functions properly with your repository, use the /cat command in an issue or PR |
ailabel | GitAutomator will utilize ChatGPT to label an issue or PR based on the labels in your repository and the issue/PR content |
aireleasenote | GitAutomator checks the release note block[1], assesses its appropriateness, and provides notifications |
approve | GitAutomator will approve and merge a PR when the maintainer comments /approve |
cherrypick | GitAutomator will cherry-pick the commits of the PR to another <target_branch> when the maintainer comments /cherry-pick <target_branch> |
label | GitAutomator will add <target_label> to the PR or issue when an account comments /label <target_label> |
prcomment | GitAutomator will post a thank you comment when a new PR is submitted |
prlabel | GitAutomator will label a PR based on its title; it will label a title prefixed with fix as bug , doc as documentation , and feat as enhancement |
prreact | GitAutomator will react with a heart when a new PR is submitted |
prreviewrequest | GitAutomator will automatically request reviews from the maintainers configured in .github/gitautomator.yaml |
-
[1]: The PR body should contain the following block:
This could work excellently if you're looking to automatically generate polished release notes. Feel free to use this template for your PR.
You can define the specific behavior by configuring the .github/gitautomator.yaml
file in your repository. The complete configuration is as follows:
owners:
- jwcesign # This identifies the maintainer of this repository. GitAutomator will request reviews from them for any new PR.
plugins:
- cat # This identifies the plugins to enable. If left blank, all plugins will be enabled.
Use the official GitHub App to manage your code repository. You can also deploy this App on a self-hosted server. Here are the detailed instructions.
First, you need to create a GitHub app. GitHub itself documents this. Below is the set of permissions needed.
Repository permissions:
- Commit statuses: Read and write
- Contents: Read and write
- Merge queues: Read and write
- Metadata: Read-only
- Pull requests: Read and write
- Issues: Read and write
In Subscribe to events select following events:
- Commit comment
- Issue comment
- Issues
- Label
- Merge group
- Merge queue entry
- Pull request
After creating a GitHub App, download the private key as app.pem
in the current directory and remember the App ID.
Visit https://smee.io to create a new channel, and remember the webhook proxy URL.
Navigate to the GitHub App settings page, and fill the App's webhook URL field with the Smee webhook proxy URL.
- Clone repository:
git clone https://github.com/jwcesign/gitautomator.git
- Export the necessary environment variables:
export APP_ID=xxx
export SMEEIO_URL=xxx
export CHATGPT_URL=https://api.openai.com/v1 # you can set another URL
export OPENAI_KEY=xxx # your OpenAI secret key
- Run the container service:
docker-compose up -d
- Enjoy your time!
If you are interested in participating in joint development, welcome to STAR/FORK/PR.