Updater is a lightweight Go-based notification tool that monitors updates from multiple platforms and sends alerts to Discord via webhooks. It uses a local cache to ensure each update is only notified once.
- Wiki.js Support: Tracks the most recent activity on your Wiki.js instance.
- Redmine Support: Monitors recent issues and updates from Redmine.
- Gitea Support: Tracks recent activities (commits, issues, PRs) in specified repositories.
- Discord Integration: Sends notifications to different Discord channels (webhooks) based on the source of the update.
- Caching: Remembers the last notified update for each service to prevent duplicate notifications.
- Configurable: Fully controlled via environment variables.
- Fetch: The program periodically polls the configured APIs (Wiki.js, Redmine, Gitea) for the latest activity.
- Compare: It compares the latest activity ID or timestamp against a local
cache.json file.
- Notify: If new activity is detected, it formats a message and sends it to the designated Discord webhook.
- Update Cache: The
cache.json is updated with the latest activity to avoid re-sending the same notification in the next run.
The program is configured using environment variables. You can create a .env file based on the provided env-example.
| Variable |
Description |
Default |
INTERVAL_MINUTES |
Frequency of update checks (in minutes). |
5 |
DISCORD_WEBHOOK |
Default Discord webhook URL if a service-specific one isn't provided. |
- |
DISCORD_FAKE |
If set to true, messages are logged to console instead of being sent to Discord. |
false |
| Variable |
Description |
WIKI_BASE_URL |
Base URL of your Wiki.js instance (e.g., https://wiki.example.com). |
WIKI_TOKEN |
API Token for Wiki.js. |
WIKI_DISCORD_WEBHOOK |
Discord webhook URL for Wiki.js notifications. |
WIKI_CONTENT_LIMIT |
Number of recent items to check. |
| Variable |
Description |
REDMINE_BASE_URL |
Base URL of your Redmine instance. |
REDMINE_KEY |
API Key for Redmine. |
REDMINE_DISCORD_WEBHOOK |
Discord webhook URL for Redmine notifications. |
REDMINE_CONTENT_LIMIT |
Number of recent items to check. |
| Variable |
Description |
GITEA_BASE_URL |
Base URL of your Gitea instance. |
GITEA_TOKEN |
API Token for Gitea. |
GITEA_REPOS |
Comma-separated list of repositories to watch (e.g., org/repo1,user/repo2). |
GITEA_DISCORD_WEBHOOK |
Discord webhook URL for Gitea notifications. |
GITEA_CONTENT_LIMIT |
Number of recent items to check. |
- Clone the repository.
- Create and configure your
.env file.
- Run the application:
go run main.go
You can use the provided Dockerfile and docker-compose.yml to run the updater in a containerized environment.
- Configure your
.env file.
- Build and start:
docker-compose up -d
main.go: Application entry point.
lib/: Core logic including fetchers, senders, and cache management.
cache.json: Local storage for the last processed update (automatically created).
env-example: Template for configuration.
https://git.teletype.hu/tools/updater