renovate-approve-bot-bitbucket-server

command module
v0.0.0-...-6313c5f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2022 License: MIT Imports: 8 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL