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

Added support for allowing apps to push to protected branches #1283

Merged
merged 6 commits into from
Dec 5, 2019

Conversation

shibasisp
Copy link
Contributor

fixes #1275

@googlebot googlebot added the cla: yes Indication that the PR author has signed a Google Contributor License Agreement. label Sep 13, 2019
@codecov
Copy link

codecov bot commented Sep 13, 2019

Codecov Report

Merging #1283 into master will decrease coverage by 0.07%.
The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1283      +/-   ##
==========================================
- Coverage    73.4%   73.33%   -0.08%     
==========================================
  Files          86       86              
  Lines        6043     6087      +44     
==========================================
+ Hits         4436     4464      +28     
- Misses        837      845       +8     
- Partials      770      778       +8
Impacted Files Coverage Δ
github/apps.go 67.81% <ø> (ø) ⬆️
github/repos.go 73.93% <60%> (-1.24%) ⬇️
github/github.go 89.44% <0%> (+0.12%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e389f86...d20eb59. Read the comment docs.

@shibasisp
Copy link
Contributor Author

@gmlewis Can you please review it?

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @shibasisp! This is looking good.

Please address the comments. Additionally, for this to fully resolve #1275, one of the existing PUT endpoints needs to have a new restrictions field to be added to the request. If you could address that as well, that would be great.

Thanks again!

github/repos.go Outdated Show resolved Hide resolved
github/repos.go Outdated Show resolved Hide resolved
github/repos.go Outdated Show resolved Hide resolved
github/repos.go Outdated Show resolved Hide resolved
github/repos.go Outdated Show resolved Hide resolved
@shibasisp
Copy link
Contributor Author

@gmlewis thanks for the review. I have modified the codes accordingly.

Additionally, for this to fully resolve #1275, one of the existing PUT endpoints needs to have a new restrictions field to be added to the request. If you could address that as well, that would be great.

I think, I have already modified the already existing PUT endpoint(UpdateBranchProtection) by adding this line and this line. Isn't it?

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Ah, you are exactly right. Thank you, @shibasisp!

LGTM.
Awaiting second LGTM before merging.

@gmlewis gmlewis requested a review from gauntface September 21, 2019 14:26
@shibasisp
Copy link
Contributor Author

@gauntface can you please review it?

Copy link
Collaborator

@wesleimp wesleimp left a comment

Choose a reason for hiding this comment

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

👌

@gmlewis
Copy link
Collaborator

gmlewis commented Dec 5, 2019

Thank you, @wesleimp !
Merging.

@gmlewis gmlewis merged commit bdfbfc6 into google:master Dec 5, 2019
haya14busa added a commit to haya14busa/go-github that referenced this pull request Jan 9, 2020
I got following error.
json: cannot unmarshal string into Go struct field App.app.events of
type github.Event

It's regression from google#1283 and event type should be actually string [1][2].

[1]: https://developer.github.com/v3/apps/#get-a-single-github-app
[2]: https://developer.github.com/v3/repos/branches/#list-apps-with-access-to-protected-branch
n1lesh pushed a commit to n1lesh/go-github that referenced this pull request Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indication that the PR author has signed a Google Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for allowing apps to push to protected branches
4 participants