[feat]. Add username and custom bot mention tags
All checks were successful
ci / test (pull_request) Successful in 57s
ci / publish (pull_request) Has been skipped

This commit is contained in:
Space-Banane
2026-05-23 12:48:00 +02:00
parent 328c7f2290
commit 0de069fd32
9 changed files with 88 additions and 8 deletions

View File

@@ -6,7 +6,7 @@ Webhook-driven PR review bot for Gitea.
- Handles `issue_comment` and `pull_request_comment` events.
- Verifies `X-Gitea-Signature` HMAC (`sha256`).
- Triggers on `@codex review`, `@codex rerun`, `@codex explain`, `@codex fix`, `@codex ignore`.
- Triggers on `@codex ...`, `@<GITEA_BOT_USERNAME> ...`, plus optional custom aliases from `GITEA_BOT_MENTIONS`.
- Ignores bot-authored comments.
- Enforces strict repository allowlist (`ALLOWED_REPOS`).
- Deduplicates webhook deliveries/comments in DB.
@@ -54,6 +54,7 @@ Optional:
- `OPENAI_API_KEY` (required when `CODEX_AUTH_MODE=api_key`, optional when `CODEX_AUTH_MODE=chatgpt`)
- `OPENAI_PROJECT_ID`
- `OPENAI_ORG_ID`
- `GITEA_BOT_MENTIONS` (comma-separated extra mention aliases, e.g. `@review-buddy,helper-bot`)
- `CODEX_AUTH_MODE` (`api_key` default, or `chatgpt`)
- `CODEX_AUTH_JSON_PATH` (custom host path to `auth.json`; defaults to `~/.codex/auth.json` in `chatgpt` mode)
- `DATABASE_URL` (overrides composed DB URL)
@@ -95,4 +96,4 @@ This project was made WITH codex and is meant to be used WITH codex as a review
If you are as rich as Peter Steinberg and get a free OpenAI API Key, feel free to use it for this bot.
## Contributing
Contributions are welcome! Please open issues or submit pull requests for bug fixes, improvements, or new features.
Contributions are welcome! Please open issues or submit pull requests for bug fixes, improvements, or new features.