Documentation

Support

Unity Version Control

Create a Discord web trigger

Set up Discord webtriggers for automated actions in Unity Version Control.
Read time 1 minuteLast updated 21 days ago

You can create a web trigger to connect Unity Version Control with Discord to receive notifications. The notification includes the information available to the specific trigger that you use.

Create a Discord Webhook

First, you need to choose which channel you want to receive notifications:
  1. Right-click on the channel and select Edit channel > Integrations.
  2. Select Create Webhook.
  3. Select the webhook that appears to expand it. You can change the name and channel if you need to.
  4. Select Copy Webhook URL.

Create the UVCS Webtrigger

You can then use the Discord Webhook URL to set up a webtrigger. For a complete list of the types of triggers you can use, refer to this list of triggers. You need to use the
webtrigger-discord
string (instead of
webtrigger
) before the script path, followed by the Discord webhook:
webtrigger-discord https://discordapp.com/api/webhooks/${channelId}/${token}

Example Discord web triggers

This example uses an
after-ci
so that you get a notification when someone runs a check in operation:
> cm trigger make after-ci NotifyTeam-Ci "webtrigger-discord https://discord.com/api/webhooks/<channelId>/<token>" --server=localhost:8787
The following example uses an
after-mkbranch
trigger so that you get a notification when anyone creates a new branch:
> cm trigger make after-mkbranch NotifyTeam-Branch "webtrigger-discord https://discord.com/api/webhooks/<channelId>/<token>" --server=localhost:8787