gerrit-linkbot/README.md
2024-08-06 23:54:15 -07:00

798 B

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.