Skip to main content
Skip table of contents

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

devsensei-owl-with-header-blue-dark.svg

🎉 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:

YAML
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

Pull Request Create Page: shows you which workflows will be applied when creating a PR. Click to see more details.

image-20240521-102026.png

Pull Request Detail Page: See which workflows are active and why (conditions).

image-20240521-102336.png

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 to CODEOWNERS is sharing common rules across repositories with included devsensei.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 of CODEOWNERS , 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:

  1. a) Automated migration: migrate your CODEOWNERS file to devsensei.yaml with the built-in migration support: Go to any repository using Code Owners → Click DevSensei WorkflowsDownload generated devsensei.yaml

    image-20240521-100334.png


    b) Manual migration: migrate your CODEOWNERS settings to their equivalents in devsensei.yaml. For the most part, copy everything except CODEOWNERS settings and custom groups from the CODEOWNERS file to the rules section of devsensei.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 of add-codeowners.

  2. commit the devsensei.yaml file to the root directory in the default branch of your repository

  3. enable 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!

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.