The GitHub Repository web triggers are used to monitor a repository within a GitHub organization for events. Once the event occurs in the repository, the trigger is activated and starts the automation work flow.

Map your trigger to a repository within a GitHub organization and configure the trigger to run the automation when any events occur in the repository.

The GitHub repository web trigger supports the following events in a repository:
  • Create
  • Fork
  • Issue comment
  • Issues
  • Label
  • Pull request
  • Pull request review
  • Push
  • Star
  • Watch

For example, create a GitHub Repository web trigger to monitor a repository within a GitHub organization for a pull request. When a pull request is made in the monitored repository, the trigger is activated and the next actions in the automation are initiated.

Prerequisites

  • You must have a Bot Creator or Citizen Developer license.
  • You must have View my bots permission.
  • You must have all the EVENT TRIGGERS permission for the role.
  • You must have Check in and Check out permission on the folders of where the automation resides.
  • You must be logged in to your Control Room.
  • The GitHub web triggers use Personal Access Token to authenticate the identity of the user profile. The GitHub web trigger supports classic and fine-grain access token. Ensure that you generate a Personal Access Token in GitHub user settings and store it in the Credential Vault. For more information about creating and managing Personal Access Token, see Managing your personal access tokens.

Procedure

  1. On the left pane, click Automation.
  2. Click Create > Task Bot.
    The Create Task Bot wizard is displayed.
  3. Enter an appropriate name for the bot in the Name field.
    All the bots are stored in \Bots folder by default.
  4. Optional: You can add a description for the bot in the Description field.
  5. Optional: You can use the Choose button to save the bot in a different folder.
  6. Click Create & Edit.
    The bot is created and the Edit Task Bot is displayed.
  7. Click Triggers > GitHub, and then double-click or drag Repository web trigger to add the web trigger to Triggers section.
  8. Select the one or multiple events to listen from the Listen to event drop-down.
  9. Enter the GitHub repository name in the Repository name field.
  10. Enter the GitHub profile name in the User profile.
  11. Select one of the following in the Select the authentication type section.
    The Personal Access Token is selected as the authentication type in Select the authentication type by default.
    • Credentials: Click Choose to select Personal Access Token that is already configured in the Credential Vault.
    • Insecure string: Copy and paste the personal access token string that is generated in GitHub developer settings.
      Note: Ensure that the Personal Access Token has not expired.
  12. Optional: Add variables to the trigger in the Response option. For more information about variables, see Variables overview.
    Note: If you use an existing variable for response, ensure that Use as input check box is enabled for the variable.
  13. Optional: Add more triggers as required in the Triggers section.
  14. Double-click or drag an appropriate action from the Actions palette to the Action section.
    For information about actions, see Actions to build automations.
  15. Click Save to save the bot.
When you run the bot using Run with triggers, the web trigger is activated and listens for Issues, Star, and Watch events. When one of the events occur in the repository, the trigger initiates the subsequent Message Box action.