Interview Prep/Git & GitHub/GitHub, Actions and Pull Request Issues

PRs added to the merge queue are removed with "failed to merge" because required checks never ran.

AdvancedTroubleshootingGitHub, Actions and Pull Request Issues
Answer

Likely causes → The merge queue creates temporary gh-readonly-queue/main/pr-... branches and expects required checks to report on them via the merge_group event. Workflows triggered only by pull_request never run there, so the queue times out.

Diagnose → Check the workflow's on: block and the queue entry's checks; there will be no run for the merge_group event.

Fix →

on:
  pull_request:
  merge_group:
    types: [checks_requested]

Make sure the same job names are produced for both events, since required checks match by name.

Prevent → Add merge_group to every required workflow before enabling the merge queue on a branch.

All Git & GitHub questions Roadmap: Git & GitHub

More on GitHub, Actions and Pull Request Issues