Do we need to add a Github workflow for merge_group event?
I followed the instructions in your side, but pipeline was triggered when my pull request was added into Github merge queue, why the pull request was merged before the pipeline finished?
Do I need to update any configuration to make it works?
PR was auto merged because there were no status checks to look for the CI pipeline.
Could you modify below settings and let me know how it goes,
In the pipeline settings → branch limiting → along with the existing merge queue temporary branch filter could you add a space and configure the branch name where you’re pushing the changes?
In the pipeline settings → Github → Update commit status → enable Create a status for each job. This should create status check for your PR with the build kicked off with your changes which is allowed in step 1.
I’ve gone through your pipeline settings in Buildkite and GitHub, with the settings that Priya mentioned and you configured, everything seems perfect, with one little catch:
Under the "Require status checks to pass before merging " section of your branch protection rules in GitHub, I noticed that no status check is chosen.
After your Buildkite build has run, you should see the status checks listed here. They will appear with names like buildkite/{pipeline-name} . For example, if your pipeline name is master-merge-queue-pipeline , it will be listed as buildkite/master-merge-queue-pipeline . Select this and save the changes.
I understand this process can be a bit confusing as GitHub needs explicit mentioning of the status check in branch protection rules, even if Buildkite is set up to update commit statuses. This extra step ensures that GitHub is aware of which checks to enforce before allowing a merge.
If you encounter any issues or have further questions, please let us know. We are more than happy to assist you.