CondeNast / conventional-pull-request-action

Lint pull requests with the conventional commit spec, for a clean and conventional commit history
Apache License 2.0
15 stars 9 forks source link

Trouble with breaking changes #12

Closed jenstroeger closed 3 years ago

jenstroeger commented 3 years ago

Expected Behavior

Don’t flag a PR title as conflicting the commit subject.

Actual Behavior

PR title conflicts commit subject.

Steps to Reproduce the Problem

  1. Create a single commit with message:

    feat: Something
    
    BREAKING CHANGE: Something
  2. Push, then create a PR from this single commit with the title feat: Something which is the same as the commit subject. However, because of the BREAKING CHANGE a conflict is detected.
  3. Amend the commit to remove the BREAKING CHANGE line, force-push once more, and the checks succeed just fine.

Also, the spec allows feat!: Something as a commit subject which causes

Error: Commit message: subject may not be empty
Error: Commit message: type may not be empty
Error: COMMIT: PRs with a single commit require the commit message to conform to the conventional commit spec

although the PR title and commit subject contain the same strings.

mattbedell commented 3 years ago

Thanks for submitting this issue! Both bugs have been addressed in v0.1.1 via #13 and #14.

Let us know if anything does not work as expected after the github action version is bumped to CondeNast/conventional-pull-request-action@v0.1.1in your repo.

Thanks again for the bug report!