Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

feat: Repository specific runners - #98

Open
jribble wants to merge 5 commits into
liatrio:mainfrom
jribble:feature-repository
Open

feat: Repository specific runners#98
jribble wants to merge 5 commits into
liatrio:mainfrom
jribble:feature-repository

Conversation

@jribble

@jribble jribble commented Aug 17, 2023

Copy link
Copy Markdown
Contributor

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.

@jribble
jribble requested a review from a team as a code owner August 17, 2023 21:23
@jburns24
jburns24 requested a review from Copilot July 1, 2025 20:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_repository variable in root and module variable definitions
  • Computed registration_url in 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 new github_repository entry 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 description attribute to the github_repository variable 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 createRegistrationToken and listGitHubRunners to verify correct API endpoint selection.
    if (repo) {

Comment thread app/runner-controller/github.js
@jburns24

Copy link
Copy Markdown
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants