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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃 differentiating webhook events from github.com and GHE #2

Open
gr2m opened this issue Nov 18, 2017 · 2 comments
Open

馃 differentiating webhook events from github.com and GHE #2

gr2m opened this issue Nov 18, 2017 · 2 comments
Labels
enterprise Applies to GitHub Enterprise Server or GitHub Enterprise Cloud Type: Feature New feature or request
Projects

Comments

@gr2m
Copy link
Contributor

gr2m commented Nov 18, 2017

follow up for #1 (comment)

Use case

I want to build a GitHub app which works for both, github.com and GitHub Enterprise (GHE) installations. For GHE the available APIs (and probably the event payloads) differ per version, so it would be nice to know as the receiver of webhooks what I can do with them.

@gr2m gr2m mentioned this issue Nov 18, 2017
3 tasks
@gr2m
Copy link
Contributor Author

gr2m commented Dec 21, 2018

Not ideal, but you could send a HEAD / request to the enterprise URL and read out the X-GitHub-Enterprise-Version header. This might be another use case to be implemented with hooks, currently discussed at #44

@gr2m gr2m added the Type: Feature New feature or request label May 5, 2020
@gr2m gr2m added this to Features in JS May 5, 2020
@gr2m
Copy link
Contributor Author

gr2m commented Jul 31, 2020

GitHub sends additional headers when receiving webhooks from a GHES instance, see https://docs.github.com/en/enterprise/2.21/user/developers/webhooks-and-events/webhook-events-and-payloads#delivery-headers

Example

> POST /payload HTTP/1.1

> X-GitHub-Delivery: 72d3162e-cc78-11e3-81ab-4c9367dc0958
> X-GitHub-Enterprise-Version: 2.15.0
> X-GitHub-Enterprise-Host: example.com
> X-Hub-Signature: sha1=7d38cdd689735b008b3c702edd92eea23791c5f6
> X-GitHub-Event: issues

@gr2m gr2m added the enterprise Applies to GitHub Enterprise Server or GitHub Enterprise Cloud label Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enterprise Applies to GitHub Enterprise Server or GitHub Enterprise Cloud Type: Feature New feature or request
Projects
No open projects
JS
  
Features
Development

No branches or pull requests

1 participant