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

Do installation and installation_repository payloads have the property installation 100% of the times? #516

Closed
oscard0m opened this issue Oct 14, 2020 · 10 comments · Fixed by #1948
Labels
ecosystem This issue or pull request should be reviewed by the Docs Ecosystem team triage Do not begin working on this issue until triaged by the team

Comments

@oscard0m
Copy link
Contributor

oscard0m commented Oct 14, 2020

What article on docs.github.com is affected?

https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/webhook-events-and-payloads

What part(s) of the article would you like to see updated?

Additional information

{% data reusables.webhooks.installation_properties %}
{% data reusables.webhooks.app_desc %}
{% data reusables.webhooks.sender_desc %}

and

{% data reusables.webhooks.installation_repositories_properties %}
{% data reusables.webhooks.app_desc %}
{% data reusables.webhooks.sender_desc %}

Checking the description of installation property, it denotes it could exist or not:

`installation` | `object` | The {% data variables.product.prodname_github_app %} installation. Webhook payloads contain the `installation` property when the event is configured for and sent to a {% data variables.product.prodname_github_app %}.

but due to the nature of the events, it should always have installation property right?


Context:

@octokit/webhook-definition is working to improve typing of installation property in Payloads so it becomes an optional property (when necessary)

@welcome
Copy link

welcome bot commented Oct 14, 2020

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Oct 14, 2020
oscard0m added a commit to octokit/webhooks that referenced this issue Oct 14, 2020
@janiceilene janiceilene added the ecosystem This issue or pull request should be reviewed by the Docs Ecosystem team label Oct 15, 2020
@lucascosti
Copy link
Contributor

👋 @dominguezcelada To answer your question:

Do installation and installation_repository payloads have the property installation 100% of the times?

The installation property is used in many webhooks, and has this description:

The GitHub App installation. Webhook payloads contain the installation property when the event is configured for and sent to a GitHub App.

This means that if the event for the webhook involves a GitHub App, it will contain the installation property.

Because the webhooks installation and installation_repository always relate to a GitHub App, they will contain the property 100% of the time.

Comparing it other webhooks, such as repository, the payload will only contain the installation property if the event for the webhook is configured for and sent to a GitHub App.

I hope this makes sense! 🙂

@oscard0m
Copy link
Contributor Author

👋 @dominguezcelada To answer your question:

Do installation and installation_repository payloads have the property installation 100% of the times?

The installation property is used in many webhooks, and has this description:

The GitHub App installation. Webhook payloads contain the installation property when the event is configured for and sent to a GitHub App.

This means that if the event for the webhook involves a GitHub App, it will contain the installation property.

Because the webhooks installation and installation_repository always relate to a GitHub App, they will contain the property 100% of the time.

Comparing it other webhooks, such as repository, the payload will only contain the installation property if the event for the webhook is configured for and sent to a GitHub App.

I hope this makes sense! 🙂

Has totally sense @lucascosti . Thanks for the clear explanation 💪🏽

I was thinking... would have sense to improve a little bit the way is expressed so, in case of webhooks like installation and installation_repository where the property appears 100% of the times to rewrite it from:

The {% data variables.product.prodname_github_app %} installation. Webhook payloads contain the `installation` property when the event is configured for and sent to a {% data variables.product.prodname_github_app %}. 

to

The {% data variables.product.prodname_github_app %} installation. 

only for this kind of events.


Do you think it could have sense this improvement?

Thanks for your time!

@lucascosti
Copy link
Contributor

lucascosti commented Oct 18, 2020

to

The {% data variables.product.prodname_github_app %} installation. 

only for this kind of events.

@dominguezcelada 👍 I think that makes sense. For those endpoints, we could remove the {% data reusables.webhooks.app_desc %} reusable and just add a normal table row with that simple description. Feel free to reopen this issue and submit a PR to the docs 🙂

@oscard0m
Copy link
Contributor Author

to

The {% data variables.product.prodname_github_app %} installation. 

only for this kind of events.

@dominguezcelada 👍 I think that makes sense. For those endpoints, we could remove the {% data reusables.webhooks.app_desc %} reusable and just add a normal table row with that simple description. Feel free to reopen this issue and submit a PR to the docs 🙂

Cool! I will be happy to open a PR for this.

Should I create a new issue linking to this one? Seems I'm not able to re-open the issue myself.

Thanks @lucascosti

@lucascosti lucascosti reopened this Oct 18, 2020
@lucascosti
Copy link
Contributor

Seems I'm not able to re-open the issue myself.

My bad, I forgot that external contributors can't reopen 😊 . Reopened for you 🚀

@Kerruba
Copy link

Kerruba commented Oct 30, 2020

Hello, I'm building my own GitHub App using ProBot and I've a registered app on some private repositories.
My GitHub app has been registered with webhooks to push events, though in the payload I'm receiving from GitHub I'm not receiving the installation object as part of the payload. Could be that my Application is not registered properly? I have an installation ID available, and I'm able to create an authenticated client with octokit by providing that installation ID.

Does the app required to be configured in a special way in order to receive the installation property as part of the push event payload?

@lucascosti
Copy link
Contributor

👋 @Kerruba! This docs repository is not the best place to troubleshoot product issues not directly related to the documentation. Better places to get help would be the GitHub Support Community forums, or contacting GitHub Support. 🙂

@Pongsuk11

This comment has been minimized.

@oscard0m
Copy link
Contributor Author

@lucascosti I ended up opening a PR for this after a long time! Would it be possible to re-open this issue? I think it was closed by mistake or by its inactivity

#1948

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ecosystem This issue or pull request should be reviewed by the Docs Ecosystem team triage Do not begin working on this issue until triaged by the team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@oscard0m @Kerruba @lucascosti @janiceilene @Pongsuk11 and others