Repository navigation
Add installation webhook events - #434
cyberdelia wants to merge 5 commits into
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. 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, please reply here (e.g.
|
|
I signed it! |
|
CLAs look good, thanks! |
Add support for the new webhooks event for installations. See: https://developer.github.com/early-access/integrations/webhooks/
| type IntegrationEvent struct { | ||
| Action *string `json:"action,omitempty"` | ||
| Installation *Installation `json:"installation,omitempty"` | ||
| RepositoryAdded []*Repository `json:"repositories_added,omitempty"` |
There was a problem hiding this comment.
s/RepositoryAdded/RepositoriesAdded/
| Action *string `json:"action,omitempty"` | ||
| Installation *Installation `json:"installation,omitempty"` | ||
| RepositoryAdded []*Repository `json:"repositories_added,omitempty"` | ||
| RepositoryRemoved []*Repository `json:"repositories_removed,omitempty"` |
There was a problem hiding this comment.
s/RepositoryRemoved/RepositoriesRemoved/
| @@ -0,0 +1,14 @@ | |||
| // Copyright 2013 The go-github AUTHORS. All rights reserved. | |||
| Installation *Installation `json:"installation,omitempty"` | ||
| RepositoryAdded []*Repository `json:"repositories_added,omitempty"` | ||
| RepositoryRemoved []*Repository `json:"repositories_removed,omitempty"` | ||
| } |
There was a problem hiding this comment.
Can you please add:
Sender *User `json:"sender,omitempty"`to this struct?
| // | ||
| // GitHub docs: https://developer.github.com/early-access/integrations/webhooks/ | ||
| type IntegrationEvent struct { | ||
| Action *string `json:"action,omitempty"` |
There was a problem hiding this comment.
Can you please document this field? For example:
// The action that was performed. Possible values for an "integration_installation"
// event are: "created", "deleted". Possible values for an "integration_installation_repositories"
// event are: "added", "removed".
Action ...(Following the style of the documentation found in other files in this repo.)
|
@gmlewis I addressed your feedback, thanks! |
| @@ -0,0 +1,14 @@ | |||
| // Copyright 2016 The go-github AUTHORS. All rights reserved. | |||
There was a problem hiding this comment.
On second thought, does this need its own separate file?
How about defining the Installation struct with the IntegrationEvent in event_types.go?
There was a problem hiding this comment.
I was merely trying to follow the structure of the other events, but that's a fairly special case, so maybe?
There was a problem hiding this comment.
I agree this seems to fit really nicely right under the definition of IntegrationEvent that first mentions it. It doesn't seem like a win to break it out into a separate tiny file.
I was merely trying to follow the structure of the other events
I don't quite see where that's the case, can you point it out please?
|
@shurcooL - whenever you have time to check this out, that would be greatly appreciated. |
| @@ -0,0 +1,14 @@ | |||
| // Copyright 2016 The go-github AUTHORS. All rights reserved. | |||
There was a problem hiding this comment.
I agree this seems to fit really nicely right under the definition of IntegrationEvent that first mentions it. It doesn't seem like a win to break it out into a separate tiny file.
I was merely trying to follow the structure of the other events
I don't quite see where that's the case, can you point it out please?
| RepositoriesRemoved []*Repository `json:"repositories_removed,omitempty"` | ||
| Sender *User `json:"sender,omitempty"` | ||
| } | ||
|
|
There was a problem hiding this comment.
I.e., Installation could go right here.
| "fork": "ForkEvent", | ||
| "gollum": "GollumEvent", | ||
| "integration_installation": "IntegrationEvent", | ||
| "integration_installation_repositories": "IntegrationEvent", |
There was a problem hiding this comment.
Maybe I'm missing something, but why are these two events/webhook types combined into a single shared struct type? According to https://developer.github.com/early-access/integrations/webhooks/, they have different fields.
Why not have IntegrationInstallationEvent and IntegrationInstallationRepositoriesEvent?
Somewhat similar to pull_request_review_comment and pull_request mapping to their own separate types.
Are they different or special in a way? I'm not very familiar with the details here, so I'm asking.
|
I moved |
|
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
|
LGTM. I fixed a typo and made the URLs more specific (trying out github's new collaboration feature, lol, and figured it's easier to fix a typo myself than to tell you to fix it). Hope that's okay. Check it over. |
|
Looks good to me, thanks. |
|
LGTM. Merging. |
|
Integrated in b0b867f |
With the release of GitHub Apps (was GitHub Integrations), GitHub have renamed the integration_installation and integration_installation_repositories event to installation and installation_repositories respectively. This is a breaking change for those using this API, and can be fixed with: gofmt -w -r 'IntegrationInstallationEvent -> InstallationEvent' [path ...] gofmt -w -r 'IntegrationInstallationRepositoriesEvent -> InstallationRepositoriesEvent' [path ...] Closes google#627. Updates google#434.
With the release of GitHub Apps (was GitHub Integrations), GitHub have renamed the integration_installation and integration_installation_repositories event to installation and installation_repositories respectively. This is a breaking change for those using this API, and can be fixed with: gofmt -w -r 'IntegrationInstallationEvent -> InstallationEvent' [path ...] gofmt -w -r 'IntegrationInstallationRepositoriesEvent -> InstallationRepositoriesEvent' [path ...] Closes google#627. Updates google#434.
With the release of GitHub Apps (was GitHub Integrations), GitHub have renamed the integration_installation and integration_installation_repositories event to installation and installation_repositories respectively. This is a breaking change for those using this API, and can be fixed with: gofmt -w -r 'IntegrationInstallationEvent -> InstallationEvent' [path ...] gofmt -w -r 'IntegrationInstallationRepositoriesEvent -> InstallationRepositoriesEvent' [path ...] Closes google#627. Updates google#434.
With the release of GitHub Apps (was GitHub Integrations), GitHub have renamed the integration_installation and integration_installation_repositories event to installation and installation_repositories respectively. This is a breaking change for those using this API, and can be fixed with: gofmt -w -r 'IntegrationInstallationEvent -> InstallationEvent' [path ...] gofmt -w -r 'IntegrationInstallationRepositoriesEvent -> InstallationRepositoriesEvent' [path ...] Closes google#627. Updates google#434.
With the release of GitHub Apps (was GitHub Integrations), GitHub have renamed the integration_installation and integration_installation_repositories event to installation and installation_repositories respectively. This is a breaking change for those using this API, and can be fixed with: gofmt -w -r 'IntegrationInstallationEvent -> InstallationEvent' [path ...] gofmt -w -r 'IntegrationInstallationRepositoriesEvent -> InstallationRepositoriesEvent' [path ...] Closes #627. Updates #434.
Add support for the new webhooks event for installations. See: https://developer.github.com/early-access/integrations/webhooks/ Closes google#434. Change-Id: I74d3d50cb6b350322fc4515ad70097f0f70ae478
With the release of GitHub Apps (was GitHub Integrations), GitHub have renamed the integration_installation and integration_installation_repositories event to installation and installation_repositories respectively. This is a breaking change for those using this API, and can be fixed with: gofmt -w -r 'IntegrationInstallationEvent -> InstallationEvent' [path ...] gofmt -w -r 'IntegrationInstallationRepositoriesEvent -> InstallationRepositoriesEvent' [path ...] Closes google#627. Updates google#434.
Add support for the new webhooks event for installations. See: https://developer.github.com/early-access/integrations/webhooks/ Closes google#434. Change-Id: I74d3d50cb6b350322fc4515ad70097f0f70ae478
With the release of GitHub Apps (was GitHub Integrations), GitHub have renamed the integration_installation and integration_installation_repositories event to installation and installation_repositories respectively. This is a breaking change for those using this API, and can be fixed with: gofmt -w -r 'IntegrationInstallationEvent -> InstallationEvent' [path ...] gofmt -w -r 'IntegrationInstallationRepositoriesEvent -> InstallationRepositoriesEvent' [path ...] Closes google#627. Updates google#434.
Add support for the new webhooks event for installations.
See for details: