Expose licensing/update stream settings via API #349

Closed
opened 2026-05-31 15:50:30 +00:00 by jmiller · 1 comment
Owner

Summary

The licensing and update stream settings (enable licensing, require update key, platform) are currently only configurable through the web UI repo settings form. These should be exposed via the API so they can be managed programmatically.

Current state

  • EnableLicensing and RequireUpdateKey are set via the repo settings web form (services/forms/repo_form.go)
  • Org-level update stream config is set via /org/{name}/settings/update-streams
  • Neither is accessible via PATCH /api/v1/repos/{owner}/{repo} or any other API endpoint

Proposed changes

Repo-level

  • Add has_licenses and require_update_key to the EditRepoOption struct
  • Include them in GET /api/v1/repos/{owner}/{repo} response
  • Accept them in PATCH /api/v1/repos/{owner}/{repo}

Org-level

  • Add API endpoints for org update stream config:
    • GET /api/v1/orgs/{org}/settings/update-streams
    • PATCH /api/v1/orgs/{org}/settings/update-streams

Use case

Automating repo setup for new extensions - currently must visit the web UI to toggle licensing on after creating a repo via API.

## Summary The licensing and update stream settings (enable licensing, require update key, platform) are currently only configurable through the web UI repo settings form. These should be exposed via the API so they can be managed programmatically. ## Current state - `EnableLicensing` and `RequireUpdateKey` are set via the repo settings web form (`services/forms/repo_form.go`) - Org-level update stream config is set via `/org/{name}/settings/update-streams` - Neither is accessible via `PATCH /api/v1/repos/{owner}/{repo}` or any other API endpoint ## Proposed changes ### Repo-level - Add `has_licenses` and `require_update_key` to the `EditRepoOption` struct - Include them in `GET /api/v1/repos/{owner}/{repo}` response - Accept them in `PATCH /api/v1/repos/{owner}/{repo}` ### Org-level - Add API endpoints for org update stream config: - `GET /api/v1/orgs/{org}/settings/update-streams` - `PATCH /api/v1/orgs/{org}/settings/update-streams` ## Use case Automating repo setup for new extensions - currently must visit the web UI to toggle licensing on after creating a repo via API.
jmiller reopened this issue 2026-06-02 11:21:40 +00:00
jmiller added the pending: testing label 2026-06-02 13:58:24 +00:00
Author
Owner

Tested and verified in production on MokoWaaS. All three download gating modes (none/prerelease/all), feed visibility, XML metadata, download URLs, and access control confirmed working.

Tested and verified in production on MokoWaaS. All three download gating modes (none/prerelease/all), feed visibility, XML metadata, download URLs, and access control confirmed working.
Sign in to join this conversation.
No labels pending: testing
Status
Type
Status
Priority
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoGitea#349