Create atom feed from releases/tags of starred repos on GitHub/GitLab/Codeberg/Sourcehut
src | ||
.gitignore | ||
.mise.toml | ||
.pre-commit-config.yaml | ||
build.zig | ||
build.zig.zon | ||
config.example.json | ||
config_schema.json | ||
LICENSE | ||
nonexistent.json | ||
README.md |
Release Tracker
A Zig application that monitors releases from starred repositories across GitHub, GitLab, Codeberg, and SourceHut, generating an RSS feed for easy consumption. Note that this application was primarily AI generated
Features
- Monitor releases from multiple Git hosting platforms
- Generate RSS feed of new releases
- Configurable authentication for each platform
- Designed to run periodically as a CLI tool
- Static file output suitable for deployment on Cloudflare Pages
Building
Requires Zig 0.14.1:
zig build
Usage
- Copy
config.example.json
toconfig.json
and fill in your API tokens - Run the application:
./zig-out/bin/release-tracker config.json
- The RSS feed will be generated as
releases.xml
Configuration
Create a config.json
file with your API tokens:
{
"github_token": "your_github_token",
"gitlab_token": "your_gitlab_token",
"codeberg_token": "your_codeberg_token",
"sourcehut": {
"repositories": [
"~sircmpwn/aerc",
"~emersion/gamja"
]
},
"last_check": null
}
API Token Setup
- GitHub: Create a Personal Access Token with
public_repo
anduser
scopes - GitLab: Create a Personal Access Token with
read_api
scope - Codeberg: Create an Access Token in your account settings
- SourceHut: No token required for public repositories. Specify repositories to track in the configuration.
Testing
Run the test suite:
zig build test
Run integration tests:
zig build test -Dintegration=true
Enable debug output in tests (useful for debugging test failures):
zig build test -Dintegration=true -Dtest-debug=true
Test individual providers:
zig build test-github
zig build test-gitlab
zig build test-codeberg
zig build test-sourcehut
Deployment
This tool is designed to be run periodically (e.g., via cron) and commit the generated RSS file to a Git repository that can be deployed via Cloudflare Pages or similar static hosting services.
Example cron job (runs every hour):
0 * * * * cd /path/to/release-tracker && ./zig-out/bin/release-tracker config.json && git add releases.xml && git commit -m "Update releases" && git push