From 743dc68260b7f42c4b9753be81542e9bd1fd39f3 Mon Sep 17 00:00:00 2001 From: Julio Alves <30749275+julioohhhh@users.noreply.github.com> Date: Fri, 17 Jan 2025 18:17:01 +0000 Subject: [PATCH] improve regex --- .github/workflows/pr_jira_ticket.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_jira_ticket.yml b/.github/workflows/pr_jira_ticket.yml index c3b4e07..3779cc0 100644 --- a/.github/workflows/pr_jira_ticket.yml +++ b/.github/workflows/pr_jira_ticket.yml @@ -15,9 +15,9 @@ jobs: steps: - uses: deepakputhraya/action-pr-title@master with: - regex: '\b(?:JIRA-|DSOS-|DAT-|GDOPS-)\b' + regex: '^[A-Z]{1,10}-\d{1,10}(:?\s|$)' prefix_case_sensitive: false # title prefix are case insensitive min_length: 5 # Min length of the title max_length: 80 # Max length of the title - verbal_description: 'The PR title not contain any of the allowed JIRA projects (DSOS, DAT, GDOPS) IDs and number' # Verbal description of the regex rule + verbal_description: 'The PR title must begin with a valid JIRA project ticket ID, followed by a dash and a number. For example, a valid title would be DSOS-1234: Fix a critical issue. Ensure the title includes one of the allowed JIRA project keys (e.g., DSOS, DAT, GDOPS) in the format PROJECT-ID at the beginning.' # Verbal description of the regex rule github_token: ${{ github.token }}