Skip to content

strohmattenverleger/renovate-approve-bot-bitbucket-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

renovate-approve-bot-bitbucket-server

Introduction

This is a small application, similar to renovatebot/renovate-approve-bot-bitbucket-cloud to automatically approve PRs where the current user is added as a reviewer.

The idea behind this tool is to be able to auto-approve PRs from Renovate so that, if they have automerge enabled they can be automerged by Renovate itself.

This tool doesn't automatically merge any PR, it just approves them.

Requirements

  • Docker
  • Make

Building

Docker Image

make REGISTRY= IMAGE=your-username/bb-approve-bot docker-build
make REGISTRY= IMAGE=your-username/bb-approve-bot docker-run

Warning: the default configuration assumes one of our internal Docker registries

Locally

make build
./approve-bot

Usage

Usage: approve-bot [--debug] --username USERNAME --password PASSWORD --endpoint ENDPOINT [--author-filter AUTHOR-FILTER]

Options:
  --debug, -D
  --username USERNAME, -u USERNAME [env: BITBUCKET_USERNAME]
  --password PASSWORD, -p PASSWORD [env: BITBUCKET_PASSWORD]
  --endpoint ENDPOINT, -e ENDPOINT [env: BITBUCKET_ENDPOINT]
  --author-filter AUTHOR-FILTER, -a AUTHOR-FILTER [env: BITBUCKET_AUTHOR_FILTER]
  --add-comment, -c      "true" to add a comment in addition to approving a PR, "false" to not add a comment. [default: true, env: BITBUCKET_ADD_COMMENT]
  --help, -h             display this help and exit

Quick Local Run

export BITBUCKET_USERNAME=your-username
read -s -r BITBUCKET_PASSWORD
# Type password and press enter
export BITBUCKET_PASSWORD
export BITBUCKET_ENDPOINT=https://bitbucket.example.com/rest
export BITBUCKET_AUTHOR_FILTER=renovate-bot # Only approve PRs created by this user
export BITBUCKET_ADD_COMMENT=true
make REGISTRY= IMAGE=your-username/bb-approve-bot docker-run

About

Bot to automatically approve Bitbucket Server PRs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 78.8%
  • Makefile 15.1%
  • Dockerfile 4.2%
  • Shell 1.9%