feat: Repository specific runners - #98
Conversation
… runners will be created and managed on the repository rather than on the organization.
Make linter happy too.,
There was a problem hiding this comment.
Pull Request Overview
This PR introduces an optional github_repository variable to allow runners to be created at the repository level instead of the organization level, updates Terraform modules and the runner registration script to use a conditional registration URL, and enhances the GitHub controller logic to call the correct API endpoints based on that variable.
- Added
github_repositoryvariable in root and module variable definitions - Computed
registration_urlin custom-data and updated the user-data script to use it - Refactored GitHub controller to request tokens and list runners on either repos or orgs, and updated documentation
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| variables.tf | Added optional github_repository variable |
| modules/custom-data/variables.tf | Declared module-level github_repository |
| modules/custom-data/main.tf | Computed registration_url based on github_repository |
| modules/custom-data/custom-data.sh.tpl | Switched from runner_owner to registration_url |
| modules/app-config/variables.tf | Declared module-level github_repository |
| modules/app-config/main.tf | Passed github_repository into app-config locals and custom_data module |
| main.tf | Passed github_repository to app_config module |
| app/runner-controller/github.js | Added branch logic for repo vs org API endpoints in token creation & runner listing |
| README.md | Documented the new github_repository variable |
Comments suppressed due to low confidence (3)
README.md:168
- Add a default value (e.g.,
"") to the newgithub_repositoryentry in the README table so it matches the other variable definitions.
| <a name="github_repository"></a> [github\_repository](#github\_repository) | GitHub repository for repository specific runners. If blank runners will be created for the organization. | `string` |
variables.tf:71
- [nitpick] Consider adding a
descriptionattribute to thegithub_repositoryvariable to clarify its purpose, following the pattern of other variables.
variable "github_repository" {
app/runner-controller/github.js:45
- Add unit tests covering both repository-specific and organization-specific branches in
createRegistrationTokenandlistGitHubRunnersto verify correct API endpoint selection.
if (repo) {
|
Thank you for the contribution @jribble sorry we left this in limbo for so long. Unfortunately we have decided to archive this repository for the time being. We have shifted attention to other projects and this project is not getting the love and attention it deserves. |
This feature adds an optional github_repository variable. When this variable is specified runners will be created on the repository. When it's not specified runners will be created on the organization.
It might be a good idea to add to the documentation that the Github App should be scoped to the repository if the runners are repository specific.