From 229c5669fd6f1d8816bd81d923772881cc4e9dc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Wed, 31 Jul 2024 20:41:39 -0500 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=93=9D=20Update=20docs=20about=20toke?= =?UTF-8?q?n=20permissions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 90361a8..ef94052 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,9 @@ on: - labeled workflow_dispatch: +permissions: + issues: write + jobs: issue-manager: runs-on: ubuntu-latest @@ -212,6 +215,9 @@ on: - labeled workflow_dispatch: +permissions: + issues: write + jobs: issue-manager: runs-on: ubuntu-latest @@ -278,6 +284,9 @@ on: - labeled workflow_dispatch: +permissions: + issues: write + jobs: issue-manager: runs-on: ubuntu-latest @@ -339,6 +348,21 @@ on: * This way you can add a label to a PR that was answered long ago, or that was waiting for more comments from the author, reviews, commits, etc. And if the configured delay since the last comment is enough the GitHub action will close the issue right away. * The `workflow_dispatch` option allows you to run the action manually from the GitHub Actions tab for your repo. +## GitHub Action Permissions + +From the examples above you can see a section: + +```yml +permissions: + issues: write +``` + +This is to give the GitHub action the necessary permissions to write to the issues. + +When you add this GitHub Action to a personal repo, you might not need this specific permission. + +But when you add it to a repo that belongs to a GitHub organization, depending on the organization default configurations, you might need to explicitly set this permission. + ## Motivation ### Closing early From f1b5f54c6c45c805229fadb168e8f4e00a51c4ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Wed, 31 Jul 2024 20:43:19 -0500 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9D=20Update=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ef94052..213bfbb 100644 --- a/README.md +++ b/README.md @@ -357,7 +357,7 @@ permissions: issues: write ``` -This is to give the GitHub action the necessary permissions to write to the issues. +This is to give the GitHub Action the necessary permissions to write to the issues. When you add this GitHub Action to a personal repo, you might not need this specific permission.