Release Notes v7.0
We released Code Owners 7.0 on 🎉
Download on the Atlassian Marketplace for Data Center
Features
🆕 DevSensei Pull Request Workflow Automation
🎉 We are excited to introduce DevSensei, a new pull request workflow automation solution, now integrated into the Code Owners App.
How does it work?
DevSensei configuration is YAML-based.
Add a devsensei.yaml
file to the root of your repository for the default branch, and DevSensei will automate your pull request workflow.
The configuration file consists of a set of workflows. Each workflow is meant to automate specific tasks for the pull requests of your team. A workflow includes:
a name to identify the workflow
a set of conditions to be met for the actions of the workflow to be executed for a pull request
a set of actions to be executed when the conditions are met for a pull request
Can you show me an example?
Here's an example devsensei.yaml
that assigns Code Owners for a pull request introducing a new feature where the pull request is opened from a branch including the prefix feature/
with the destination branch being main
or with a release/
prefix:
workflows:
- name: Add Code Owners
conditions:
- source~=feature/*
- or:
- destination=main
- destination~=release/*
actions:
- add-codeowners:
rules: |
*.js @@frontendDevs
devsensei.yaml @@team
When you create a pull request from a feature branch to main
like in the screenshot below, all members of the reviewer group frontendDevs
are assigned because the workflow is active (all conditions are true
) for this pull request.
DevSensei will be visible in the following page locations:
Pull Request Create
Pull Request Detail
Pull Request List
![image-20240521-102434.png](../__attachments/3872161794/image-20240521-102434.png?inst-v=673cdba3-7f01-429e-af8c-885073368456)
Pull Request Create Page: shows you which workflows will be applied when creating a PR. Click to see more details.
![image-20240521-102026.png](../__attachments/3872161794/image-20240521-102026.png?inst-v=673cdba3-7f01-429e-af8c-885073368456)
Pull Request Detail Page: See which workflows are active and why (conditions).
![image-20240521-102336.png](../__attachments/3872161794/image-20240521-102336.png?inst-v=673cdba3-7f01-429e-af8c-885073368456)
Pull Request List: Shows you how many workflows are active for your current PRs. Click to see more details.
What advantages has devsensei.yaml compared to CODEOWNERS?
The main advantage of
devsensei.yaml
compared toCODEOWNERS
is sharing common rules across repositories with includeddevsensei.yaml
files called Includes to reduce duplication and maintenance efforts.Another advantage is that common configuration parts (e.g. reusing the list of reviewers) can be shared with YAML anchors.
devsensei.yaml
currently only supports a few actions. We will add many more actions in the future to automate your pull request workflow. Let us know what actions (e.g. adding PR comments or tasks) you are looking for.devsensei.yaml
is always read from the default branch of your repository, instead ofCODEOWNERS
, which is taken from the destination branch of the pull request. This will reduce the maintenance efforts significantly when you want to make changes.
How can I migrate from Code Owners to DevSensei?
To start using DevSensei from your existing CODEOWNERS
file, you have two options:
a) Automated migration: migrate your
CODEOWNERS
file todevsensei.yaml
with the built-in migration support:Go to any repository using Code Owners
→ ClickDevSensei Workflows
→Download generated devsensei.yaml
b) Manual migration: migrate yourCODEOWNERS
settings to their equivalents indevsensei.yaml
. For the most part, copy everything exceptCODEOWNERS
settings and custom groups from theCODEOWNERS
file to therules
section ofdevsensei.yaml
.i. For the Code Owners settings, use the alternatives from the add-codeowners action.
ii. For the custom Code Owner groups (e.g.
@@@my-group @peter @anna
), use the custom-groups section ofadd-codeowners
.commit the
devsensei.yaml
file to the root directory in the default branch of your repositoryenable DevSensei under
repository settings -> DevSensei | Code Owners -> DevSensei Workflows -> Enabled
When DevSensei is enabled, devsensei.yaml
will take precedence over CODEOWNERS
.
More information can be found in the DevSensei docs.
Need any help in migrating to devsensei.yaml
? Let us know. We’re glad to help!
Bugfixes
Fixed regression for Glob matching that changed the behavior for single
*
in Code Owner rule globs
Changelog
Previous: Release Notes v6.9
Do you have any questions, suggestions, or problems?
Let us know. We’re glad to help!