Skip to content

RDKEMW-22790: Commit message validator change - #576

Merged
balasaraswathy-n merged 6 commits into
masterfrom
feature/RDKEMW-22790
Jul 31, 2026
Merged

RDKEMW-22790: Commit message validator change#576
balasaraswathy-n merged 6 commits into
masterfrom
feature/RDKEMW-22790

Conversation

@skywojciechowskim

Copy link
Copy Markdown
Contributor

RDKEMW-22790: Commit message validator change

Reason for change: Change the commit message validator to follow the official Commit Message Format For RDKE
Test Procedure: Rialto CI

Copilot AI review requested due to automatic review settings July 31, 2026 09:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the GitHub Actions PR metadata validator to align PR titles/descriptions with the “Commit Message Format For RDKE” requirements, so merge metadata is consistently structured across the repo.

Changes:

  • Replaces the prior “Summary/Type/Test Plan/Jira” body checks with a new commit-message-format-based template.
  • Adds PR title validation for <JIRA-1234>: <summary> and a consolidated PR body validation regex.
Suppressed comments (1)

.github/workflows/commit_message_format.yml:75

  • The PR body regex uses constructs that are not compatible with JavaScript RegExp (used by actions-ecosystem/action-regex-match): the inline modifier (?s) is invalid in JS, and \R is not a recognized escape (it will be treated as a literal 'R'), so this check will likely never match (or error). Also, the current regex makes Test Procedure: optional even though the workflow message states it is required.
      # Check PR body
      - name: Match PR Body
        uses: actions-ecosystem/action-regex-match@v2
        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:.*)?$


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +58 to 66
# Check PR title
- name: Match PR title
uses: actions-ecosystem/action-regex-match@v2
id: summary-match
id: pr-title-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
text: ${{ github.event.pull_request.title }}
regex: ^[A-Z][A-Z0-9]+-\d+: .{1,64}$

@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.4%
Functions coverage stays unchanged and is: 92.7%

Copilot AI review requested due to automatic review settings July 31, 2026 09:30
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

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 : < 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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

.github/workflows/commit_message_format.yml:63

  • The workflow matches the PR title against the required pattern, but never fails the job if it doesn't match. As a result, an invalid PR title would still pass this workflow. Add a follow-up step that exits non-zero when steps.pr-title-match.outputs.match is empty (similar to the PR body check).
      - name: Match PR title
        uses: actions-ecosystem/action-regex-match@v2
        id: pr-title-match
        if: failure() || success()
        with:

Comment on lines 72 to 75
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:.*)?$'

Copilot AI review requested due to automatic review settings July 31, 2026 10:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (2)

.github/workflows/commit_message_format.yml:74

  • The PR body regex makes the "Test Procedure:" section optional and also allows an empty "Reason for change:" section, but the workflow’s own guidance text says both fields are required. This means PRs can pass validation without providing required information.
          regex: '^([A-Z][A-Z0-9]+-\d+): (.{1,64})\r?\n\r?\nReason for change:([\s\S]*?)(?:\r?\nTest Procedure:([\s\S]*))?$'

.github/workflows/commit_message_format.yml:65

  • The PR title regex allows a summary that is only whitespace (e.g., "ABC-123: "), which violates the stated "one line summary" requirement. Consider requiring a non-whitespace character after the colon+space.
          regex: '^[A-Z][A-Z0-9]+-\d+: .{1,64}$'

Copilot AI review requested due to automatic review settings July 31, 2026 10:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (3)

.github/workflows/commit_message_format.yml:75

  • The PR body regex makes the "Test Procedure:" section optional and also allows an empty/whitespace-only "Reason for change" (e.g., a body ending at Reason for change: would still match). This weakens the validator compared to the format described in the workflow comment (items 2 and 3). Consider requiring both sections to be present and non-empty, and also avoid (.{1,64}) so a \r from CRLF can be counted as part of the one-line summary.
        with:
          text: ${{ github.event.pull_request.body }}
          regex: '^([A-Z][A-Z0-9]+-\d+): (.{1,64})\r?\n\r?\nReason for change:([\s\S]*?)(?:\r?\nTest Procedure:([\s\S]*))?$'

.github/workflows/commit_message_format.yml:56

  • The example "Test Procedure" line includes a leading space inside the angle brackets and a placeholder with spaces ("JIRA TICKET"), which makes the example URL look invalid. Tightening this helps reduce confusion for contributors.
            Test Procedure: < https://ccp.sys.comcast.net/browse/JIRA TICKET/url/to/test_step_section>

.github/workflows/commit_message_format.yml:76

  • Step name is misleading: this step validates the PR body format, not the commit message. Renaming it will make workflow logs easier to understand when it fails.
      - name: Check Commit message

Copilot AI review requested due to automatic review settings July 31, 2026 11:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (3)

.github/workflows/commit_message_format.yml:66

  • PR title validation isn't enforced: the regex match step always succeeds and only sets outputs, but there's no follow-up step that fails the job when pr-title-match.outputs.match is empty.
      - 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}$'

.github/workflows/commit_message_format.yml:75

  • The PR body regex makes Test Procedure: optional and allows an empty Reason for change: value, but the workflow message describes both as required fields. This will let incomplete PR descriptions pass validation.
        with:
          text: ${{ github.event.pull_request.body }}
          regex: '^([A-Z][A-Z0-9]+-\d+): (.{1,64})\r?\n\r?\nReason for change:([\s\S]*?)(?:\r?\nTest Procedure:([\s\S]*))?$'

.github/workflows/commit_message_format.yml:76

  • Step name is misleading: it validates the PR body format, not a commit message. Renaming avoids confusion when troubleshooting workflow failures.
      - name: Check Commit message

@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.4%
Functions coverage stays unchanged and is: 92.7%

@balasaraswathy-n
balasaraswathy-n self-requested a review July 31, 2026 12:31
@balasaraswathy-n
balasaraswathy-n merged commit f077747 into master Jul 31, 2026
51 of 54 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 31, 2026
@skywojciechowskim
skywojciechowskim deleted the feature/RDKEMW-22790 branch July 31, 2026 12:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants