Repository navigation
Rename GitHub Apps installation and installation_repositories events. - #655
Conversation
|
The PR closes 627 as I believe this was the only action item (address the breaking changes). |
| // The action that was performed. Can be either "added" or "removed". | ||
| Action *string `json:"action,omitempty"` | ||
| RepositoriesAdded []*Repository `json:"repositories_added,omitempty"` | ||
| RepositoriesRemoved []*Repository `json:"repositories_removed,omitempty"` |
There was a problem hiding this comment.
This struct is missing repository_selection field from https://developer.github.com/v3/activity/events/types/#installationrepositoriesevent. Is it in scope of this PR too add it?
|
Question. I don't see any entries for these 2 events in |
|
I was only addressing the renaming of fields in preparation for the removal, I can address the additional fields and tests too. Once there's agreement on |
|
I'm completely okay with keeping the scope of this PR with dealing with the breaking API change rename, and leaving the rest out. Up to you. |
|
Let me know what you want to do with the library version, and I'll take a closer look at the other changes (they sound straight forward), and I'll just look at making the PR two commits. |
It's currently "7", it should be bumped up by one to become "8". |
| // event are: "created", "deleted". | ||
| // GitHub API docs: https://developer.github.com/v3/activity/events/types/#installationevent | ||
| type InstallationEvent struct { | ||
| // The action that was performed. Can be either "created" or "deleted". |
There was a problem hiding this comment.
@shurcooL do you want me to remove these field comments? They duplicate the GitHub API and it's only a comment for a single field, yet the GitHub API have docs for other fields. So either these should be removed or all of the fields should have the docs duplicated IMHO - is there another reason they are there?
Just the field comments, not the struct comments.
There was a problem hiding this comment.
No, keep them, they're helpful and appreciated (as long as they're accurate, and I've checked, they are).
|
OK, leave this with me, I'll get at it within a week. |
gmlewis
left a comment
There was a problem hiding this comment.
LGTM after the libraryVersion is bumped.
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.
|
OK, I've pushed the changes as discussed in the first commit, I've also pushed another commit in the related GitHub Apps service. Essentially, renaming it from |
Looks good.
Let's go with From https://github.com/google/go-github/blob/master/CONTRIBUTING.md#other-notes-on-code-organization:
So in general prefer looking at the API docs structure, not the API endpoint URLs. |
|
Thanks @shurcooL, I've added the |
| // | ||
| // GitHub API docs: https://developer.github.com/v3/integrations/ | ||
| type IntegrationsService service | ||
| // GitHub API docs: https://developer.github.com/v3/apps/ |
There was a problem hiding this comment.
There should be a single space after colon.
dmitshur
left a comment
There was a problem hiding this comment.
Few minor nits, and this LGTM again. Thanks!
| Git *GitService | ||
| Gitignores *GitignoresService | ||
| Integrations *IntegrationsService | ||
| Apps *AppsService |
There was a problem hiding this comment.
Let's move it up so it's alphabetical.
| c.Git = (*GitService)(&c.common) | ||
| c.Gitignores = (*GitignoresService)(&c.common) | ||
| c.Integrations = (*IntegrationsService)(&c.common) | ||
| c.Apps = (*AppsService)(&c.common) |
This is to follow new GitHub Apps naming from GitHub Integrations.
|
All fixed, can you review again? |
|
If this is ready from your side, I can merge. |
|
I'm happy with this. This isn't an extensive update of all GitHub Apps end points, it was just focusing on making the naming changes required from Integrations to GitHub Apps. There's still some missing pieces there. |
With the release of GitHub Apps (was GitHub Integrations), GitHub
have renamed the
integration_installationandintegration_installation_repositoriesevent to installation and installation_repositories respectively.
This is a breaking change for those using this API, and can be fixed with:
Closes #627.
Updates #434.