Skip to content

feat(ci): add new ci for commit format checking#186

Merged
deo002 merged 1 commit intofossology:mainfrom
im-vishesh15th:feat/commitci
Feb 5, 2026
Merged

feat(ci): add new ci for commit format checking#186
deo002 merged 1 commit intofossology:mainfrom
im-vishesh15th:feat/commitci

Conversation

@im-vishesh15th
Copy link
Copy Markdown
Contributor

issue#182

Changes

  • Added a GitHub Actions workflow to validate commit messages on pull requests
  • Enforces the existing commit message convention:
    <type>(<scope>): <subject>
  • Ignores auto-generated merge commits created by GitHub during PR checks
  • Ensures only human-authored commits are validated

Example of a valid commit message

ci(github-actions): enforce commit message convention on pull requests

Submitter Checklist

  • Includes tests (if there is a feature changed/added)
  • Includes docs ( if changes are user facing)
  • I have tested my changes locally.

@im-vishesh15th
Copy link
Copy Markdown
Contributor Author

Hi @deo002 and @ChayanDass,
adding a local pre-commit or commit-msg hook to validate commit messages could improve the contributor experience, instead of checking them only during PRs.

what do you think about it ?

@deo002
Copy link
Copy Markdown
Collaborator

deo002 commented Jan 7, 2026

Yep, sounds perfect! @im-vishesh15th

Comment thread .github/workflows/commit-message.yml Outdated
@Kaushl2208
Copy link
Copy Markdown
Member

Hi @im-vishesh15th , Instead of creating specific regex and scripting your way out we can utilise, already provided tools from github actions (helps us reduce maintainability). Here are the links to such:

Lint Commits: https://github.com/fossology/fossology/blob/792818e5d6968c6fbe19193f25d2c54e8ea31e90/.github/workflows/static-checks.yml#L120

Also include the DCO Check:

https://github.com/fossology/fossology/blob/792818e5d6968c6fbe19193f25d2c54e8ea31e90/.github/workflows/static-checks.yml#L139

And we dont need a pre-commit check for now. Tests in CI for each PR will do just fine.

@im-vishesh15th
Copy link
Copy Markdown
Contributor Author

Hey @deo002 and @Kaushl2208
I have corrected the workflow according to your suggestions ,
Please have a look , and let me know is any further changes required

@Kaushl2208
Copy link
Copy Markdown
Member

@im-vishesh15th , Looks good now. Can you rebase the branch?

@im-vishesh15th
Copy link
Copy Markdown
Contributor Author

I have done the rebase

Copy link
Copy Markdown
Member

@Kaushl2208 Kaushl2208 left a comment

Choose a reason for hiding this comment

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

LGTM..
Thanks for your contributions @im-vishesh15th

@Kaushl2208 Kaushl2208 enabled auto-merge January 13, 2026 09:10
@Kaushl2208 Kaushl2208 disabled auto-merge January 13, 2026 09:10
@Kaushl2208
Copy link
Copy Markdown
Member

Hi @im-vishesh15th , Can you also add a verified signature to your commit.
Here is the help docs: Sign Commits

Signed-off-by: Vishesh Gupta <vishesh15th@gmail.com>
@im-vishesh15th
Copy link
Copy Markdown
Contributor Author

i have verified and signed my commits, please check!

@deo002 deo002 merged commit 6f8197b into fossology:main Feb 5, 2026
17 of 19 checks passed
@im-vishesh15th im-vishesh15th deleted the feat/commitci branch February 13, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants