Skip to content

Commit

Permalink
📝 Add docs on server Event
Browse files Browse the repository at this point in the history
  • Loading branch information
NatoBoram committed Sep 20, 2024
1 parent 3bff547 commit 2fcfa64
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/server/webhooks/events/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,22 @@ import type { PrEvent } from "./pr/event.js"
import type { ProjectEvent } from "./project/event.js"
import type { RepoEvent } from "./repo/event.js"

/**
* When you have a webhook with an event, Bitbucket Data Center sends the event
* request to the server URL for the webhook whenever that event occurs.
*
* For Bitbucket to send event payload requests for a webhook with HTTPS
* endpoints, make sure your URL has a valid SSL certificate that a public
* certificate authority has signed.
*
* The following payloads contain some of the common entity types: `User`,
* `Repository`, `Comment`, and `Pull Request` – which have consistent
* representations in all the payloads where they appear. For example, the actor
* property in the `repo:refs_changed` payload is a representation of the
* event's user.
*/
export type Event = PrEvent | ProjectEvent | RepoEvent

export type EventKey =
| PrEvent["eventKey"]
| ProjectEvent["eventKey"]
Expand Down

0 comments on commit 2fcfa64

Please sign in to comment.