From afe72a9d3e452b37230487bf190535005e0b9db2 Mon Sep 17 00:00:00 2001 From: Brice Schaffner Date: Wed, 4 Nov 2026 15:42:06 +0100 Subject: [PATCH] fix: allowed GitHub default revert PR/commit titles The previous pattern treated `Revert "` as a conventional commit type, so it still required a `: ` right after it. Titles generated by GitHub's revert button, such as `Revert "chore: foo"`, were therefore rejected. `Revert "` is now a separate alternative at the start of the title, next to the Jira and conventional commit prefixes, so these titles pass the check. --- .github/workflows/pr-content.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-content.yml b/.github/workflows/pr-content.yml index d8aa665..1d28148 100644 --- a/.github/workflows/pr-content.yml +++ b/.github/workflows/pr-content.yml @@ -56,7 +56,7 @@ jobs: const jiraProjectKeys = JSON.parse(process.env.JIRA_PROJECT_KEYS); const titlePattern = new RegExp( - `^(((${jiraProjectKeys.join("|")})-\\d+)+|(chore|fix|feat|revert|docs|Revert ")(\\([^()]+\\))?): .+$` + `^((((${jiraProjectKeys.join("|")})-\\d+)+|(chore|fix|feat|revert|docs)(\\([^()]+\\))?): |Revert ").+$` ); if (!titlePattern.test(title)) { @@ -121,7 +121,7 @@ jobs: const jiraProjectKeys = JSON.parse(process.env.JIRA_PROJECT_KEYS); const titlePattern = new RegExp( - `^(((${jiraProjectKeys.join("|")})-\\d+)+|(chore|fix|feat|revert|docs|Revert ")(\\([^()]+\\))?): .+$` + `^((((${jiraProjectKeys.join("|")})-\\d+)+|(chore|fix|feat|revert|docs)(\\([^()]+\\))?): |Revert ").+$` ); const commits = await github.paginate(github.rest.pulls.listCommits, {