From 58c35cba9d8803a63da31e138b8de36506b34dda Mon Sep 17 00:00:00 2001 From: LeeGordon83 Date: Tue, 19 Nov 2024 14:31:47 +0000 Subject: [PATCH] fix for github merge action --- .github/workflows/merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 6d7bdf811..be1625811 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -54,7 +54,7 @@ jobs: function prCheck () { REPO=$1 BASE=$2 - STATE=$(gh pr list --repo $GITHUB_REPOSITORY_OWNER/$REPO --json title,mergeStateStatus,state,reviews --state OPEN --base $BASE --head $RELEASE_BRANCH --jq '.[] | select(.mergeStateStatus == "CLEAN" and .reviews[].state == "APPROVED") | .reviews[-1].state ') + STATE=$(gh pr list --repo $GITHUB_REPOSITORY_OWNER/$REPO --json title,mergeStateStatus,state,reviews --state OPEN --base $BASE --head $RELEASE_BRANCH --jq '.[] | select(.mergeStateStatus == "CLEAN" and .reviews[-1].state == "APPROVED") | .reviews[-1].state') if [ "$STATE" != "APPROVED" ]; then echo "Error: PR for merging $GITHUB_REPOSITORY_OWNER/$REPO $RELEASE_BRANCH into $BASE needs to be ready to merge and approved. (STATE=$STATE)" >&2 exit 1