We released DevSensei | Code Owners for Bitbucket 8.2 on (TODO: REAL DATE) 🎉
Download on the Atlassian Marketplace for Data Center
...
Starting from this release, DevSensei Workflows now execute actions following an edge-triggering model.
What is edge-triggering?
In brief, a A Workflow’s actions will only execute when its conditions become met. They will only run for a second time in two cases:
...
🆕 Workflow section: retrigger-on
Edge-triggering can be enhanced to give you more control over when actions run. You can configure the new retrigger-on
section with an optional list of expressionsattribute names (the same as in conditions). When the value of one of these expressions attributes changes, it will cause another edge trigger if the condition is already met. For now only attribute names are allowed as expressions (the same attributes as in conditions).
Show me an example
Here is how you would configure a workflow to perform some action whenever a commit is pushed to a PR to the main
branch:
...
Change to When add-codeowners
Action Runs
Due to a change in semantics, users who previously migrated from CODEOWNERS
to devsensei.yaml
(all versions since v7.0) should add a condition to filter on non-draft PR, and add retriggers for destination
and source-head-sha
. This ensures that add-codeowners
action will run on each destination branch rescope, commit push, or when the PR is no longer draft.
...
Code Block | ||
---|---|---|
| ||
workflows: - # rest as before conditions: - "!draft" # additional# some existing condition (keep previous ones) - "!draft" retrigger-on: - destination - source-head-sha |
...