Create atom feed from releases/tags of starred repos on GitHub/GitLab/Codeberg/Sourcehut
Find a file
2025-07-19 13:19:22 -07:00
src clean up logging in GH provider 2025-07-19 13:19:22 -07:00
.gitignore fully generated code - all providers working, release.xml unusuable 2025-07-12 16:06:04 -07:00
.mise.toml fully generated code - all providers working, release.xml unusuable 2025-07-12 16:06:04 -07:00
.pre-commit-config.yaml better output through markdown->html (then proper escaping to atom feed) 2025-07-15 15:42:30 -07:00
build.zig add test-debug option for cleaner tests 2025-07-14 07:09:20 -07:00
build.zig.zon add zeit to project/integrate with atom.zig 2025-07-12 17:49:54 -07:00
config.example.json use existing data appropriately 2025-07-13 14:03:25 -07:00
config_schema.json fully generated code - all providers working, release.xml unusuable 2025-07-12 16:06:04 -07:00
LICENSE fully generated code - all providers working, release.xml unusuable 2025-07-12 16:06:04 -07:00
nonexistent.json fully generated code - all providers working, release.xml unusuable 2025-07-12 16:06:04 -07:00
README.md add commentary and (unused) check for token applicability 2025-07-17 11:50:21 -07:00

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

  1. Copy config.example.json to config.json and fill in your API tokens
  2. Run the application:
./zig-out/bin/release-tracker config.json [output filename]
  1. The RSS feed will be generated as releases.xml by default

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 and user:read scope. Classic is preferred (see note)
  • 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.

Note on GitHub PATs. Some GitHub orgs will place additional restrictions on PATs. If your token does not align with those policies, the GitHub stars API will silently discard repos from that org. The only way to tell something is off is by detecting the starred repositories count at https://github.com/?tab=stars is more than what is reported in the application output.

There is a checkForInaccessibleRepos function in the GitHub provider that can detect this, but is limited to the aws organization, which may or may not apply in all situations. For this reason, it is included in the code, but disabled. If needed, uncomment the call and choose a repo from your enterprise of choice.

These org policies do not seem to effect classic tokens, so the best approach with GitHub is to create and use a classic token instead of the new fine-grained tokens.

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