Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to register runners under repository for individual accounts #46

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

mattia
Copy link
Contributor

@mattia mattia commented Aug 23, 2023

This PR adds the ability to register runners for a repository of an individual account.
To be able to distinguish between runners for an organization and for repository of an individual account a new GitHubRunnerScope is added.

The "GitHub" tab in the settings is updated so both scope types can be configured, but only one scope can be active at the time (the style of the form page is a little bit changed, to try grouping together informations)

Tartlet GitHub settings tab with 'Organization' scope selected Tartlet GitHub settings tab with 'Repo' scope selected

This changes are backward compatible as the default runner scope is organization; unfortunately I'm not able to test this changes on a real organization so a real test should be performed.

Fixes #5

@mattia mattia requested a review from simonbs as a code owner August 23, 2023 21:08
@mattia mattia force-pushed the feature/register-runner-for-repository branch from a2bbb6e to d173953 Compare August 23, 2023 21:10
@mattia
Copy link
Contributor Author

mattia commented Aug 23, 2023

(If this PR gets merged, maybe the "Configuring Tartelet" section of the wiki should be updated but I don't think it can be done via a PR)

@simonbs
Copy link
Contributor

simonbs commented Aug 30, 2023

@mattia Thanks for making these changes and opening a PR!

I'm in the process of reviewing the changes and just wanted to make a note for myself and anyone else seeing this that it seems the permissions needed in the GitHub App are:

  • Repository Permissions: Administration (Read and Write)
  • Repository Permissions: Metadata (Read-only)

@simonbs
Copy link
Contributor

simonbs commented Aug 30, 2023

I have verified that the changes work for repositories owned by an individual and that the existing functionality still works for organization accounts 🎉

Copy link
Contributor

@simonbs simonbs left a comment

Choose a reason for hiding this comment

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

Looks good! I'll make a PR shortly after this that streamlines the appearance of settings to match the grouped form style introduced in this PR. I didn't know about that style but we should totally adopt it 😃

@simonbs simonbs merged commit 27a3605 into shapehq:main Aug 30, 2023
1 check passed
@mattia mattia deleted the feature/register-runner-for-repository branch August 30, 2023 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Register runners under repositories to support individual accounts
2 participants