Skip to content

Commit

Permalink
Prepare for 0.25.0 (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
Srynetix authored Apr 3, 2024
1 parent 3b16952 commit c1195c8
Show file tree
Hide file tree
Showing 403 changed files with 11,323 additions and 7,875 deletions.
36 changes: 21 additions & 15 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,44 +1,50 @@
# Database URL
DATABASE_URL=postgresql://user:pass@host:port/db
# Rust logging configuration
RUST_LOG=info,github_scbot=debug
RUST_LOG=info,prbot=debug

# Bot username
BOT_USERNAME=bot
BOT_NAME=bot
# Database driver
BOT_DATABASE_DRIVER=pg
# Database URL
BOT_DATABASE_PG_URL=postgresql://user:pass@host:port/db
# Database pool size
BOT_DATABASE_POOL_SIZE=8
BOT_DATABASE_PG_POOL_SIZE=8
# Database connection timeout
BOT_DATABASE_CONNECTION_TIMEOUT=5
BOT_DATABASE_PG_CONNECTION_TIMEOUT=5
# Default merge strategy
BOT_DEFAULT_MERGE_STRATEGY=merge
# Default needed reviewers count
BOT_DEFAULT_NEEDED_REVIEWERS_COUNT=2
# Default PR title validation regex
BOT_DEFAULT_PR_TITLE_VALIDATION_REGEX=
# GitHub API driver
BOT_API_DRIVER=github
# GitHub API connect timeout
BOT_GITHUB_API_CONNECT_TIMEOUT=
BOT_API_GITHUB_CONNECT_TIMEOUT=
# GitHub API root URL
BOT_GITHUB_API_ROOT_URL=
BOT_API_GITHUB_ROOT_URL=
# GitHub API Token
BOT_GITHUB_API_TOKEN=
BOT_API_GITHUB_TOKEN=
# GitHub App ID
BOT_GITHUB_APP_ID=
BOT_API_GITHUB_APP_ID=
# GitHub App Installation ID
BOT_GITHUB_APP_INSTALLATION_ID=
BOT_API_GITHUB_APP_INSTALLATION_ID=
# GitHub App Private Key
BOT_GITHUB_APP_PRIVATE_KEY=
# GitHub secret used to sign webhook events
BOT_GITHUB_WEBHOOK_SECRET=
BOT_API_GITHUB_APP_PRIVATE_KEY=
# Use bunyan logging
BOT_LOGGING_USE_BUNYAN=
# Lock driver
BOT_LOCK_DRIVER=redis
# Redis address
BOT_REDIS_ADDRESS=
BOT_LOCK_REDIS_ADDRESS=
# Sentry URL
BOT_SENTRY_URL=
# Traces sample rate (between 0 and 1) for Sentry
BOT_SENTRY_TRACES_SAMPLE_RATE=
# Server workers count (if none, same as logical CPU cores)
BOT_SERVER_WORKERS_COUNT=
# GitHub secret used to sign webhook events
BOT_SERVER_WEBHOOK_SECRET=
# Server bind IP
BOT_SERVER_BIND_IP=127.0.0.1
# Server bind Port
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

services:
postgres:
image: postgres
image: postgres:16
env:
POSTGRES_USER: user
POSTGRES_PASSWORD: pass
Expand All @@ -23,7 +23,7 @@ jobs:
- 5432:5432

redis:
image: redis
image: redis:7
ports:
- 6379:6379

Expand All @@ -41,7 +41,8 @@ jobs:
- run: just build
- run: just test-cov
env:
DATABASE_URL: postgres://user:pass@localhost:5432/test-bot
BOT_DATABASE_PG_URL: postgres://user:pass@localhost:5432/test-bot
BOT_LOCK_REDIS_ADDRESS: redis://localhost:6379
- uses: coverallsapp/github-action@master
with:
path-to-lcov: lcov.info
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Build image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: github-scbot
ECR_REPOSITORY: prbot
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
Expand Down
38 changes: 36 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.25.0]

### Breaking changes

- 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

### Added

- 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)

### Changed

- 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

### Added

- Add conditional mocking on traits
- Add more tests on the `github-scbot-domain` crate
- Add more tests on the `github-scbot-core` crate
- Add "admin-add-merge-rule" bot command (fixes #175)

### Changed
Expand Down Expand Up @@ -320,7 +353,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Give rights to external accounts on specific repositories
- Simple terminal UI interface to have an overview on pull requests

[Unreleased]: https://github.com/sharingcloud/github-scbot/compare/v0.24.0...HEAD
[Unreleased]: https://github.com/sharingcloud/github-scbot/compare/v0.25.0...HEAD
[0.25.0]: https://github.com/sharingcloud/github-scbot/compare/v0.24.0...v0.25.0
[0.24.0]: https://github.com/sharingcloud/github-scbot/compare/v0.23.1...v0.24.0
[0.23.1]: https://github.com/sharingcloud/github-scbot/compare/v0.23.0...v0.23.1
[0.23.0]: https://github.com/sharingcloud/github-scbot/compare/v0.22.0...v0.23.0
Expand Down
Loading

0 comments on commit c1195c8

Please sign in to comment.