A job to approve Pull Requests from Renovate Bot on Bitbucket Server. This enables you to require Pull Request approvals on your repository while also utilising Renovate's "automerge" feature.
For Github, see renovatebot/renovate-approve-bot. For Bitbucket Cloud, see renovatebot/renovate-approve-bot-bitbucket-cloud.
On each run, the bot will:
- Get all the open PRs assigned to the Renovate Approve Bot user
- Filter out PRs not created by the Renovate Bot user
- Filter out PRs where "automerge" is disabled
- Approve the "automerge" PRs
-
Create an account for the renovate-approve-bot in your Bitbucket Server instance
-
Grant read access on your repositories to the renovate-approve-bot account
-
Optionally, add the renovate-approve-bot account to the default reviewers if you require approval from default reviewers
-
Set the environment variables:
BITBUCKET_URL: URL of your Bitbucket Server instanceBITBUCKET_USERNAME: Bitbucket username associated with the account used for renovate-approve-botBITBUCKET_PASSWORD: Password of the Bitbucket account used for renovate-approve-botRENOVATE_BOT_USER: Bitbucket username of your Renovate Bot
-
Run the bot (on a schedule similarly to Renovate Bot, e.g. as a Cron job):
-
With Docker:
docker run --rm \ --env BITBUCKET_URL \ --env BITBUCKET_USERNAME \ --env BITBUCKET_PASSWORD \ --env RENOVATE_BOT_USER \ ghcr.io/yieldlab/renovate-approve-bot-bitbucket-server:latest
-
From source:
npm install --production node ./index.js
-
If you discover any important bug with renovate-approve-bot-bitbucket-server that may pose a security problem, please disclose it confidentially to renovate-disclosure@whitesourcesoftware.com first, so that it can be assessed and hopefully fixed prior to being exploited.
Please do not raise GitHub issues for security-related doubts or problems.