Links as code: managing short links from a Git repository
Keep link definitions in YAML, review changes in pull requests, and sync on merge.
By ShortFreeURL Team · 11 July 2026
Why put links in a repo
Documentation links, install scripts and release URLs are infrastructure. Keeping them in version control gives you review, history, rollback and a single source of truth — the same properties you already expect from configuration.
The file
A YAML file mapping slugs to destinations, with optional title, tags and folder. Human-readable, diffable, and obvious in a pull request when someone changes where /install points.
The workflow
A GitHub Action runs on merge to main, reads the file, and calls the bulk API to create or update links. Store the API key as a repository secret. Run in dry-run mode on pull requests so reviewers see exactly what would change.
Handle deletions explicitly
Removing a line should not silently delete a live link. Require an explicit archived or deleted flag so a link is retired deliberately, and keep the redirect working until someone confirms it should stop.
Scope the key
Use an API key scoped to the one domain the repository manages. If the key leaks, the blast radius is that domain and nothing else.
What this is good for
Vanity links in docs, install one-liners, conference URLs, release links. Anything a developer would rather edit in a file than in a dashboard — which is most links developers own.

