-
Notifications
You must be signed in to change notification settings - Fork 17
ci: add GitHub Actions for commitlint and DCO checks #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@thedevyashsaini @sapatevaibhav . Can you check and review the PR |
pull_request: | ||
branches: [ master, main ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a types: filter to the pull_request trigger to avoid unnecessary runs
.github/workflows/commitlint.yml
Outdated
npm install --save-dev @commitlint/config-conventional @commitlint/cli | ||
|
||
- name: Validate current commit (last commit) with commitlint | ||
if: github.event_name == 'push' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
block is irrelevant as this workflow is only triggered on pull_request
.github/workflows/commitlint.yml
Outdated
|
||
- name: Install dependencies | ||
run: | | ||
npm install --save-dev @commitlint/config-conventional @commitlint/cli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Install dependencies should use --no-save instead of --save-dev
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'type-enum': [ | ||
2, | ||
'always', | ||
[ | ||
'build', | ||
'chore', | ||
'ci', | ||
'docs', | ||
'feat', | ||
'fix', | ||
'perf', | ||
'refactor', | ||
'revert', | ||
'style', | ||
'test' | ||
] | ||
], | ||
'subject-case': [2, 'never', ['start-case', 'pascal-case', 'upper-case']], | ||
'subject-empty': [2, 'never'], | ||
'subject-full-stop': [2, 'never', '.'], | ||
'header-max-length': [2, 'always', 72] | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add comments for team clarity
Signed-off-by: zoxilsi <[email protected]>
@thedevyashsaini Made changes as per your review. Do check it out |
is |
NOT directly relevant for the specific review feedback IS relevant for overall project improvement:
|
@thedevyashsaini can you review the pr |
@sapatevaibhav Review the pr and give me update |
Another PR is opened for the PR #31 template specifically, so remove that part |
i commited this 3 days ago . |
^-^ |
@sapatevaibhav what is the issue still its not merged and close the pr or the issue |
@thedevyashsaini Except PR template is everything ok? |
Yes just looking for Mentors confirmation. |
ur being asked to remove the file cuz u can't just write anything in the description and then change random things - someone else is also working on the PR template thing... if u feel like merging multiple issues, u gotta mention that first so that other people don't waster their time on it. Just remove that file and the PR is good to go.... |
yea |
🎯 Purpose
This PR adds automated commit message validation and DCO (Developer Certificate of Origin) enforcement to ensure code quality and legal compliance for all contributions.
✨ Changes
Commitlint Workflow (
.github/workflows/commitlint.yml
)@commitlint/config-conventional
feat:
,fix:
,docs:
)DCO Check Workflow (
.github/workflows/dco.yml
)Signed-off-by:
lineCommitlint Configuration (
commitlint.config.js
)🔧 How It Works
Both workflows trigger automatically on pull requests to
master
andmain
branches. They will:📋 Next Steps
After merging, enable these as required status checks in branch protection settings to enforce compliance.
🧪 Testing
These workflows can be tested by creating PRs with both valid and invalid commit messages/signatures.
closes #13