diff --git a/git-hangman-lab/scripts/pr b/git-hangman-lab/scripts/pr index f1ad15b..9f237f9 100755 --- a/git-hangman-lab/scripts/pr +++ b/git-hangman-lab/scripts/pr @@ -252,6 +252,11 @@ cmd_merge() { ;; 405) echo "merge failed check the pr status" + # Fetch PR details to show merge status + PR_INFO=$(curl -s -X GET "https://git.hangman-lab.top/api/v1/repos/${OWNER}/${REPO_NAME}/pulls/${pr_index}" \ + -H 'accept: application/json' \ + -H "Authorization: token ${token}") + echo "$PR_INFO" | jq '{mergeable: .mergeable, head_sha: .head.sha, base_ref: .base.ref, head_ref: .head.ref}' exit 1 ;; *)