From ba848430058802bd0480644035a359b7d046aec6 Mon Sep 17 00:00:00 2001 From: Joseph H Kennedy Date: Mon, 4 Nov 2024 12:37:21 -0900 Subject: [PATCH] specify repository and issue write permission to close issue --- .github/workflows/issue-metrics.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/issue-metrics.yml b/.github/workflows/issue-metrics.yml index f0c7cbd9..93911abd 100644 --- a/.github/workflows/issue-metrics.yml +++ b/.github/workflows/issue-metrics.yml @@ -6,6 +6,7 @@ on: permissions: contents: read + issues: write jobs: build: @@ -44,6 +45,9 @@ jobs: content-filepath: ./issue_metrics.md - name: Close Issue - run: gh issue close "${{steps.create_issue.outputs.issue-number}}" --reason "not planned" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh issue close "${{steps.create_issue.outputs.issue-number}}" \ + --reason "not planned" \ + --repo ${{ github.repository }}