commitlint-github-action icon indicating copy to clipboard operation
commitlint-github-action copied to clipboard

Only my first push is succeeding.

Open samuelgoldenbaum opened this issue 2 years ago • 0 comments

I may be using this incorrectly, but I am only able to get my first push to succeed.

  1. Commit with a valid commit message and all works as expected and push succeeds.
  2. Commit again with a valid commit message and the push is rejected.

Error:

remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote: error: GH006: Protected branch update failed for refs/heads/chore/12.
remote: error: Required status check "commitlint" is expected.
To github.com:name/repo.git
 ! [remote rejected] chore/12 -> chore/12 (protected branch hook declined)
error: failed to push some refs to 'github.com:name/repo.git'

commitlint.yml:

name: Lint Commit Messages
on: [pull_request, push]

jobs:
  commitlint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - uses: wagoid/commitlint-github-action@v5 
        with:
          failOnWarnings: true

I have a branch pattern to run the workflow: image

I can confirm it works on the first push, but fails with the error above on subsequent pushes. First push: image

Am I doing something wrong here?

samuelgoldenbaum avatar Jul 02 '22 05:07 samuelgoldenbaum