-
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 checks field to RequiredStatusChecks #2276
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2276 +/- ##
=======================================
Coverage 97.81% 97.81%
=======================================
Files 114 114
Lines 10266 10266
=======================================
Hits 10042 10042
Misses 156 156
Partials 68 68
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.
Thank you, @k24dizzle !
Just a couple tweaks, please.
It looks like the linter has a couple issues as well. |
in RequiredStatusChecksRequest
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, @k24dizzle !
LGTM.
Merging.
Attempt to solve #2274.
From my own experimentation, I discovered that there's two ways that this
Checks
field can be used to update the required status checks for a protected branch:ProtectionRequest
->RequiredStatusChecks
->RequiredStatusCheck
struct, in this API call we must provide either one ofChecks
orContexts
(the other must benil
) inRequiredStatusChecks
to successfully update a branch protection. If you provide both or neither, you will get anInvalid Request
error.RequiredStatusChecksRequest
->RequiredStatusCheck
struct, in this API callChecks
andContexts
are both optional fields, if you provide both of them onlyChecks
will be used to update the status checks.