Gerrit backlink bot, extracted from the infra repo
Find a file
2024-08-06 23:54:15 -07:00
gerrit_linkbot initial commit 2024-08-06 23:54:15 -07:00
.gitignore initial commit 2024-08-06 23:54:15 -07:00
LICENSE initial commit 2024-08-06 23:54:15 -07:00
module.nix initial commit 2024-08-06 23:54:15 -07:00
package.nix initial commit 2024-08-06 23:54:15 -07:00
pyproject.toml initial commit 2024-08-06 23:54:15 -07:00
README.md initial commit 2024-08-06 23:54:15 -07:00
setup.py initial commit 2024-08-06 23:54:15 -07:00

Gerrit link bot

This is a bot that polls Gerrit for changes, finds issue references in them, then goes and posts comments linking back to the CLs.

Configuration

Set FORGEJO_API_KEY in the environment. Currently the endpoints for everything are hardcoded to the lix.systems ones.

Testing locally

If you want to test locally, go impersonate lix-bot on https://identity.lix.systems/admin, relogin to Forgejo, then issue yourself a new personal access token for lix-bot with user:read and issue:write. Set that in FORGEJO_API_KEY in the environment.

If you just want to test that it does mostly the right thing, consider either writing an integration test using the fake APIs, or passing --fake on startup, which will make it operate on fake data and not hit the internet at all.