Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 15, 2025

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:

if: github.actor != 'dependabot[bot]'

This ensures that:

  • Dependabot can freely update dependencies without being blocked by commit message format requirements
  • Human-authored commits continue to be validated against conventional commit standards
  • No changes are needed to commitlint configuration or rules

Why This Approach?

This is the industry-standard approach for handling automated bot commits:

  1. Minimal Change: Only 2 lines added to the workflow file
  2. No Breaking Changes: Validation for human contributors remains strict
  3. Clean Solution: Better than weakening validation rules for all commits or extending body length limits globally
  4. Proven Pattern: Widely used across open-source projects to handle bot-generated commits

Closes #issue_number

Original prompt

This section details on the original issue you should resolve

<issue_title>have dependabot PRs ignored from the conventional commits linting or maybe extend the body length</issue_title>
<issue_description>It's be great to have dependabot PRs ignored from the conventional commits linting or maybe extend the body length.

See job failure here. https://github.com/nickytonline/mcp-typescript-template/actions/runs/18504141130/job/52728637696#step:4:1</issue_description>

Comments on the Issue (you are @copilot in this section)

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.

Co-authored-by: nickytonline <833231+nickytonline@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Update conventional commits linting for dependabot PRs chore: skip commit validation for Dependabot PRs Oct 15, 2025
@Copilot Copilot AI requested a review from nickytonline October 15, 2025 13:02
Copilot finished work on behalf of nickytonline October 15, 2025 13:02
nickytonline
nickytonline previously approved these changes Oct 15, 2025
@nickytonline nickytonline marked this pull request as ready for review October 15, 2025 14:11
@Copilot Copilot AI review requested due to automatic review settings October 15, 2025 14:11
Copy link

@Copilot Copilot AI left a 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

@nickytonline nickytonline dismissed their stale review October 15, 2025 14:31

linting fails

@nickytonline
Copy link
Owner

@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
If this is on a PR, you can reword your commits using: git rebase -i origin/main Then fix the commit messages, save, and force-push: git push --force

For more details, see the commitlint documentation: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

https://github.com/nickytonline/mcp-typescript-template/actions/runs/18529792938/job/52816382275?pr=17

Copy link
Contributor Author

Copilot AI commented Oct 15, 2025

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

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:

  1. Manually fix it: Run these commands locally:

    git rebase -i 85bc691
    # Change "pick" to "reword" for the "Initial plan" commit
    # Change message to: "chore: initial plan"
    git push --force
  2. Close this PR and I'll create a new one: I can open a fresh PR with only the workflow change and proper commit messages from the start.

Which approach would you prefer?

@Copilot Copilot AI requested a review from nickytonline October 15, 2025 14:34
Copilot finished work on behalf of nickytonline October 15, 2025 14:34
@nickytonline nickytonline force-pushed the copilot/ignore-dependabot-prs-linting branch from 48546f4 to 9841e74 Compare October 15, 2025 15:00
@nickytonline nickytonline merged commit 2e660bd into main Oct 15, 2025
9 of 14 checks passed
@nickytonline nickytonline deleted the copilot/ignore-dependabot-prs-linting branch October 15, 2025 15:01
@nickytonline
Copy link
Owner

The actual fix is in this commit, 9ba8dfd

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.

have dependabot PRs ignored from the conventional commits linting or maybe extend the body length

2 participants