r/devops • u/Connoropolous • Aug 05 '26
Architecture how to create N integration environments for integration heavy apps
Fellow engineers, help me!
Github Apps can only have ONE webhook url and ONE setup url for redirect each.
Having three (prod, staging, dev) isn't enough! I need for deploy previews.
Have you solved this??
Github Apps can't be created programmatically or via the API it's not enabled.
14
Upvotes
8
u/Zerodriven Development lead in denial Aug 05 '26
Bit of faff but have the environment in the payload and have a service route the requests to the relevant environment based on said payload.
Https://api.whatever.com/postHandler
JSON:
Environment:
Payload [{}].
5
u/ice456cream Aug 05 '26
Deploy a GitHub enterprise staging environment per test deploy /s
1
u/Forward-Outside-9911 Linux Sysadmin Aug 05 '26
Have a central auth handler. It can use the state param to send data of your choice, like “original_service”.
That’s what I do. I have a separate auth for staging and prod. Then I have a separate one for a specific project which has different permission requirements for the app.
All of this is done through my IDP though, the application just sends the state and gets the response.
Same can apply to the GitHub OAuth provider too.
1
u/delusional-engineer Aug 06 '26
we use staging one for all non-prod environments. From staging have configured to redirect based on the state which contains the environment.
1
u/forever-butlerian Solaris 8 Enjoyer Aug 06 '26
Is your problem with the setup URL or fanning out the webhooks?
1
u/dmikalova-mwp Aug 06 '26
I only care about events within my org, so I use the org level (or repo level) webhooks - you can make as many as you want. I have the app just as credentials (eg a service account).
1
u/[deleted] Aug 06 '26
[removed] — view removed comment