feat: auto-enable Actions on repos with repo-scoped RunnerPools #17

Merged
rcsheets merged 1 commit from feat/auto-enable-actions into master 2026-03-27 05:31:20 +00:00
Owner

Before requesting a registration token for a repo-scoped RunnerPool,
the controller now calls PATCH /api/v1/repos/{owner}/{repo} with
has_actions=true. This is idempotent and ensures the registration
token API (which returns 405 when Actions is disabled) works without
manual repo setup.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

Before requesting a registration token for a repo-scoped RunnerPool, the controller now calls PATCH /api/v1/repos/{owner}/{repo} with has_actions=true. This is idempotent and ensures the registration token API (which returns 405 when Actions is disabled) works without manual repo setup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat: auto-enable Actions on repos with repo-scoped RunnerPools
Some checks failed
CI / ci (push) Has been cancelled
CI / ci (pull_request) Has been cancelled
E2E smoke test / e2e (pull_request) Has been cancelled
669e3f768c
Before requesting a registration token for a repo-scoped RunnerPool,
the controller now calls PATCH /api/v1/repos/{owner}/{repo} with
has_actions=true. This is idempotent and ensures the registration
token API (which returns 405 when Actions is disabled) works without
manual repo setup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator

Automated review by pr-reviewer v0.15.0 | Safety Check | anthropic | tracking id r-c615c5-116acb
This is an AI-generated review and may contain mistakes.

Status: Completed


Verdict: LGTM — The change adds a reasonable feature to auto-enable Actions on repositories before requesting registration tokens, with proper error handling and validation.
Complexity: moderate

Safety Check Review

The change adds functionality to automatically enable Actions on repositories when creating repo-scoped RunnerPools. This prevents the registration token API from failing with a 405 error when Actions is disabled.

Key observations:

  • Input validation is present for the repository name format (owner/repo)
  • Proper error handling with context propagation and status updates
  • Idempotent operation that's safe to retry
  • HTTP request construction follows existing patterns in the codebase
  • Response body is limited to 1024 bytes to prevent memory issues

No security or correctness issues found. The implementation follows good practices with proper error handling and input validation.

*Automated review by [pr-reviewer](https://git.brooktrails.org/brooktrails/pr-reviewer) v0.15.0 | Safety Check | anthropic | tracking id `r-c615c5-116acb`* *This is an AI-generated review and may contain mistakes.* **Status:** ✅ Completed --- **✅ Verdict: LGTM** — The change adds a reasonable feature to auto-enable Actions on repositories before requesting registration tokens, with proper error handling and validation. **Complexity:** moderate ## Safety Check Review The change adds functionality to automatically enable Actions on repositories when creating repo-scoped RunnerPools. This prevents the registration token API from failing with a 405 error when Actions is disabled. **Key observations:** - Input validation is present for the repository name format (owner/repo) - Proper error handling with context propagation and status updates - Idempotent operation that's safe to retry - HTTP request construction follows existing patterns in the codebase - Response body is limited to 1024 bytes to prevent memory issues **No security or correctness issues found.** The implementation follows good practices with proper error handling and input validation.
rcsheets merged commit 4a14c3c1ac into master 2026-03-27 05:31:20 +00:00
rcsheets deleted branch feat/auto-enable-actions 2026-03-27 05:31:20 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
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
brooktrails/forgejo-runner-operator!17
No description provided.