From 1fda84712e86e406de3288a556531171788807a1 Mon Sep 17 00:00:00 2001 From: Brice Schaffner Date: Tue, 25 Aug 2026 11:16:28 +0200 Subject: [PATCH] GPS-835: Allowed conventional commit subjects The team agreed during refinement that PR titles and commit messages should accept the selected Conventional Commit formats in addition to Jira issue keys. The PR content validator now accepts chore, fix, feat, revert, and docs types with an optional non-empty scope. --- .github/workflows/pr-content.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-content.yml b/.github/workflows/pr-content.yml index 1c7a596..14ba6f0 100644 --- a/.github/workflows/pr-content.yml +++ b/.github/workflows/pr-content.yml @@ -1,7 +1,7 @@ name: PR Content Validation Reusable Workflow # Validate the PR content as follow: -# - PR title matches the pattern ^((()-\d+)+|chore): .+$ and does not contain "wip" +# - PR title uses a configured Jira issue key or an allowed Conventional Commit type and does not contain "wip" # - PR description is not empty # - All commit messages match the same pattern as the PR title @@ -49,7 +49,9 @@ jobs: const title = context.payload.pull_request.title; const jiraProjectKeys = JSON.parse(process.env.JIRA_PROJECT_KEYS); - const titlePattern = new RegExp(`^(((${jiraProjectKeys.join("|")})-\\d+)+|chore(\\(deps\\))?): .+$`); + const titlePattern = new RegExp( + `^(((${jiraProjectKeys.join("|")})-\\d+)+|(chore|fix|feat|revert|docs)(\\([^()]+\\))?): .+$` + ); if (!titlePattern.test(title)) { core.setFailed(`PR title "${title}" does not match the required pattern: ${titlePattern}`); @@ -102,7 +104,9 @@ jobs: } const jiraProjectKeys = JSON.parse(process.env.JIRA_PROJECT_KEYS); - const titlePattern = new RegExp(`^(((${jiraProjectKeys.join("|")})-\\d+)+|chore(\\(deps\\))?): .+$`); + const titlePattern = new RegExp( + `^(((${jiraProjectKeys.join("|")})-\\d+)+|(chore|fix|feat|revert|docs)(\\([^()]+\\))?): .+$` + ); const commits = await github.paginate(github.rest.pulls.listCommits, { owner: context.repo.owner,