A service that automatically approves and merges dependabot PRs.
- Create a new Classic PAT (Personal Access Token) with the
repo
scope. - Add the PAT to the environment variable
USER_TOKEN
. - Create a new secret for webhook secret.
- Add the webhook secret to the environment variable
WEBHOOK_SECRET
. - Make
config.yml
file and list the repositories you want to enable the autoapprove and automerge feature. - Deploy the service to the server (please refer to the deployment section).
- Create webhook by GitHub App or Organization webhook with the
Pull request
event, and the server URL (/event
), and the webhook secret.
The config.yml
can be configured as follows:
- repository: repository-name
autoapprove: true
automerge: true
- repository: another-repository-name
autoapprove: true
automerge: true
Prepare the following 2 environment variables:
USER_TOKEN
: GitHub Personal Access Token (PAT) with therepo
scope.WEBHOOK_SECRET
: GitHub webhook secret.
Then, deploy the service to the server with the following command:
$ docker compose up -d
The service will be available at http://<host>:8080
, and the webhook endpoint will be http://<host>:8080/event
.
MIT