This implements a Github Application that can approve and merge Pull Requests. The major use case is to automatically approve and merge DependeBot Pull Requests.
brew install protobuf- Then install Go plugins for the protocol compiler by following This guide
- Update your PATH so that the protoc compiler can find the plugins:
export PATH="$PATH:$(go env GOPATH)/bin"
- Install golangci-lint
- Run
make lintto lint the code for this service - consider setting up editor integration for quicker feedback.
Run make test to run available tests for this service.
Run make build to build main.go into build/dunebot.
Run make build-image to package your main binary in a docker image using the Dockerfile.
Pre-requisites:
- install envtor
go install github.com/fr12k/envtor@latest
Then you can run the following command to setup the needed environment variables and secrets and start the application.
teller env | envtor | docker-compose -f - upThe location of the application secrets are defined in the .teller.yml and the environment variables are defined in the .env file.
To debug the application locally, change the docker-compose.yaml file to use the Dockerfile.debug and run the following command:
teller env | envtor | docker-compose -f - upThis will start the application in debug mode and you can attach your debugger to the port 40000.
For vscode add the following to the launch configuration.
{
"name": "Connect to server",
"type": "go",
"request": "attach",
"mode": "remote",
"substitutePath": [
{
"from": "${workspaceFolder}",
"to": "/app"
},
{
"from": "%{HOME}/go/pkg/mod/",
"to": "/gomod-cache"
}
],
"port": 40000,
"host": "127.0.0.1"
}