-
Notifications
You must be signed in to change notification settings - Fork 766
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
resource/github_branch_protection: Add support for require_code_owners_review #51
resource/github_branch_protection: Add support for require_code_owners_review #51
Conversation
This PR adds support for Updating the github.com/google/go-github vendored library was required for this support. Other changes:
|
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.
Hi @denniswebb
do you mind submitting all /vendor
changes in a separate PR to make review of this one easier by lowering LOC in the diff?
Thanks.
@radeksimko done. I can rebase this onto master after #60 is merged to allow travis to pass. |
@radeksimko Rebased and passing now. |
@radeksimko Sorry to ping you on this, just hoping to start using it soon. |
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.
Hi @denniswebb
thanks for the PR and sorry for the delay in reviewing it.
I just left you one comment there which needs addressing before we can merge it. Otherwise it's good.
|
||
if protectionRequest.RequiredPullRequestReviews == nil { | ||
_, err = client.Repositories.RemovePullRequestReviewEnforcement(context.TODO(), meta.(*Organization).name, r, b) | ||
} |
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, this will fix the failing TestAccGithubBranchProtection_basic
👍
I just think we're missing an error check here 👓
hey @denniswebb , thanks for putting this together! Any chance we could push this along? I'd really like to use this functionality for an upcoming presentation |
@denniswebb Do you have time to do this, or should someone else make the last change? |
@radeksimko Fixed, rebased, and pushed. Sorry I overlooked the email. You should've had Brent yell at me. |
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.
LGTM, thanks
This resolves terraform-providers/terraform-provider-github#50
Blocked until google/go-github#744 is merged adding support for require_code_owners_reviewRequires #60 to be merged. I can rebase afterwards.