DevSensei | Code Owners for Bitbucket

Workflows

  • 🔰 fundamental topics for beginners getting started with DevSensei

  • 🔬 advanced topics for once you have your first workflows automated

A devsensei.yaml file has a top-level workflows property, which declares a list of Workflow objects. (Review the workflow concept).

Example

YAML
workflows:
  - name: Check commits
    merge-checks:
    # ...
  - name: Make Checklist
    actions:
    # ...

Workflow Properties

Attribute

Definition

name (required) 🔰

The name of the workflow. Must be unique in a repository.

conditions (optional) 🔰

A set of conditions to be met for the actions of the workflow to be executed for a pull request. If empty then all pull requests will match.

retrigger-on (optional) 🔬

A set of expressions. Causes additional trigger for actions each time the value changes while the condition is currently met.

YAML
retrigger-on:
  # on change to an attribute's value
  - destination
  # on a change to the contents of the PR's diff.
  - diff-change

actions (optional) 🔰

A set of actions to be executed each time the conditions are met for a pull request, or when a value in the retrigger-on list changes while the conditions are met.

merge-checks (optional) 🔰

A set of rules that are continuously checked. If any rule fails to pass then the PR is prevented from merging.

custom-attributes (optional) 🔰

A set of custom attributes that can be used within actions and merge-checks. They can for example be used to define user groups or Code Owners in the workflow.

overrides (optional) 🔬

A workflow with the same name can be overridden in the main devsensei.yaml file. If so, the workflow object must have overrides=true. If not, then you will get a validation error for the duplicate names.

main.yaml

YAML
includes:
  - other.yaml
workflows:
  # overriding included workflow
  - name: I am overridden
    overrides: true

other.yaml

YAML
workflows:
  # original definition of workflow
  - name: I am overridden
    conditions: #...
    actions: #...