From 0e9be98c5a020429a029f444c55bdd2db2b08c3d Mon Sep 17 00:00:00 2001 From: Luna Date: Sat, 4 Apr 2026 14:58:43 +0200 Subject: [PATCH] docs: update README with AGENT_HOURLY env var and ratelimit feature --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a52ff6e..b315a25 100644 --- a/README.md +++ b/README.md @@ -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