From c008d85369209e678298339a86159fe6d963f2d6 Mon Sep 17 00:00:00 2001 From: kerthcet Date: Sun, 23 Jun 2024 12:18:02 +0800 Subject: [PATCH] Fix pr number Signed-off-by: kerthcet --- .github/workflows/kube-actions.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/kube-actions.yaml b/.github/workflows/kube-actions.yaml index ce419a5..3209cf5 100644 --- a/.github/workflows/kube-actions.yaml +++ b/.github/workflows/kube-actions.yaml @@ -29,14 +29,12 @@ jobs: id: handle_comments run: | COMMENT_BODY=$(jq -r '.comment.body' $GITHUB_EVENT_PATH) - PR_NUMBER=$(jq -r '.pull_request.number' $GITHUB_EVENT_PATH) - ISSUE_NUMBER=$(jq -r '.issue.number' $GITHUB_EVENT_PATH) + PR_NUMBER=$(jq -r '.issue.number' $GITHUB_EVENT_PATH) COMMENT_USER=$(jq -r '.comment.user.login' $GITHUB_EVENT_PATH) echo $GITHUB_EVENT_PATH echo $COMMENT_BODY echo $PR_NUMBER - echo $ISSUE_NUMBER echo $COMMENT_USER OWNER_FILE=$(cat OWNERS) @@ -64,7 +62,7 @@ jobs: - name: Merge PR if lgtmed and approved run: | - PR_NUMBER=$(jq -r '.pull_request.number' $GITHUB_EVENT_PATH) + PR_NUMBER=$(jq -r '.issue.number' $GITHUB_EVENT_PATH) LABELS=$(gh pr view $PR_NUMBER --json labels --jq '.labels[].name') if [[ "$LABELS" == *"lgtm"* && "$LABELS" == *"approved"* ]]; then