Set up a repository webhook to notify external services (e.g. a CI server, a deployment tool) when the repository is updated with new commits or its settings get changed. When an event occurs, Space will send an HTTP POST request to the specified URL.
At this time, webhooks do not support JSON payloads, however you can use URL macros to pass the repository name in a webhook by adding macros to the URL string.
Open the Repository Settings page.
Go to the Webhooks tab.
Existing repository webhooks are listed on this page.
To edit a webhook, click next to it. To create a new one, click New webhook.
Give your webhook a name and description, check Enabled.
Pick one or more triggering events:
Repository is updated
Specify the URL of the service that should be be notified. You can add the macro
%repository%to pass the repository name.
Choose an SSL keystore if required for the connection.
Select authorization method depending on the external service requirements:
Anonymous— service accepts anonymous requests.
Basic— service requires credentials provided with the request. Specify username and password that the service will accept.
Bearer— service requires a token provided with the request. Get a token that the service will accept and paste it here.
Accepted HTTP response codes. The external service should acknowledge a successful receipt of a webhook by returning any 2XX status code. By default, any other response code will be treated as a failure. You can specify some other response codes that Space should treat as a success.
Click Save when done.