All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Handle status comment IDs as bigint/int8 because of integer overflow (GitHub IDs are just super large!)
- Uniformization of some environment variables by using common prefixes
- DATABASE_URL => BOT_DATABASE_PG_URL
- BOT_USERNAME => BOT_NAME
- BOT_DATABASE_POOL_SIZE => BOT_DATABASE_PG_POOL_SIZE
- BOT_GITHUB_API_CONNECT_TIMEOUT => BOT_API_GITHUB_CONNECT_TIMEOUT
- BOT_GITHUB_API_ROOT_URL => BOT_API_GITHUB_ROOT_URL
- BOT_GITHUB_API_TOKEN => BOT_API_GITHUB_TOKEN
- BOT_GITHUB_APP_ID => BOT_API_GITHUB_APP_ID
- BOT_GITHUB_APP_INSTALLATION_ID => BOT_API_GITHUB_APP_INSTALLATION_ID
- BOT_GITHUB_APP_PRIVATE_KEY => BOT_API_GITHUB_APP_PRIVATE_KEY
- BOT_GITHUB_WEBHOOK_SECRET => BOT_SERVER_WEBHOOK_SECRET
- BOT_REDIS_ADDRESS => BOT_LOCK_REDIS_ADDRESS
- Pull request rule system
- Apply actions based on specific conditions (like enabling automerge if author is named "bot")
- Driver system for API / Lock / Database to conditionally use a specific backend
- New command to rename an existing repository
- New "utils pem-to-string" command to display a PEM file on one-line (to use as an environment variable)
- Project renamed to "prbot" for more clarity
- Use latest stable Rust version
- Use
shaku
to inject use-cases instead of passing everything everywhere- It greatly eases testing and project maintenance
- Centralize merging code (between automerge / manual merge)
0.24.0 - 2023-11-23
- Add conditional mocking on traits
- Add more tests on the
github-scbot-core
crate - Add "admin-add-merge-rule" bot command (fixes #175)
- Expose interfaces for each use case, to improve testing.
- Rework the CLI commands (
auth add-admin-rights
=>auth admins add
, etc.) - Keep the GitHub installation token for 30 minutes after its generation (for faster response times)
- Do not update PR labels if they do not change
- Remove
req-
and addr+
/r-
to set/unset reviewers - Lock Rust version to 1.74.0
- Update all dependencies to their latest versions
- Fix BOT_SERVER_BIND_PORT handling (fixes #174)
0.23.1 - 2023-03-20
- Fix JWT verification after
jsonwebtoken
update - Fix performance problems due to an unneeded lock around the
DbService
0.23.0 - 2023-03-19
- Split all crates
- Change crate folder case from
snake_case
tokebab-case
- Update all libs to their latest versions
- Replace
chrono
withtime
- Replace
crypto
withsha2
andhmac
- Migrate error handling to
thiserror
- Skipping checks command skip checks on existing PRs (fixes #151)
- Fix wrong message when enabling QA on the whole repository (fixes #152)
0.22.0 - 2022-05-26
- Retry mechanism on each GitHub endpoints
- Use
clap
version 3
- Fetch all check suites instead of first 30
- Fetch all labels instead of first 30
0.21.2 - 2022-05-20
- Migrate error handling to 'snafu'
- Use
lld
as default linker
- Fetch all reviews instead of first 30
0.21.1 - 2022-05-05
- Default QA status is now waiting (instead of skipped)
0.21.0 - 2022-05-05
- Summary creation lock should be fixed
- Less verbosity on tracing::instrument
0.20.0 - 2022-05-03
- New database crate using
sqlx
. - New custom Prometheus metrics
- Health check will try to access the database and Redis
- Update to actix-web 4
- Update to Sentry 0.25
- Removed telemetry support to focus on Prometheus metrics
0.19.0 - 2022-04-08
- New command
labels+ <labels>
andlabels- <labels>
to set/unset labels on pull requests. - Optional telemetry report using opentelemetry.
- Instrumentation on some methods.
- Use stable Rust 1.60.0.
- Update dependencies.
- Use raw reqwest calls instead of octocrab.
- Comments now do not invalidate approvals or change requests (fixes #128).
- Check status is now fetched before creating a PR (fixes #130).
- Only use last check suite if it appears multiple times in a pull request (fixes #132).
0.18.0 - 2022-01-14
- Use stable Rust 1.57.0.
- Add bunyan formatter in logging configuration.
- The bot can now compile on Windows (but without TUI support)
- Approval status is now stored in reviews in a separate field.
0.17.1 - 2021-12-20
- Do not set the
awaiting-changes
if the PR is not mergeable because it was merged.
0.17.0 - 2021-12-02
- Handle conflict status on pull requests.
- Creation of a
github-scbot-sentry
crate for easy maintenance. - New
/debug
route (enabled with theBOT_TEST_DEBUG_MODE
environment variable) to try error reporting.
- Use the
rsa
crate instead ofopenssl
(to generate RSA keys). - Reuse
just
instead of an adhoc crate. - Update Sentry to
0.23
, with adaptations insentry-actix
andsentry-eyre
.
0.16.0 - 2021-10-27
- Support reviewers without the leading '@' in req+/- commands
- Check command rights based on write permissions instead of PR owner
0.15.0 - 2021-10-26
- Handle changes requests
- Check permissions when adding required reviewers
0.14.0 - 2021-10-04
- Fix most data races on database (using update statements only containing altered fields instead of all fields)
- Add Prometheus support
- New admin bot command
admin-reset-summary
to recreate a summary comment (maintenance type command)
- Add some free functions in structs
0.13.1 - 2021-09-30
- Remove data races on reviews using a Redis lock
0.13.0 - 2021-09-29
- New
strategy_override
field on thePullRequest
table - New
set-merge-strategy
command onpull-requests
to set an overriden merge strategy for a specific pull request - New
strategy+ <strategy>
andstrategy-
bot commands - Handle commands from the pull request body at creation
- Replaced
structopt
withargh
- Split the
github_scbot_libs
crate - Better testability with
AppContext
- Current status text is now in summary comment
0.12.0 - 2021-09-21
- Add default automerge, QA, and checks status in repository
- Add
nochecks+
andnochecks-
bot commands - Add
admin-set-default-automerge+
andadmin-set-default-automerge-
bot commands - Add
admin-set-default-qa-status+
andadmin-set-default-qa-status-
bot commands - Add
admin-set-default-checks-status+
andadmin-set-default-checks-status-
bot commands - Add
repository set-automerge <status>
CLI command - Add
repository set-qa-status <status>
CLI command - Add
repository set-checks-status <status>
CLI command
0.11.0 - 2021-09-13
admin-reset-reviews
command to reset stored reviews- Add optional merge strategy override to
bot merge
command
- Remove reviews before removing pull request (especially needed on
bot admin-disable
) - Handle empty body on issue/pull request
- Split Command types in two User / Admin enums
0.10.1 - 2021-06-14
- GitHub token regenerated at each request (if not, bad credentials)
0.10.0 - 2021-06-13
- Configurable database pool size (
BOT_DATABASE_POOL_SIZE
) - Redis support in crate
github_scbot_redis
, mostly to set locks - Using adapters on each external part: API, database, Redis, gifs
admin-disable
command to disable bot on a PR (only in manual interaction mode)
- All database calls are now asynchronous, using a separate threadpool (using
tokio_diesel
) - Use Rust
nightly-2021-06-04
for bleeding edgerustfmt
,clippy
andgrcov
compatibility - Renamed the
github_scbot
crate togithub_scbot_cli
- All admin commands are now checking admin rights
- Summary message is now only created on PR opening, or after
admin-enable
command - Thanks to Redis locks, there should be no more race conditions on automerge
0.9.3 - 2021-05-19
- Error handling on bot commands
- Ignore check suites without pull requests
0.9.2 - 2021-05-17
- Added a
debug test-sentry
command to test Sentry connection - Manual interaction mode (using admin-enable command) to use the bot on specific pull requests only
- Optional history tracking
- Support for more admin commands (
set-default-needed-reviewers
,set-default-merge-strategy
,set-default-pr-title-regex
,set-needed-reviewers
)
- Removed unneeded fields from GitHub types
- Fixed status duplications (only PR opening should trigger PR creation in database)
- Use Rust nightly for formatting (more options)
- Use buster-slim base Docker image
- Renaming admin commands with
admin-
suffix (admin-help, admin-enable, admin-sync) - Merge command results in one comment (if comments are sent)
- Better Gif parameters
0.9.1 - 2021-03-01
- Use a threadpool for a few database operations
0.9.0 - 2021-02-25
- React to GitHub webhooks to update review status
- Generate a summary comment, once per PR, automatically updated on lifecycle changes
- Validate PR titles depending on per-repository regexes (and a default configuration)
- Step system to track PR state (awaiting-checks, awaiting-changes, awaiting-merge, etc.)
- Merge support with merge rules depending on head and base branches (specific merge strategies)
- Automerge support when all steps are ok (awaiting-merge)
- React to issue comments: set/unset/skip QA status, ping bot, lock or unlock PR, merge PR, enable/disable automerge, post GIF
- Actions that can be triggered from external sources, with simple token-based authentication (JWT RS256), using registered external accounts (each account has a RSA key-pair)
- Give rights to external accounts on specific repositories
- Simple terminal UI interface to have an overview on pull requests