-
Notifications
You must be signed in to change notification settings - Fork 34
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
No commits to check on all pull_request
event
#8
Comments
pull_request
event
@weizhangfd did you ever find a solution to this? |
.. just hit the same issue.. |
Hitting the same issue with one of my repos. Albeit, it seems to work on a test repo that I created for the purpose of testing the action. I have a name: Check Commit Hygiene 💬
on:
pull_request:
branches:
- main
- dev
jobs:
verify:
name: Conventional Commits
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
name: Checkout code
- uses: webiny/[email protected]
name: Check if commit messages are compliant |
@pallabpain So, a PR from dev->main triggers an error if the commit messages are not convetional? My setup looks somewhat similar - but the error triggers on the main branch, when it's too late. |
You can take a look at this test repo that I created: https://github.com/pallabpain/conventional-commits-action The main doesn't yet have the However, with another repository with a similar branch structure, it's not detecting the commits. Edit: FYI, I have deleted the test repo. |
I have a private repo and It's not working for me, and I get this warning:
name: commit
on:
pull_request:
branches: [ develop ]
jobs:
commits:
name: check commit message
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check message commit message
uses: webiny/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
label:
needs: commits
runs-on: ubuntu-latest
steps:
- uses: bcoe/conventional-release-labels@v1 |
@JobaDiniz The fix was recently pushed to |
I do use the latest commit of this repo, but I still get the name: Conventional Commits
on:
pull_request:
branches: [ main ]
jobs:
build:
name: Check conventional commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: webiny/action-conventional-commits@8b3a60d2b73588beb378929c08f1a12116312bad
# optional, required for private repos
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
And it seems this library only check for I'm using this other check-commit-message:
name: check commit message
runs-on: ubuntu-latest
steps:
- name: Check message against regex
uses: gsactions/commit-message-checker@v2
with:
pattern: '(?:build|docs|refactor|test|fix|perf|chore|feat)(?:\(\w+\))?:\s[a-z]{1,2}.+'
error: "The commit message must follow the commit messages guidelines"
excludeDescription: 'true' # optional: this excludes the description body of a pull request
excludeTitle: 'true' # optional: this excludes the title of a pull request
checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request
accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true |
I believe I have this working as some folks in this thread want it to: https://github.com/transitmatters/mbta-slow-zone-bot/actions/workflows/commit.yml Can see how I set it up here: https://github.com/transitmatters/mbta-slow-zone-bot/blob/main/.github/workflows/commit.yml |
It's 2025 now. Has anyone found a way to get this to work reliably? |
@jorgegonzalez nope - I'm using |
For posterity: I discovered the cocogitto tool yesterday and it solved all my issues! https://github.com/cocogitto/cocogitto-bot |
Hello,
Thank you for the super useful action! We have used multiple event triggers, and for
pull_request
, the git action always says there is no commit to check. See example below.The definition is
Can you advise? Thank you!
The text was updated successfully, but these errors were encountered: