docs: update README with AGENT_HOURLY env var and ratelimit feature
All checks were successful
Lint and Syntax Check / build (pull_request) Successful in 5s

This commit is contained in:
2026-04-04 14:58:43 +02:00
parent 2baa5e730e
commit 0e9be98c5a

View File

@@ -8,6 +8,7 @@ This project is a serverless function (designed for SHSF) that handles Gitea web
- **State Persistence**: Uses a database to track assignees across events, ensuring "unassigned" events have the necessary context even when the payload is sparse.
- **AI Integration**: Sends formatted Markdown notifications to an OpenClaw-compatible API.
- **Assignment & Mention Logic**: Specifically identifies when the configured `AGENT_USERNAME` is involved in an assignment change or mentioned in a comment (e.g., `@youragent`).
- **Hourly Ratelimits**: Prevents notification spam by limiting the number of alerts sent to OpenClaw per hour (configurable via `AGENT_HOURLY`).
- **Comment Notifications**: Notifies the agent about new comments on issues or PRs they are assigned to, or when they are tagged.
## Environment Variables
@@ -21,7 +22,8 @@ The following environment variables are required for the service to function:
| `OPENCLAW_PROXY_AUTH` | (Optional) Proxy credentials in `username:password` format. |
| `DATABASE_STORAGE_NAME` | The name of the database storage to use. |
| `AGENT_USERNAME` | The Gitea username of the AI agent (e.g., `whateveryouragentisnamed`). |
| `AGENT_PROMPT_FILE` | (Optional) Path to a custom Markdown template for notifications. If not provided, a default template will be used. |
| `AGENT_HOURLY` | (Optional) The maximum number of notifications per hour (default: 60). |
| `AGENT_PROMPT_FILE` | (Optional) Path to a custom Markdown template for notifications. |
## How it works