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 Base, Ref, and SHA to EditChange struct #1619

Merged
merged 3 commits into from
Sep 17, 2020
Merged

Add Base, Ref, and SHA to EditChange struct #1619

merged 3 commits into from
Sep 17, 2020

Conversation

JacobValdemar
Copy link
Contributor

Add support for webhook which is triggered when you change the base branch in a pull request after opening it.

Fixes: #1617

@google-cla google-cla bot added the cla: yes Indication that the PR author has signed a Google Contributor License Agreement. label Aug 25, 2020
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, @JacobValdemar .

Please add a unit test that exercises the marshal/unmarshal of this struct.

github/event_types.go Outdated Show resolved Hide resolved
@gmlewis gmlewis changed the title Update EditChange struct Add Base, Ref, and SHA to EditChange struct Aug 27, 2020
@gmlewis gmlewis requested a review from wesleimp August 27, 2020 12:59
Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Aug 27, 2020

Codecov Report

Merging #1619 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1619   +/-   ##
=======================================
  Coverage   68.06%   68.06%           
=======================================
  Files          97       97           
  Lines        8855     8855           
=======================================
  Hits         6027     6027           
  Misses       1912     1912           
  Partials      916      916           
Impacted Files Coverage Δ
github/event_types.go 100.00% <ø> (ø)

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 d57a3a8...db89fcb. Read the comment docs.

@JacobValdemar
Copy link
Contributor Author

Good idea about the unit test @gmlewis. I can't locate where the other content in event_types.go are tested. Do you have any immediate position on where this test should be placed? 🙂

@gmlewis
Copy link
Collaborator

gmlewis commented Aug 28, 2020

I can't locate where the other content in event_types.go are tested. Do you have any immediate position on where this test should be placed?

Oh, wow! You are right... I thought we had that.

How about creating a new file, event_types_test.go with the appropriate header, and then take a look at #55 to see a large number of examples of PRs dedicated to just testing the marshaling and unmarshaling of the structs? That would be fantastic.

Thank you, @JacobValdemar !

@JacobValdemar
Copy link
Contributor Author

Hi again @gmlewis :) I've now added the unit tests you requested.

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, @JacobValdemar !
LGTM.

Awaiting second LGTM before merging.

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.

Thank you, @JacobValdemar
LGTM 👌🏼

@gmlewis
Copy link
Collaborator

gmlewis commented Sep 17, 2020

Thank you, @wesleimp !
Merging.

@gmlewis gmlewis merged commit 8da2410 into google:master Sep 17, 2020
n1lesh pushed a commit to n1lesh/go-github that referenced this pull request Oct 2, 2020
@jhlegarreta
Copy link

I'm wondering whether there is an estimated time of arrival of the feature in this PR to be shipped into a release. If I'm not wrong release v33.0.0 did not include it.

Some downstream repositories (cross-referencing srvaroa/labeler#13) would benefit from having it on a release. Thanks.

@gmlewis
Copy link
Collaborator

gmlewis commented Mar 25, 2021

Hi @jhlegarreta - as of #1280, all releases (major, minor, and patch) are now on-demand. (I should probably put this in the README.md... sorry.)

I won't be able to start the process quite yet, but I believe we could cut a new release later today (or early tomorrow) if I can get some assistance with code reviews.

@jhlegarreta
Copy link

@gmlewis thanks for the prompt answer. Wow, it's nice that you are able to cut releases on demand. I appreciate the effort.

@gmlewis
Copy link
Collaborator

gmlewis commented Mar 25, 2021

@jhlegarreta
Copy link

Much appreciated @gmlewis ! Thanks.

If I am allowed to post here a question tangentially related to this PR (let me know if I should ask it elsewhere), I'd like to know whether the package supports pull_request_target webhook events. This PR was cross-referenced from srvaroa/labeler#13 concerning that aspect, but having read the current code (e.g. see the webhook event files here, the message mapping and the PR series of structs) I have not found support for the webhook.

Am I right or is the webhook supported using some other mechanism or path that I do not see?

Would it be possible to add it as time permits? A few prominent open source projects from Apache or the ITK ecosystem could possibly benefit from it.

Thanks.

@gmlewis
Copy link
Collaborator

gmlewis commented Mar 26, 2021

Ah, yes, it looks like our repo doesn't support it yet. I'll open an issue and invite volunteers to implement it. Thanks, @jhlegarreta .

@gmlewis
Copy link
Collaborator

gmlewis commented Mar 26, 2021

There is now a new issue to support it: #1834.

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 webhook payload from event "change the base-branch in a pull request"
4 participants