Bot to automatically approve Bitbucket Server PRs

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]
  --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
make REGISTRY= IMAGE=your-username/bb-approve-bot docker-run
Similar Resources

Sex-bot - The sex bot and its uncreative responses

Sex-bot - The sex bot and its uncreative responses

Sex Bot The sex bot, made with golang! The sex bot can't hear the word "sexo" he

Nov 11, 2022

Feline-bot - Feline Bot for Discord using Golang

Feline Bot for Discord Development This bot is implemented using Golang. Feature

Feb 10, 2022

WIP Telegram Bot API server in Go

botapi The telegram-bot-api, but in go. WIP. Reference: https://core.telegram.org/bots/api Reference implementation: https://github.com/tdlib/telegram

Jan 2, 2023

A simple Discord bot developed for the Bedrock Gophers discord server.

Bedrock Gopher A simple Discord bot developed for the Bedrock Gophers discord server. Click here to invite the bot to your guild. You will also need t

Mar 12, 2022

CoachCarter: a discord bot which lets a server know if its inactive for too long

CoachCarter: a discord bot which lets a server know if its inactive for too long

I took this job because I wanted to affect change in a special group of young me

Jan 7, 2022

Open-IM-Server is open source instant messaging Server.Backend in Go.

Open-IM-Server is open source instant messaging Server.Backend in Go.

Open-IM-Server Open-IM-Server: Open source Instant Messaging Server Instant messaging server. Backend in pure Golang, wire transport protocol is JSON

Jan 2, 2023

A Discord bot for managing ephemeral roles based upon voice channel member presence.

A Discord bot for managing ephemeral roles based upon voice channel member presence.

ephemeral-roles A Discord bot for managing ephemeral roles based upon voice channel member presence. Quickstart Click on the Ephemeral Roles logo head

Dec 19, 2022

IRC, Slack, Telegram and RocketChat bot written in go

IRC, Slack, Telegram and RocketChat bot written in go

go-bot IRC, Slack & Telegram bot written in Go using go-ircevent for IRC connectivity, nlopes/slack for Slack and Syfaro/telegram-bot-api for Telegram

Dec 20, 2022

Simple yet customizable bot framework written in Go.

Simple yet customizable bot framework written in Go.

Introduction Sarah is a general-purpose bot framework named after the author's firstborn daughter. This comes with a unique feature called "stateful c

Dec 12, 2022
Comments
  • Only approve branches that have 'automerge' enabled

    Only approve branches that have 'automerge' enabled

    Currently the bot approves all PRs ignoring if the Renovate-Bot "auto merge" feature is enabled or not.

    The renovate-approve-bot-bitbucket-cloud behaves differently and ignores/filters PRs that don't have the auto merge feature enabled, see https://github.com/renovatebot/renovate-approve-bot-bitbucket-cloud/blob/main/index.js#L28

    I adopted this functionality in this PR.

Bot-template - A simple bot template for creating a bot which includes a config, postgresql database

bot-template This is a simple bot template for creating a bot which includes a c

Sep 9, 2022
A discord bot that watches for tiktok URL's and automatically uploads the corresponding video to the channel

TikiTok Bot A Discord bot that watches for TikTok URLs and sends a message to the channel with the corresponding video attached Click to invite the bo

Jul 28, 2022
A Discord bot that automatically retrieves ELO ratings for Age of Empires 4 and gives users custom roles.

AOE 4 ELO Bot This is a Discord bot that automatically retrieves ELO ratings for Age of Empires 4 and gives users custom roles. Uses the public API fo

May 13, 2022
A bot based on Telegram Bot API written in Golang allows users to download public Instagram photos, videos, and albums without receiving the user's credentials.

InstagramRobot InstagramRobot is a bot based on Telegram Bot API written in Golang that allows users to download public Instagram photos, videos, and

Dec 16, 2021
Dlercloud-telegram-bot - A Telegram bot for managing your Dler Cloud account

Dler Cloud Telegram Bot A Telegram bot for managing your Dler Cloud account. Usa

Dec 30, 2021
Quote-bot - Un bot utilisant l'API Twitter pour tweeter une citation par jour sur la programmation et les mathématiques.

Description Ceci est un simple bot programmé en Golang qui tweet une citation sur la programmation tout les jours. Ce bot est host sur le compte Twitt

Jan 1, 2022
Discord-bot - A Discord bot with golang

JS discord bots Install Clone repo git clone https://github.com/fu-js/discord-bo

Aug 2, 2022
Bot - Telegram Music Bot in Go

Telegram Music Bot in Go An example bot using gotgcalls. Setup Install the serve

Jun 28, 2022
Pro-bot - A telegram bot to play around with the community telegram channels

pro-bot ?? Pro Bot A Telegram Bot to Play Around With The Community Telegram Cha

Jan 24, 2022
Slack-emoji-bot - This Slack bot will post the newly created custom Slack emojis to the channel of your choice

Slack Emoji Bot This Slack bot will post the newly created custom Slack emojis t

Oct 21, 2022