The @on decorator is used to define the event that will trigger the automation.

@on("github.pull_request")

The @on("event") decorator will correspond to the event payload of your function. See the events documentation for more information.

Arguments

event
string
required

The event that will trigger the automation. Supported values are github.issue_comment, github.issues, github.pull_request, github.pull_request_review, github.pull_request_review_comment, github.pull_request_comment, schedule.daily, schedule.weekly, webhook.

See the events documentation for more information on the payloads for each event.