Skip to content

feat(api): expose repo tags and an owner-editable homepage for external readers #626

Open

Description

@beardthelion

Raised in #588. An outside indexer wants to read what a repo ships without signing up, and to tie a repo to a project only when both point at each other.

Today (checked on main):

  • GET /api/v1/repos/{owner}/{repo}/commits is readable anonymously on public repos, returns the latest 30 commits, and takes no limit or page.
  • No tags or releases endpoint exists.
  • Repo metadata has no homepage field, and there is no route to edit repo metadata after creation (description is set only at create).

Proposed:

  1. GET /api/v1/repos/{owner}/{repo}/tags: tag name and target sha from refs/tags, gated by authorize_repo_read, with a result cap and a deadline on the git child.
  2. A nullable homepage on repos (new migration), returned by GET /api/v1/repos/{owner}/{repo} and the GraphQL repo types. http/https only, length-capped, no embedded credentials.
  3. An owner-gated update route so existing repos can set it.
  4. Paging for GET /api/v1/repos/{owner}/{repo}/commits: a clamped limit and a before=<commit sha> cursor (validated hex, never passed to git as an option). The default stays at the latest 30, so existing callers see no change.

Out of scope: release notes or assets (a separate design question), and a per-commit signature or verified flag (push certificates are already readable at GET .../certs; a per-commit flag is a separate design).

Acceptance: anonymous 200 on a public repo; private, hidden and quarantined repos return the same opaque 404 with no body leak; invalid homepage schemes are rejected; limit below 1 or above the cap is clamped, and a malformed or unknown before returns a client error, not an empty 200; non-owner update is 403; the migration has an upgrade-path test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:featuresev:lowsubsystem:api

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions