docs icon indicating copy to clipboard operation
docs copied to clipboard

No doc of `on.merge_group.<branches|branches-ignore>`

Open muzimuzhi opened this issue 1 year ago • 9 comments
trafficstars

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions

What part(s) of the article would you like to see updated?

GitHub Actions merge_group trigger supports branches filter since its beta release in Aug 2022, but it's not documented till now.

I guess the symmetric branches-ignore filter is also supported but didn't check it myself.

One option is to extend current section on.<pull_request|pull_request_target>.<branches|branches-ignore> to cover merge_group and taking care of old anchor name redirection. Or add a separate on.merge_group.<branches|branches-ignore> section.

Additional information

Relevant GitHub Blogs

  • Beta https://github.blog/changelog/2022-08-18-merge-group-webhook-event-and-github-actions-workflow-trigger/
  • Public beta https://github.blog/changelog/2023-04-19-pull-request-merge-queue-public-beta-api-support-and-recent-fixes/
  • Generally available https://github.blog/changelog/2023-07-12-pull-request-merge-queue-is-now-generally-available/

Related

  • https://github.com/actions/languageservices/pull/12
  • https://github.com/actions/languageservices/issues/18
  • Path filtering does not work for merge_group triggers https://github.com/orgs/community/discussions/45899

muzimuzhi avatar May 08 '24 19:05 muzimuzhi

@muzimuzhi Thank you for opening this issue! I'll get this triaged for review ✨

nguyenalex836 avatar May 08 '24 22:05 nguyenalex836

Sorry but I don't think this has been resolved.

muzimuzhi avatar Jul 17 '24 16:07 muzimuzhi

@muzimuzhi Apologies on behalf of our overzealous bot! I'll reopen this 💛

nguyenalex836 avatar Jul 17 '24 17:07 nguyenalex836

Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert :eyes:

github-actions[bot] avatar Jul 18 '24 18:07 github-actions[bot]

👋 I can confirm on behalf of the Actions team that branches-ignore is supported for merge_group events.

I validated this with two workflows - one on a regular merge_group and the other with a merge_group ignoring main

on:
  merge_group:
    branches-ignore: ["main"]

In this image, pull request 8 is the PR that added the branches-ignore: ["main"] to the "CI TWO" workflow. You can see that when that PR is added to the merge queue, the "CI" workflow without any branches-ignore is triggered by "CI TWO" is not triggered (as expected).

joshmgross avatar Jul 31 '24 19:07 joshmgross

Thank you very much for confirming, @joshmgross! ✨

One option is to extend current section on.<pull_request|pull_request_target>.<branches|branches-ignore> to cover merge_group and taking care of old anchor name redirection. Or add a separate on.merge_group.<branches|branches-ignore> section.

@SiaraMist Howdy! 👋 Do we have a preference on either approach for updating this doc?

nguyenalex836 avatar Jul 31 '24 19:07 nguyenalex836

Or add a separate on.merge_group.<branches|branches-ignore> section.

@muzimuzhi Lets go ahead with this approach! I've added the help wanted label so that you, or anyone else, is welcome to open a PR with this update 💛

nguyenalex836 avatar Sep 18 '24 21:09 nguyenalex836