I'm having issues when activating merge queue on my repository in github.
When my PR has ran it's worflow and i added it to the merge queue, it just sits there waiting for checks to run, but nothing is triggered.
If I click on the details button in the merge queue interface, it just says that my PR is waiting for checks to run but the list of checks is empty
Here are my github option for the branch i want to activate merge queue on:
I also added the merge_group tag on both worflow i want to run:
name: Build by changesets
on:
merge_group:
types:
- checks_requested
push:
branches:
- 'PAC/**'
pull_request:
types: [opened, synchronize, edited, reopened, ready_for_review]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ (github.event.action != 'edited') || github.event.changes.base.ref.from != '' }}
jobs:
Set_up_environment:
name: Compute environment variables
runs-on: [ self-hosted ]
if: github.event_name == 'merge_group' || github.event_name == 'push' || (github.event_name == 'pull_request' && !github.event.pull_request.draft && (github.event.action != 'edited' || github.event.changes.base.ref.from != ''))
outputs:
builder: ${{ steps.set_up_builder.outputs.builder }}
workspace_base: ${{ steps.set_up_builder.outputs.workspace_base }}
reference_repo_path: ${{ steps.set_up_builder.outputs.reference_repo_path }}
branch_name: ${{ steps.get_branch_properties.outputs.branch_name }}
short_branch_name: ${{ steps.get_branch_properties.outputs.short_branch_name }}
share_name: ${{ steps.get_branch_properties.outputs.share_name }}
sonar_analysis: ${{ steps.check_sonar_tag.outputs.result }}
steps:
// many things here
name: CI/checks
on:
merge_group:
types:
- checks_requested
pull_request:
branches:
- default
- integration
- production
- deploy
- '*-Integration'
- PAC/PAC3/Integration
types: [ opened, edited, reopened, synchronize]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Checks:
timeout-minutes: 15
runs-on: [ self-hosted, github-action-runner-ubuntu ]
if: github.event_name == 'merge_group' || github.event.action != 'edited' || (github.event.action == 'edited' && github.event.changes.base.ref.from != '')
steps:
// many things here
Do you have any clue on why my checks aren't running, or how can i debug this?
I finally found the isssue. We had a PreReceived hook on Github that would check if branch names are created with a specific prefix. It was preventing github silently from creating the branch for the merge queue (gh-readonly-queue/*)
After allowing the prefix, everything was working fine
PS: this issue also occurs if you use the rulesets feature in github to ensure specific branch name, so you will need to add the prefix in this feature too