Gerrit backlink bot, extracted from the infra repo
| gerrit_linkbot | ||
| .gitignore | ||
| LICENSE | ||
| module.nix | ||
| package.nix | ||
| pyproject.toml | ||
| README.md | ||
| setup.py | ||
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.