From 6d9144830b7796ac2a049b48b5d49710c374e04a Mon Sep 17 00:00:00 2001 From: lyn Date: Wed, 1 Apr 2026 17:03:34 +0000 Subject: [PATCH] fix(pr merge): on 405, fetch and print PR merge status --- git-hangman-lab/scripts/pr | 5 +++++ 1 file changed, 5 insertions(+) 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 ;; *)