Release Notes v8.8
We released DevSensei | Code Owners for Bitbucket 8.8 on 🎉
Download on the Atlassian Marketplace for Data Center
We continued our effort to bring new features to the DevSensei workflows, with a particular focus on making Code Owners first class citizens.
Features
🆕 Custom Attributes
We are introducing a new feature to enhance your Workflows: custom attributes. Custom attributes are a way to add information to your Pull Requests based on the specificities of your own team and processes. Custom Attributes are available to use within the actions and merge checks that support them.
Why? DevSensei comes with a growing number of attributes to retrieve information from the Pull Request and use them within Workflow conditions or to build custom merge checks. All these attributes don’t depend on anything else than the pull request (for example, the title or the current approvals). However, other kinds of attribute would depend on how you work. For example, what users are responsible to review it (Code Owners).
In this release, we add the two first available custom attributes:
Custom groups
Code Owners
Custom groups
Custom groups are similar to Bitbucket groups, but they are tied to your pull requests workflows.
Can you show me an example?
Here is a custom groups definition with three teams, frontend-devs
, backend-devs
and all-devs
# This would be added within a workflow
custom-attributes:
custom-groups:
frontend-devs:
- alice
- bobby
backend-devs:
- charly@domain.com
- denise
all-devs:
- @@frontend-devs
- @@backend-devs
Code Owners
We are making Code Owners first class citizens within your DevSensei workflows.
Why? Prior to DevSensei 8.8.0, the add-codeowners
action was a monolithic action lacking flexibility (albeit having a certain number of options). It was also “magically” adding merge checks. We are thus moving the definition of the Code Owners rules as part of a custom attribute.
Can you show me an example?
Here is the definition of Code Owners that reference custom groups (frontend-devs
and backend-devs
) and a Bitbucket or reviewer group (admins
)
custom-attributes:
# [... custom groups as above]
codeowners:
rules: |
* @alice bobby@domain.com
frontend/ @@frontend-devs
backend/ @@backend-devs
devsensei.yaml @@admins
🆕 DevSensei Workflow Action: add-reviewers
We add a new action to automatically add reviewers to your pull requests. The added reviewers can be individuals, groups (Bitbucket, reviewer or custom groups) or the defined Code Owners.
Why? Automatically adding the right persons as reviewers enhances the quality of your Pull Requests and fasten their creation.
Can you show me an example?
Here is a workflow adding the frontend-devs
group (see above) when files from the frontend directory are modified
workflows:
- name: Add Frontend devs
conditions:
- changed-files ~= 'frontend/'
custom-attributes:
custom-groups:
frontend-devs:
- alice
- bobby
actions:
- add-reviewers:
members:
- @@frontend-devs
Here is a workflow using the custom codeowners
attributes
workflows:
- name: Add Code Owners
conditions:
- changed-files ~= 'frontend/'
custom-attributes:
custom-groups:
frontend-devs:
- alice
- bobby
backend-devs:
- charly@domain.com
- denise
codeowners:
rules: |
frontend/ @@frontend-devs
backend/ @@backend-devs
devsensei.yaml @@admins
actions:
- add-reviewers:
members: codeowners
🆕 DevSensei Workflow Action: add-watchers
The add-watchers
action is similar to the add-reviewers
action but adds the configured people as pull request watchers instead of reviewers.
Why? Some people need to be kept informed about what is happening in your repositories, without talking an active role in it. Use the add-watchers
attribute to let people know about your changes.
Can you show me an example?
Here is a workflow adding the QA team as watchers to your pull requests
workflows:
- name: Keep QA team in the loop
actions:
- add-watchers:
members:
- @@qa-team
🆕 DevSensei Workflow Merge Check: codeowners-check
Configured Code Owners can also be used to define merge checks requiring some (or all) of the active Code Owners to approve the Pull Request.
Why? Adding active Code Owners as reviewers is often not enough, so you can use the codeowners-check
to ensure that they actively review and approve a Pull Request for it to be merged.
Can you show me an example?
Here is a workflow using codeowners-check
to impose that at least one approval from backend and/or frontend team (depending on what code has been changed)
workflows:
- name: Add Code Owners
conditions:
- changed-files ~= 'frontend/'
custom-attributes:
custom-groups:
frontend-devs:
- alice
- bobby
backend-devs:
- charly@domain.com
- denise
codeowners:
rules: |
frontend/ @@frontend-devs
backend/ @@backend-devs
merge-checks:
- codeowners-check: |
Check(@@frontend-devs >= 1)
Check(@@backend-devs >= 1)
✨ Unapprove action can now reference Code Owners
We introduced the unapprove
action in version 8.5.0 of DevSensei. With this release, we enhance it to also accept codeowners
as members to remove approvals from.
Can you show me an example?
With this workflow, everytime a file affecting a Code Owner is changed after they approved the pull request, their approval will be removed
workflows:
- name: Code Owners with unapproval
retrigger-on:
- diff-change
custom-attributes:
codeowners:
rules: |
frontend/ @@frontend-devs
backend/ @@backend-devs
actions:
- unapprove:
members: codeowners
⚙️ Support for Bitbucket 10
The app is now compatible with the recently released Bitbucket 10.0.
Changelog
🐛 Bugfixes 8.8.1
Restore functionality of automatic reviewer suggestions in the “Create Pull Request” page
Fix positioning of Code Owners information in the “Create Pull Request” page
Add visibility of warnings for invalid identifiers when using the
add-reviewers
action.
🐛 Bugfixes 8.8.0
Some UI elements for DevSensei information where not visible to users. They should now be able to see DevSensei information when creating a Pull Request
Previous: Release Notes v8.7
Do you have any questions, suggestions, or problems?
Let us know. We’re glad to help!