Skip to content

Conversation

@quic-mtharu
Copy link
Contributor

Description

This pull request introduces a GitHub Action to enforce consistent commit message formatting across Qualcomm projects. The action helps maintain clarity and readability in commit history by validating key aspects of commit messages.


Key Features

  • Commit Subject Validation
    • Ensures a subject line is present.
    • Verifies subject does not exceed the configured character limit.
  • Commit Body Validation
    • Requires a commit body.
    • Enforces word wrap limit for each line.
  • Blank Line Check
    • When enabled, ensures a blank line between:
      • Subject and body
      • Body and Signed-off-by signature
    • Improves overall readability.

Why This Change?

Consistent commit messages improve collaboration, code reviews, and project traceability. This action automates enforcement, reducing manual checks and errors.


- Enforces consistent commit message formatting
- Validates commit subject presence and character limit
- Ensures commit body exists and adheres to word wrap limit
- Adds optional blank line check between subject, body and
  Signed-off-by signature for readability

Signed-off-by: Tharun Kumar Merugu <mtharu@qti.qualcomm.com>
with:
body-char-limit: 72
sub-char-limit: 50
check-blank-line: true No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

missing EoL

Copy link

@quic-ggopal quic-ggopal left a comment

Choose a reason for hiding this comment

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

Looks good to me

@ynancher
Copy link

ynancher commented Dec 3, 2025

Looks good to me

types: [opened, synchronize, reopened]

jobs:
check-commits:
Copy link
Contributor

Choose a reason for hiding this comment

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

quick suggestion:
I would suggest commit-message-lint as it describes what the job does.
check-commits means a lot to me seeing in a high level view.

uses: qualcomm/commit-msg-check-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Copy link
Contributor

Choose a reason for hiding this comment

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

I’d also recommend adding a required Signed-off-by line in commits.
This helps to maintain consistency across the commits and improves clarity of commit history.

Copy link

Choose a reason for hiding this comment

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

Hi @thiru31 , most open source repos in qualcomm are using this for Signed-off-by checks, which is why i dint add it. Please take a look -> https://probot.github.io/apps/dco

If this is a requirement by most teams and if we would rather have a check that is done in this qualcomm checker, then we can add that too


steps:
- name: Run custom commit check
uses: qualcomm/commit-msg-check-action@main
Copy link

Choose a reason for hiding this comment

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

Also, sorry for all the last minute changes, but I recently created a release tag for this checker instead of using the main branch: https://github.com/qualcomm/commit-msg-check-action/releases/tag/v1.0.0
Please make this 'v1.0.0' instead of 'main', for better stability and to ensure that this checker doesnt break due to any changes in the main branch

@ynancher
Copy link

ynancher commented Dec 9, 2025

NOTE: Wont be needing this change since we are planning on adding this checker to qcom-preflight-checks.yml

@lumag
Copy link
Contributor

lumag commented Dec 9, 2025

I strongly recommend not accepting the change here. It's not infrequent when FastRPC messages must include console logs. Adding these checks would make it wery hard to do, as console logs can span behind 72 chars boundary, etc.

@ynancher
Copy link

ynancher commented Dec 9, 2025

I strongly recommend not accepting the change here. It's not infrequent when FastRPC messages must include console logs. Adding these checks would make it wery hard to do, as console logs can span behind 72 chars boundary, etc.

Hi @lumag , this limit for the subject and body word wrap limit can be set by each tech team. It is customizable. Even the blank line check can be toggled to true or false based on the tech teams requirement

@lumag
Copy link
Contributor

lumag commented Dec 9, 2025

Which limits would you suggest for this project, where we can have kernel or userspace logs in the commit messages?
I recommend none, which means skipping this check at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants