feat(repo): add repo features verb for feature toggles #3

Merged
w33ble merged 1 commit from feature/repo-features into main 2026-09-01 10:46:37 -06:00
Collaborator

Adds forgejo repo features <owner/repo> to view and toggle repo-level feature flags via PATCH /repos/{owner}/{repo} (EditRepoOption).

  • Bare invocation: prints current state of all 7 toggles (issues, pulls, projects, actions, wiki, releases, packages)
  • Mutations: --has-issues=false style flags — flag name maps 1:1 to the API field, kebab-cased
  • Strict true/false validation (--flag=value style rule); clean error on bad values
  • PATCH sends only passed fields (API ignores omitted/null fields), so unset features stay untouched
  • Respects global --json
  • Out of scope (different shapes): internal_tracker, external_wiki/tracker, archived

Checks:

  • shellcheck clean
  • live acceptance on a throwaway repo: state view, PATCH + persistence, invalid-value error, --json mode all verified; repo torn down
  • fixed during acceptance: jq's // operator treats false like null — disabled features displayed "unset"; replaced with explicit null check
Adds `forgejo repo features <owner/repo>` to view and toggle repo-level feature flags via PATCH /repos/{owner}/{repo} (EditRepoOption). - Bare invocation: prints current state of all 7 toggles (issues, pulls, projects, actions, wiki, releases, packages) - Mutations: `--has-issues=false` style flags — flag name maps 1:1 to the API field, kebab-cased - Strict true/false validation (`--flag=value` style rule); clean error on bad values - PATCH sends only passed fields (API ignores omitted/null fields), so unset features stay untouched - Respects global `--json` - Out of scope (different shapes): internal_tracker, external_wiki/tracker, archived Checks: - shellcheck clean - live acceptance on a throwaway repo: state view, PATCH + persistence, invalid-value error, --json mode all verified; repo torn down - fixed during acceptance: jq's `//` operator treats false like null — disabled features displayed "unset"; replaced with explicit null check
w33ble approved these changes 2026-09-01 10:46:32 -06:00
w33ble merged commit 715cf40a5d into main 2026-09-01 10:46:37 -06:00
w33ble deleted branch feature/repo-features 2026-09-01 10:46:37 -06:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
w33ble/forgejo-cli!3
No description provided.