[FEATURE] Refactor all Github sources to support webhook/polling dynamically
Is your feature request related to a problem? Please describe. Webhooks within Github are only available when the user has admin rights on a given repo.
Describe the solution you'd like With the new extension of additionalProps, we have the ability to create a more dynamic configuration here. The proof-of-concept was implemented by @GTFalcao in https://github.com/PipedreamHQ/pipedream/issues/7217, with the source New or Updated Pull Request.
The following 15 registry sources should follow the same pattern, attempting configuration as webhook if the user has admin rights on the repo, else falling back to polling.
- New Branch (Instant)
- New Collaborator (Instant)
- New Commit (Instant)
- New Commit Comment (Instant)
- New Discussion (Instant)
- New Fork (Instant)
- New Issue (Instant)
- New Label (Instant)
- New Milestone (Instant)
- New or Updated Issue (Instant)
- New or Updated Milestone (Instant)
- New Project Card (Instant)
- New Pull Request (Instant)
- New Release (Instant)
- New Stars (Instant)
In addition, for the New Webhook Event (Instant) source, can we implement the same check to see if the user has admin rights on the repo, and return a custom error message to let the user know that webhooks are only supported on repos where the user has admin privileges?