diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index e22832e..2c32c54 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -50,6 +50,15 @@ jobs: GH_TOKEN: ${{ github.token }} PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }} run: | - gh pr merge "$PR_NUMBER" \ - --repo "$GITHUB_REPOSITORY" \ - --merge + pr_node_id=$(gh api \ + "repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER" \ + --jq '.node_id') + + gh api graphql \ + -f query=' + mutation($pullRequestId: ID!) { + enqueuePullRequest(input: { pullRequestId: $pullRequestId }) { + mergeQueueEntry { id } + } + }' \ + -F pullRequestId="$pr_node_id"