From 2231fcda564c8c93f0ee7f4c1666de9d38426a34 Mon Sep 17 00:00:00 2001 From: Taewon Kim <85913822+dev-taewon-kim@users.noreply.github.com> Date: Wed, 6 Nov 2024 11:16:31 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EC=9D=B4=EC=8A=88=20=EC=9E=90?= =?UTF-8?q?=EB=8F=99=20=EC=A2=85=EB=A3=8C=20=EC=8A=A4=ED=81=AC=EB=A6=BD?= =?UTF-8?q?=ED=8A=B8=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95(3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/auto-close-issue.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/auto-close-issue.yml b/.github/workflows/auto-close-issue.yml index 79c6d78..905035d 100644 --- a/.github/workflows/auto-close-issue.yml +++ b/.github/workflows/auto-close-issue.yml @@ -1,13 +1,14 @@ name: Auto Close Issue on PR Merge on: - pull_request: + pull_request_target: types: [closed] branches: - 'dev-fe' - 'dev-be' permissions: + contents: read issues: write pull-requests: write @@ -18,15 +19,12 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - - name: Setup GitHub CLI - run: | - # GitHub CLI 인증 설정 - echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Close linked issue env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR_NUMBER: ${{ github.event.pull_request.number }} BRANCH_NAME: ${{ github.event.pull_request.head.ref }} TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}