The GitHub web triggers are configured to monitor events in a GitHub repository or organization.

Overview

The GitHub web triggers listens to specific events in a GitHub organization or repository. When the events occur in the organization or repository, the trigger initiates the configured automation workflow.

Authentication

The GitHub web triggers uses Personal Access Tokens for user authentication and does not require an OAuth connection. For more information about creating and managing Personal Access Tokens, see Managing your personal access tokens. The GitHub web trigger supports classic and fine-grain access tokens. Ensure that the Personal Access Tokens are valid.

You can store this token in the Credential Vault. See Credentials and lockers in the Credential Vault for more information about storing and maintaining credentials.

Supported events

The GitHub web triggers support the following events in both organization and repository levels:

Events Description
Create When a file, branch or tag is created.
Fork When a repository is forked.
Issue comment When a comment is added to an issue or a pull request.
Issues When an issue is created at repository level.
Label When a label is added to or removed from an issue or a pull request.
Pull request When a pull request is made in a branch within the repository.
Pull request review When review comments are added to the pull request.
Push When there is a push to a repository branch.
Star When a repository is starred
Watch When the watch option is enabled for specific events within the repository.

Prerequisites

Ensure that the following prerequisites are met:

  • A Bot Creator or Citizen Developer license.
  • View my bots and EVENT TRIGGERS permissions.
  • Check in and Check out permission for the folders in which the automation is located.
  • An active GitHub Personal Access Token.

Settings

The following settings are available for GitHub web triggers:

Screenshot of GitHub organization web trigger

Screenshot of GitHub repository web trigger settings

Listen to event
Select one or more events that the trigger must monitor.
Organization name
Enter the GitHub organization name. This field is applicable for GitHub Organization web trigger only.
Repository name
Enter the repository name within the GitHub organization. This field is applicable for GitHub Repository web trigger only.
User profile
Enter the GitHub user profile. This field is applicable for GitHub Repository web trigger only
Select the authentication type
Personal Access Token is the default authentication type. You can either select the Personal Access Tokens stored in the Credential Vault using the Choose in Credential option or enter the Personal Access Tokens directly in the Insecure string option.
Response (optional)
Use the Response option to save the trigger response data in a Record variable. You can either create a new variable or select an existing variable to store this response data. The trigger response data captures the information from the GitHub webhook API payload response body in a key-value pair format. Use the key as a name in the Record variable, allowing this data to serve as inputs for other actions within the automation.
The GitHub web triggers parse the webhook key-value pair payload with a dot (.) notation. You must follow the same format to build the expression for the Record variable. For example, to use the repository id as the expression, you must enter repository.id as the key. For more information about GitHub webhook payload documentation, see GitHub webook events and payload.
Once the bot finishes running, the Audit log logs the trigger response data in a Bot run by trigger event.