Skip to content

Commit 2587da3

Browse files
authored
chore: ensure that the PR title follows "Conventional Commits" (#203)
Related changes: - Add a dedicated workflow to enforce the rule. It runs on `pull_request_target` to handle PR created by Dependabot and from fork repositories. - Dependabot configuration: change PR title prefix. - Update the GitHub workflows that create commits and PR. They now follow "conventional commits". - Update the release process documentation.
1 parent f8be911 commit 2587da3

5 files changed

Lines changed: 24 additions & 10 deletions

File tree

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ updates:
1414
open-pull-requests-limit: 2
1515
rebase-strategy: "disabled"
1616
commit-message:
17-
prefix: "[INFRA] gha -"
17+
prefix: "chore(gha)"
1818
labels:
1919
- dependencies
2020
- github_actions
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Check Pull Request Metadata
2+
on:
3+
pull_request_target:
4+
# trigger when the PR title changes
5+
types: [opened, edited, reopened]
6+
7+
jobs:
8+
pr-title:
9+
runs-on: ubuntu-22.04
10+
permissions:
11+
pull-requests: write # post comments when the PR title doesn't match the "Conventional Commits" rules
12+
steps:
13+
- name: Check Pull Request title
14+
uses: bonitasoft/actions/packages/pr-title-conventional-commits@v2

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ jobs:
5959
git add README.md
6060
git add cran-comments.md
6161
git add DESCRIPTION
62-
git commit -m "[RELEASE] Set the release version to ${{ steps.release_version.outputs.version }}"
62+
git commit -m "chore(release): set the release version to ${{ steps.release_version.outputs.version }}"
6363
6464
- name: Tag ${{ steps.release_version.outputs.version }}
6565
run: |
66-
git tag -a ${{ steps.release_version.outputs.version_tag }} -m "[RELEASE] ${{ steps.release_version.outputs.version }}"
66+
git tag -a ${{ steps.release_version.outputs.version_tag }} -m "chore(release): ${{ steps.release_version.outputs.version }}"
6767
6868
- name: Update with the development version
6969
run: |-
@@ -72,7 +72,7 @@ jobs:
7272
- name: Commit with the development version
7373
run: |
7474
git add DESCRIPTION
75-
git commit -m "[RELEASE] Set the development version to ${{ steps.release_version.outputs.version }}.9000"
75+
git commit -m "chore(release): set the development version to ${{ steps.release_version.outputs.version }}.9000"
7676
7777
- name: Push commits and tags
7878
run: |

.github/workflows/update-bpmn-visualization-version.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ jobs:
3535
uses: peter-evans/create-pull-request@v4.2.3
3636
with:
3737
token: ${{ secrets.GH_RELEASE_TOKEN }}
38-
commit-message: "[INFRA] Bump bpmn-visualization from ${{ env.OLD_VERSION }} to ${{ env.VERSION }}"
38+
commit-message: "chore(deps): bump bpmn-visualization from ${{ env.OLD_VERSION }} to ${{ env.VERSION }}"
3939
committer: "process-analytics-bot <62586190+process-analytics-bot@users.noreply.github.com>"
4040
author: "process-analytics-bot <62586190+process-analytics-bot@users.noreply.github.com>"
41-
branch: "infra/bump_bpmn_visualization_from_${{ env.OLD_VERSION }}_to_${{ env.VERSION }}"
41+
branch: "chore/bump_bpmn_visualization_from_${{ env.OLD_VERSION }}_to_${{ env.VERSION }}"
4242
delete-branch: true
4343
base: "main"
44-
title: "[INFRA] Bump bpmn-visualization from ${{ env.OLD_VERSION }} to ${{ env.VERSION }}"
44+
title: "chore(deps): bump bpmn-visualization from ${{ env.OLD_VERSION }} to ${{ env.VERSION }}"
4545
body: "bpmn-visualization is updated from https://cdn.jsdelivr.net/npm/bpmn-visualization@${{ env.VERSION }}/dist/bpmn-visualization.min.js."
4646
labels: "dependencies"
4747
team-reviewers: pa-collaborators

MAINTAINERS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ Check that the files are using the version to be released:
133133
- [README](./README.md)
134134

135135
Create a new PR (it must have the `skip-changelog` label as we don't want it to appear in the release notes) and merge it,
136-
if some files require changes. The PR/commit message should be `[RELEASE] Set version to x.y.z`.
136+
if some files require changes. The PR/commit message should be `chore(release): set version to x.y.z`.
137137

138138
Once this is done, tag manually with the following command (**do not forget** to replace `x.y.z` by the actual version):
139139
```
140-
git tag -a vx.y.z -m "[RELEASE] x.y.z"
140+
git tag -a vx.y.z -m "chore(release): x.y.z"
141141
git push && git push --tags
142142
```
143143

@@ -147,7 +147,7 @@ Add the `.9000` suffix to the `Version` field in the [DESCRIPTION](./DESCRIPTION
147147
For instance, if the released version was `0.3.0`, the `Version` field in the `DESCRIPTION` file should be `0.3.O.9000`.
148148

149149
Create a new PR (it must have the `skip-changelog` label as we don't want it to appear in the release notes) and merge it.
150-
The PR/commit message should be `[INFRA] Set the development version to x.y.z.9000`.
150+
The PR/commit message should be `chore(release): set the development version to x.y.z.9000`.
151151

152152
___
153153

0 commit comments

Comments
 (0)