From d9f4d381c7225677c0cbb900a42d613a41d22c06 Mon Sep 17 00:00:00 2001 From: Marcin Wojciechowski Date: Fri, 31 Jul 2026 11:08:24 +0200 Subject: [PATCH 1/6] first try --- .github/workflows/commit_message_format.yml | 67 +++++---------------- 1 file changed, 14 insertions(+), 53 deletions(-) diff --git a/.github/workflows/commit_message_format.yml b/.github/workflows/commit_message_format.yml index f7975a3c4..b2ecd4a8e 100644 --- a/.github/workflows/commit_message_format.yml +++ b/.github/workflows/commit_message_format.yml @@ -40,68 +40,29 @@ jobs: uses: mshick/add-pr-comment@v2 with: message: | - Pull request must be merged with a description containing the required fields, + Pull request must follow the Commit message format for RDK-E: + https://etwiki.sys.comcast.net/spaces/RDKAR/pages/1407997180/Commit+Message+Format+For+RDKE - Summary: - Type: Feature/Fix/Cleanup - Test Plan: - Jira: + 1. Associated JIRA ticket in format : : + 2. Detailed reason for change information + 3. Test procedure. Only references links to Jira ticket or sub tickets where test steps and references are captured. - If there is no jira releated to this change, please put 'Jira: NO-JIRA'. - - Description can be changed by editing the top comment on your pull request and making a new commit. + : + + Reason for change: + Test Procedure: < https://ccp.sys.comcast.net/browse/JIRA TICKET #1/url/to/test_step_section> # Check PR description for 'Summary:' field. - - name: Match 'Summary:' - uses: actions-ecosystem/action-regex-match@v2 - id: summary-match - if: failure() || success() - with: - text: ${{ github.event.pull_request.body }} - regex: 'Summary:\s*[\s\S]*?' - flags: gm - - - name: Check 'Summary:' - if: (failure() || success()) && (steps.summary-match.outputs.match == '') - run: exit 1 - - # Check PR description for 'Type: Feature|Fix|Cleanup' field. - - name: Match 'Type:' - uses: actions-ecosystem/action-regex-match@v2 - id: type-match - if: failure() || success() - with: - text: ${{ github.event.pull_request.body }} - regex: 'Type:\s*Feature|Fix|Cleanup' - - - name: Check 'Type:' - if: (failure() || success()) && (steps.type-match.outputs.match == '') - run: exit 1 - - # Check PR description for 'Test Plan:' field. - - name: Match 'Test Plan:' - uses: actions-ecosystem/action-regex-match@v2 - id: test-plan-match - if: failure() || success() - with: - text: ${{ github.event.pull_request.body }} - regex: 'Test Plan:\s*[\s\S]*?' - - - name: Check 'Test Plan:' - if: (failure() || success()) && (steps.test-plan-match.outputs.match == '') - run: exit 1 - - # Check PR description for 'Jira:' field. - - name: Match 'Jira:' + - name: Match Commit message uses: actions-ecosystem/action-regex-match@v2 - id: jira-match + id: commit-message-match if: failure() || success() with: text: ${{ github.event.pull_request.body }} - regex: 'Jira:\s*[\s\S]*?' + regex: (?s)^([A-Z][A-Z0-9]+-\d+): (.{1,64})\R\RReason for change:.*?(?:\RTest Procedure:.*)?$ - - name: Check 'Jira:' - if: (failure() || success()) && (steps.jira-match.outputs.match == '') + - name: Check Commit message + if: (failure() || success()) && (steps.commit-message-match.outputs.match == '') run: exit 1 # Print description. From f9d85dfb6aa6b3354a792e52923c46cd68596c22 Mon Sep 17 00:00:00 2001 From: Marcin Wojciechowski Date: Fri, 31 Jul 2026 11:14:21 +0200 Subject: [PATCH 2/6] Add title check --- .github/workflows/commit_message_format.yml | 22 ++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/commit_message_format.yml b/.github/workflows/commit_message_format.yml index b2ecd4a8e..e933728b0 100644 --- a/.github/workflows/commit_message_format.yml +++ b/.github/workflows/commit_message_format.yml @@ -40,7 +40,10 @@ jobs: uses: mshick/add-pr-comment@v2 with: message: | - Pull request must follow the Commit message format for RDK-E: + Pull request title must follow the pattern: + : + + Pull request description must follow the Commit message format for RDK-E: https://etwiki.sys.comcast.net/spaces/RDKAR/pages/1407997180/Commit+Message+Format+For+RDKE 1. Associated JIRA ticket in format : : @@ -52,17 +55,26 @@ jobs: Reason for change: Test Procedure: < https://ccp.sys.comcast.net/browse/JIRA TICKET #1/url/to/test_step_section> - # Check PR description for 'Summary:' field. - - name: Match Commit message + # Check PR title + - name: Match PR title + uses: actions-ecosystem/action-regex-match@v2 + id: pr-title-match + if: failure() || success() + with: + text: ${{ github.event.pull_request.title }} + regex: ^[A-Z][A-Z0-9]+-\d+: .{1,64}$ + + # Check PR body + - name: Match PR Body uses: actions-ecosystem/action-regex-match@v2 - id: commit-message-match + id: pr-body-match if: failure() || success() with: text: ${{ github.event.pull_request.body }} regex: (?s)^([A-Z][A-Z0-9]+-\d+): (.{1,64})\R\RReason for change:.*?(?:\RTest Procedure:.*)?$ - name: Check Commit message - if: (failure() || success()) && (steps.commit-message-match.outputs.match == '') + if: (failure() || success()) && (steps.pr-body-match.outputs.match == '') run: exit 1 # Print description. From c393ad7d0833c5dc4ec1379dd8949ae0edb58948 Mon Sep 17 00:00:00 2001 From: Marcin Wojciechowski Date: Fri, 31 Jul 2026 11:29:55 +0200 Subject: [PATCH 3/6] 2nd try --- .github/workflows/commit_message_format.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/commit_message_format.yml b/.github/workflows/commit_message_format.yml index e933728b0..92e4febe7 100644 --- a/.github/workflows/commit_message_format.yml +++ b/.github/workflows/commit_message_format.yml @@ -62,7 +62,7 @@ jobs: if: failure() || success() with: text: ${{ github.event.pull_request.title }} - regex: ^[A-Z][A-Z0-9]+-\d+: .{1,64}$ + regex: '^[A-Z][A-Z0-9]+-\d+: .{1,64}$' # Check PR body - name: Match PR Body @@ -71,7 +71,7 @@ jobs: if: failure() || success() with: text: ${{ github.event.pull_request.body }} - regex: (?s)^([A-Z][A-Z0-9]+-\d+): (.{1,64})\R\RReason for change:.*?(?:\RTest Procedure:.*)?$ + regex: '(?s)^([A-Z][A-Z0-9]+-\d+): (.{1,64})\R\RReason for change:.*?(?:\RTest Procedure:.*)?$' - name: Check Commit message if: (failure() || success()) && (steps.pr-body-match.outputs.match == '') From 5f3d16c1d99d695397fcaa2a5f57c62e37308803 Mon Sep 17 00:00:00 2001 From: Marcin Wojciechowski Date: Fri, 31 Jul 2026 12:31:00 +0200 Subject: [PATCH 4/6] third try --- .github/workflows/commit_message_format.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/commit_message_format.yml b/.github/workflows/commit_message_format.yml index 92e4febe7..ba303744f 100644 --- a/.github/workflows/commit_message_format.yml +++ b/.github/workflows/commit_message_format.yml @@ -71,7 +71,7 @@ jobs: if: failure() || success() with: text: ${{ github.event.pull_request.body }} - regex: '(?s)^([A-Z][A-Z0-9]+-\d+): (.{1,64})\R\RReason for change:.*?(?:\RTest Procedure:.*)?$' + regex: '^([A-Z][A-Z0-9]+-\d+): (.{1,64})\r?\n\r?\nReason for change:([\s\S]*?)(?:\r?\nTest Procedure:([\s\S]*))?$' - name: Check Commit message if: (failure() || success()) && (steps.pr-body-match.outputs.match == '') From 0507b3afb600965b9e18249dccbbe652051a5bc3 Mon Sep 17 00:00:00 2001 From: Marcin Wojciechowski Date: Fri, 31 Jul 2026 12:39:37 +0200 Subject: [PATCH 5/6] comment message changed --- .github/workflows/commit_message_format.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/commit_message_format.yml b/.github/workflows/commit_message_format.yml index ba303744f..bbd2ff19e 100644 --- a/.github/workflows/commit_message_format.yml +++ b/.github/workflows/commit_message_format.yml @@ -41,19 +41,19 @@ jobs: with: message: | Pull request title must follow the pattern: - : + : Pull request description must follow the Commit message format for RDK-E: https://etwiki.sys.comcast.net/spaces/RDKAR/pages/1407997180/Commit+Message+Format+For+RDKE - 1. Associated JIRA ticket in format : : + 1. Associated JIRA ticket in format : : 2. Detailed reason for change information 3. Test procedure. Only references links to Jira ticket or sub tickets where test steps and references are captured. - : + : Reason for change: - Test Procedure: < https://ccp.sys.comcast.net/browse/JIRA TICKET #1/url/to/test_step_section> + Test Procedure: < https://ccp.sys.comcast.net/browse/JIRA TICKET/url/to/test_step_section> # Check PR title - name: Match PR title From c0dafbe674367299db06ab7c419e400465d719b3 Mon Sep 17 00:00:00 2001 From: Marcin Wojciechowski Date: Fri, 31 Jul 2026 13:04:53 +0200 Subject: [PATCH 6/6] comment message changed 2 --- .github/workflows/commit_message_format.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/commit_message_format.yml b/.github/workflows/commit_message_format.yml index bbd2ff19e..6d706f118 100644 --- a/.github/workflows/commit_message_format.yml +++ b/.github/workflows/commit_message_format.yml @@ -41,17 +41,17 @@ jobs: with: message: | Pull request title must follow the pattern: - : + < JIRA TICKET >: < one line summary of change less than 65 characters > Pull request description must follow the Commit message format for RDK-E: https://etwiki.sys.comcast.net/spaces/RDKAR/pages/1407997180/Commit+Message+Format+For+RDKE - 1. Associated JIRA ticket in format : : + 1. Associated JIRA ticket in format : < JIRA TICKET >: < one line summary of change less than 65 characters > 2. Detailed reason for change information 3. Test procedure. Only references links to Jira ticket or sub tickets where test steps and references are captured. - : - + < JIRA TICKET >: < one line summary of change less than 65 characters > + < empty line > Reason for change: Test Procedure: < https://ccp.sys.comcast.net/browse/JIRA TICKET/url/to/test_step_section>