Expose licensing/update stream settings via API #349
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
EnableLicensingandRequireUpdateKeyare set via the repo settings web form (services/forms/repo_form.go)/org/{name}/settings/update-streamsPATCH /api/v1/repos/{owner}/{repo}or any other API endpointProposed changes
Repo-level
has_licensesandrequire_update_keyto theEditRepoOptionstructGET /api/v1/repos/{owner}/{repo}responsePATCH /api/v1/repos/{owner}/{repo}Org-level
GET /api/v1/orgs/{org}/settings/update-streamsPATCH /api/v1/orgs/{org}/settings/update-streamsUse case
Automating repo setup for new extensions - currently must visit the web UI to toggle licensing on after creating a repo via API.
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.