Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Each workflow is meant to automate specific tasks for the pull requests of your team.

Attributes

MeaningDefinition

name

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

conditions

A set of conditions to be met for the actions of the workflow to be executed for a pull request

actions

A set of actions to be executed when the conditions are met for a pull request

overrides

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

Code Block
includes:
  - other.yaml
workflow:
  - name: Code Owners
  - name: I am overridden
    overrides: true

other.yaml

Code Block
workflow:
  - name: Checklist
  - name: I am overridden

...

Adds Code Owners as reviewers to a pull request.

OptionsAttributes

Definition

assignment-routing

random: n

reduce the number of Code Owners that are automatically assigned to a pull request. (opt-in) Currently, the only available method of assignment is at random.

Code Block
languageyaml
- add-codeowners:
  assignment-routing:
  random: 2

rules

The Code Owners rules and merge checks. For existing CODEOWNERS users, copy your owner rules and the merge checks to the rules section. Note: for sub-directory overrides, check "Not supported settings" section.

Code Block
languageyaml
- add-codeowners:
  rules: |
    *          @jordan jordan@example.com
    /backend/  @@backendies
    /frontend/ @@frontendies

custom-groups

Define custom Code Owners groups.

Code Block
languageyaml
- add-codeowners:
  rules: |
    pipelines.yml           @@admins
    backend/                @@backendies
    src/components/**/*.js  @@frontendies
  custom-groups:
    admins:
      - @bobby
    backendies:
      - @jordan
      - john.doe@localhost.ch
    frontendies:
      - @charly
      - @@admins

auto-unapprove-on-change

Remove approval if owned code changes.

Code Block
languageyaml
- add-codeowners:
  auto-unapprove-on-change: true

...