mislav / hub

A command-line tool that makes git easier to use with GitHub.

Home Page:https://hub.github.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error creating pull request: Unprocessable Entity (HTTP 422) in github actions

Shayam-S3 opened this issue · comments

I am trying to create a GitHub action to automate PR creation and I got the below error

From https://github.com/Shayam-S3/MyProject

  • [new branch] PreProd -> PreProd
  • [new branch] PreProd -> origin/PreProd
  • Master 7bcfc5b [origin/Master] adtest
    PreProd 3f6c249 Update main.yml
    remotes/origin/Master 7bcfc5b adtest
    remotes/origin/PreProd 3f6c249 Update main.yml
    hub pull-request -b PreProd -h Master --no-edit -m "Pulling refs/heads/Master into main" -m "👑 An automated PR" -r "kingdonb" -d || true
    Error creating pull request: Unprocessable Entity (HTTP 422)

and this is yml file
Screenshot 2022-08-11 at 10 28 44 PM

Screenshot 2022-08-11 at 10 24 17 PM

r

Maybe I am saying something very dumb but it seems that you are trying to create a draft pull requests (flag -d) and your repo does not allow it.

Now I am able to create the PR the problem is with the secret token