Skip to content
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

Run the action with GitHub Action's merge_group event #757

Open
YossiSaadi opened this issue Feb 14, 2024 · 0 comments
Open

Run the action with GitHub Action's merge_group event #757

YossiSaadi opened this issue Feb 14, 2024 · 0 comments

Comments

@YossiSaadi
Copy link

TL;DR:

I'm using the merge_group event on GitHub, to check against the squashed commit that is about to be merged, and using merge queue only for this purpose, to prevent merge commits to not be commitlint.
For some reason, the action keeps on succeeding although it should fail.

An important note:

When I run this action in the pull_request event or push event it works correctly and fails the workflow!
so there's only an issue with the merge_group event.

See this repo: https://github.com/yossi-test-org/test-merge-queue
with this action: https://github.com/yossi-test-org/test-merge-queue/actions/workflows/commitlint.yml
and more specifically this action run: https://github.com/yossi-test-org/test-merge-queue/actions/runs/7897818307/job/21554034430
which ran on this commit: yossi-test-org/test-merge-queue@2f49ddb

Attached an image to summarize all (see the "Show commit message" step that makes sure what commitlint runs against):
image

name: Lint merge commit name
on:
  pull_request:
  merge_group:
    types: [checks_requested]
jobs:
  lint-commit-name:
    if: ${{ github.event_name == 'merge_group' }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 1
      - uses: wagoid/commitlint-github-action@v5

It's a required action, so it should fail the merge queue and to not merge this PR:
image
image

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

No branches or pull requests

1 participant