-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 methods to add and remove repos for actions on org level #1997
Conversation
This commit adds the abillity to add one or more repositories to the list of enabled repositories for github actions on org level. It also adds the abillity to remove them from this list. With this change we can now enable and disable repos to use github actions on org level. The used endpoints for this are: https://docs.github.com/en/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization https://docs.github.com/en/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Codecov Report
@@ Coverage Diff @@
## master #1997 +/- ##
=======================================
Coverage 97.86% 97.86%
=======================================
Files 107 107
Lines 6871 6897 +26
=======================================
+ Hits 6724 6750 +26
Misses 81 81
Partials 66 66
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @FloThinksPi , but this PR appears to have a few problems.
Did you try out these two new methods before submitting the PR?
I ask because one of the signatures doesn't match the official documentation and I'm not sure how it could have worked.
Woh thanks @gmlewis for the super quick review. |
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
…n org level Co-authored-by: Glenn Lewis <[email protected]>
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
Hi @FloThinksPi - it looks like the tests need updating:
|
@googlebot I consent. |
Switch from Add to Set in method name since the behaviour is to set the list of enabled repos absolutely. As a replacement added the real AddEnabledReposInOrg by implementing: https://docs.github.com/en/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization which adds just a single entry to the list.
@gmlewis Yea all done now 👍🏼 . I also renamed the AddEnableReposInOrg method to SetEnabledReposInOrg since the used endpoint sets the list absolute. I thus added the https://docs.github.com/en/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization endpoint which is now AddEnableReposInOrg which appends to the list of enabled repos. All tests return ok and i tested all three methods against a GitHubEnterprise 3.0 Instance. Are you fine with the method names ? |
You don't need to squash, as we only "Squash and merge" in this repo anyway. I'll check the names now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @FloThinksPi !
LGTM.
Awaiting second LGTM before merging.
Thank you, @wesleimp ! |
This commit adds the abillity to add one or more repositories to the
list of enabled repositories for github actions on org level.
It also adds the abillity to remove them from this list.
With this change we can now enable and disable repos to use github actions on org level.
The used endpoints for this are:
https://docs.github.com/en/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization
https://docs.github.com/en/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization
fixes #1995