Upsource 2020.1 Help

Custom workflows

Some actions around commits and reviews are quite common and can be automated by including them in a custom workflow.

You can set up a workflow to automatically:

  • Create reviews (and assign reviewers) for commits that match specified criteria, for example when someone changes certain parts of the codebase, or if the commit message has an issue ID specified. This can be especially useful if you have a so-called “critical path”, a part of your system where you want to be 100% certain no change goes unnoticed by you, or a dedicated members of your team.

  • Add revisions to reviews, when revisions match specified criteria, e.g. when authored by certain committer(s), or a review ID or issue ID is mentioned in the commit message.

  • Assign participants (reviewers and watchers) to reviews created either manually or automatically.

  • Close a review when all participating reviewers accept the changes.

  • Resolve all discussions in a review when it gets closed.

  • Reopen branch reviews and resume branch tracking in specified branches if new commits are made to these branches.

  • Add or remove review labels when a new revision that matches specified criteria is added to the review.

Workflows are configured on the per-project basis.

To set up a custom workflow:

  1. Click the settings icon Settings on the top right of the screen. The Administration view will open.

  2. Locate the project you want to set up a workflow for and click Edit project next to its name. In the right pane, under Settings, click Custom workflows. You'll be redirected to the Custom workflows form.

    workflows.png

To automatically create reviews:

  1. Tick the corresponding checkbox and click Add trigger.

  2. Specify the trigger criteria:

    • Issue ID in a commit message.

    • Selected commit authors.

    • Selected branches (or all branches except for specified).

    • Selected files (paths) contained (or not contained) in a revision.

    • Specified tag or a regular expression contained (or not contained) in a commit message.

  3. Specify one or more reviewers. You can select individual users or predefined groups from the list.

    workflow1

To automatically add revisions to a review:

  1. Tick the corresponding checkbox and click Add trigger.

  2. Specify the trigger criteria: review ID, issue ID.

  3. Choose one or more commit authors (if part of the criteria). You can select individual users or predefined groups from the list.

    workflow2

To automatically assign participants (reviewers or watchers) to a review:

  1. Tick the corresponding checkbox and click Add trigger.

  2. Specify the review trigger criteria: the review type and who it was created by.

  3. Specify and add one or more participants to be assigned to the review that matches the specified criteria. You can select individual users or predefined groups from the list.

    workflow3.png

To automatically manage review labels:

  1. Tick the corresponding checkbox and click Add trigger.

  2. Specify the trigger criteria.

    • It can be a tag or regular expression contained (or not contained) in a commit message.

    • Several conditions can be added in a newline-separated list.

    • Leave the field empty to trigger the action on any revision regardless of its commit message.

  3. Choose a label to be added or removed when triggered.

  4. Choose the action: Add or Remove the selected label.

    workflow3.png

When you are done, click Save changes. Your workflow is now in effect.

Last modified: 02 April 2021