Github actions auto merge PR through error

I’m using ado for deployment along with flux, and we’re using Github action yaml to create PR and auto merge while deployment, however recently it hasn’t merged the PR. this was the error:
Run gh pr merge --merge --auto

GraphQL: Pull request Pull request is in unstable status (enablePullRequestAutoMerge)

Error: Process completed with exit code 1.
can any one help me on this

this is my workflow :name: Flux Automated Pull Request
on:
push:
branches:
- main

jobs:
pull-request:
name: Open pull request to main
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:

  # https://github.com/actions/checkout
  - name: Checkout
    uses: actions/checkout@v4

  - name: "PR: Create"
    if: github.event.created
    run: gh pr create --base flux --title "Merge ${{ github.ref_name }} into flux" --body "This pull request was created by a Github Action."
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  - name: "PR: Enable Auto-Merge"
    run: gh pr merge --merge --auto
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Hi @pbprasad102

The gh commands look correct and the error says enablePullRequestAutoMerge

Have you enabled [auto-merge for pull requests](https://auto-merge for pull requests in your repository) in your repository?

Regards.

yes I’m enabled auto merge PR option in repo. normally some PR’s 1 merged out of 10 remaining through above error. we are facing this issue from 1 month before it’s working fine.