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

HTTP Hooks #299

Closed
OO00O0O opened this issue Jul 27, 2015 · 2 comments
Closed

HTTP Hooks #299

OO00O0O opened this issue Jul 27, 2015 · 2 comments

Comments

@OO00O0O
Copy link

OO00O0O commented Jul 27, 2015

GitHub type HTTP hooks for integrations.

@CoderCow
Copy link

CoderCow commented Jan 5, 2018

Open Questions

  • What exactly is GitHub's "Secret" setting and is something like this useful for Bonobo hooks? Will be supported.
  • Should hooks support http basic auth? Request signing is better.
  • Is a different format than JSON actually useful? Will support JSON only for now.
  • In what format should webhooks be sent? Offer to choose between different formatters.

Purposed Solution

Triggers for Hooks

Application Triggers

  • Repository Added
  • Repository Deleted
  • User Added
  • User Deleted
  • Team Added
  • Team Removed
  • Team Members Modified

Hooks for application triggers will be configured in the Bonobo settings.

Repository Triggers

  • Branch Created
  • Branch Deleted
  • Branch Modified
  • Tag Created
  • Tag Deleted
  • Repository User Access Modified (triggers for user, team or admin changes)
  • Repository Anonymous View Policy Changed
  • Repository Push Mode Changed

Hooks for repository triggers can be configured on a per repository basis and globally as part of the Bonobo settings. Whether the global hooks are triggered for a specific repository can be configured in each repository's settings.

Webhooks

Multiple webhooks can be configured for each trigger. The user can

  • set a custom name and a url to invoke,
  • activate and deactivate them,
  • test them in the web interface and get immediate feedback,
  • turn SSL certification on or off per hook,
  • configure which formatter to use when sending requests.

Webhook Formatters

When a webhook is configured the user will be able to choose from a list of available formatter implementations. This is to ensure maximum compatibility with other services, because we can't expect them to support a Bonobo specific request format.

Initial implementations will be:

Formatter Capabilities Description
GitHub Branch and Tag Events only Tries to mimic GitHub webhooks as good as possible. Might not work with all services because Bonobo can't provide all of the data GitHub provides.
Slack Every Trigger Supported Can be used with a simple "Incoming Webhook" in Slack and will format simple Slack messages to announce Bonobo events.
Bonobo Every Trigger Supported Formats requests in a Bonobo specific way. This allows us to provide all interesting information about an event as parsable JSON data so that there's at least the possibility for other services to support Bonobo and for users to do whatever they want with the incoming data on their own servers.

@CoderCow
Copy link

CoderCow commented Jan 9, 2018

GitHub's secret setting allows the sending server to sign the payload data in the webhook request so that the receiving server can verify the legitimacy of the Git server and the request.

Beacause I generally like to have some form of authenticity for the hook requests and because this seems to be a better solution than using http basic auth, I'll make the GitHub and Bonobo formatter support this.

@OO00O0O OO00O0O closed this as completed Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants