-
Notifications
You must be signed in to change notification settings - Fork 8
chore: skip commit validation for Dependabot PRs #17
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
Co-authored-by: nickytonline <833231+nickytonline@users.noreply.github.com>
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.
Pull Request Overview
This PR excludes Dependabot PRs from conventional commit validation to prevent workflow failures caused by Dependabot's non-conforming commit message format.
- Added conditional check to skip commit validation for Dependabot bot
- Preserves strict validation for human-authored commits
- Resolves workflow failures without weakening overall commit standards
@copilot I get this The job failed due to a commit message that violates the conventional commit rules enforced by commitlint. The specific error is: ✖ subject may not be empty [subject-empty] This means at least one of your commit messages is missing a subject line after the commit type. For example, a message like this would fail: fix: To resolve this: Amend the problematic commit(s) to have a non-empty subject. For example, change from: fix: to: fix: add initial plan For more details, see the commitlint documentation: https://github.com/conventional-changelog/commitlint/#what-is-commitlint |
You're right - the "Initial plan" commit message doesn't follow the conventional commit format. It should be "chore: initial plan" instead. Unfortunately, I cannot rebase or force-push to fix commit messages that are already pushed to the remote branch. The commit with message "Initial plan" (700f598) was created as an empty progress tracking commit and is now part of the PR history. To resolve this, you have two options:
Which approach would you prefer? |
48546f4
to
9841e74
Compare
The actual fix is in this commit, 9ba8dfd |
Problem
Dependabot PRs were failing the conventional commits linting workflow because Dependabot generates commit messages that follow its own format and may include long body text that doesn't conform to the repository's conventional commit standards.
See the failed job run: https://github.com/nickytonline/mcp-typescript-template/actions/runs/18504141130/job/52728637696#step:4:1
Solution
Modified the
validate-commits.yml
workflow to skip commit message validation for Dependabot PRs by adding a conditional statement:This ensures that:
Why This Approach?
This is the industry-standard approach for handling automated bot commits:
Closes #issue_number
Original prompt
Fixes #16
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.