From 86613da708d13333bb4f64ddd43cead9625e61c7 Mon Sep 17 00:00:00 2001 From: Angelique Jard Date: Fri, 2 Jan 2026 09:24:45 +0100 Subject: [PATCH 1/4] Add an automated verification of PR title. --- .../check-pull-request-convention.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/check-pull-request-convention.yml diff --git a/.github/workflows/check-pull-request-convention.yml b/.github/workflows/check-pull-request-convention.yml new file mode 100644 index 000000000000..12db710b6d9a --- /dev/null +++ b/.github/workflows/check-pull-request-convention.yml @@ -0,0 +1,19 @@ +name: "Check Pull Request title convention" +on: + pull_request: + branches: [master] + types: [opened, edited, reopened, ready_for_review, synchronize] +permissions: + contents: read +jobs: + check-pr-title-convention: + name: Check that title follows convention + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: Slashgear/action-check-pr-title@161cede0311ec624ae3ee76a2c27522f7b6fa2d8 + with: + regexp: "[[a-z]]+.+(#[0-9]+)" + flags: "gm" + helpMessage: "Format: '[component] Message (#issuenumber)', see https://github.com/OpenCTI-Platform/opencti/blob/master/CONTRIBUTING.md#how-can-you-contribute" \ No newline at end of file From 4960f946e25ebccb941bf318b42b413e3bbb6dc8 Mon Sep 17 00:00:00 2001 From: Angelique Jard Date: Wed, 25 Feb 2026 18:50:57 +0100 Subject: [PATCH 2/4] New regexpr --- .github/workflows/check-pull-request-convention.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-pull-request-convention.yml b/.github/workflows/check-pull-request-convention.yml index 12db710b6d9a..18e346c38baf 100644 --- a/.github/workflows/check-pull-request-convention.yml +++ b/.github/workflows/check-pull-request-convention.yml @@ -7,6 +7,7 @@ permissions: contents: read jobs: check-pr-title-convention: + if: ! contains( github.event.pull_request.labels.*.name, 'dependencies') name: Check that title follows convention runs-on: ubuntu-latest permissions: @@ -14,6 +15,6 @@ jobs: steps: - uses: Slashgear/action-check-pr-title@161cede0311ec624ae3ee76a2c27522f7b6fa2d8 with: - regexp: "[[a-z]]+.+(#[0-9]+)" + regexp: "^\[[a-z]+.+\].+\((#[0-9]+)\)$" flags: "gm" helpMessage: "Format: '[component] Message (#issuenumber)', see https://github.com/OpenCTI-Platform/opencti/blob/master/CONTRIBUTING.md#how-can-you-contribute" \ No newline at end of file From 54365349f5e7e432e36dc18f26b94035a9943e52 Mon Sep 17 00:00:00 2001 From: Angelique Jard Date: Wed, 25 Feb 2026 18:52:15 +0100 Subject: [PATCH 3/4] Is it working better with single quote ? --- .github/workflows/check-pull-request-convention.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-pull-request-convention.yml b/.github/workflows/check-pull-request-convention.yml index 18e346c38baf..527c70b68278 100644 --- a/.github/workflows/check-pull-request-convention.yml +++ b/.github/workflows/check-pull-request-convention.yml @@ -15,6 +15,6 @@ jobs: steps: - uses: Slashgear/action-check-pr-title@161cede0311ec624ae3ee76a2c27522f7b6fa2d8 with: - regexp: "^\[[a-z]+.+\].+\((#[0-9]+)\)$" + regexp: '^\[[a-z]+.+\].+\((#[0-9]+)\)$' flags: "gm" helpMessage: "Format: '[component] Message (#issuenumber)', see https://github.com/OpenCTI-Platform/opencti/blob/master/CONTRIBUTING.md#how-can-you-contribute" \ No newline at end of file From 351335d2729c310019d5b622e52c51c02730ae93 Mon Sep 17 00:00:00 2001 From: Angelique Jard Date: Wed, 25 Feb 2026 18:58:14 +0100 Subject: [PATCH 4/4] Add or for deps --- .github/workflows/check-pull-request-convention.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/check-pull-request-convention.yml b/.github/workflows/check-pull-request-convention.yml index 527c70b68278..40a9f8f925ad 100644 --- a/.github/workflows/check-pull-request-convention.yml +++ b/.github/workflows/check-pull-request-convention.yml @@ -7,7 +7,6 @@ permissions: contents: read jobs: check-pr-title-convention: - if: ! contains( github.event.pull_request.labels.*.name, 'dependencies') name: Check that title follows convention runs-on: ubuntu-latest permissions: @@ -15,6 +14,6 @@ jobs: steps: - uses: Slashgear/action-check-pr-title@161cede0311ec624ae3ee76a2c27522f7b6fa2d8 with: - regexp: '^\[[a-z]+.+\].+\((#[0-9]+)\)$' + regexp: '^\[[a-z]+.+\].+\((#[0-9]+)\)$|^\[deps\].+' flags: "gm" helpMessage: "Format: '[component] Message (#issuenumber)', see https://github.com/OpenCTI-Platform/opencti/blob/master/CONTRIBUTING.md#how-can-you-contribute" \ No newline at end of file