From 871b09f6092df40e236b053c13aae14dc6600fb5 Mon Sep 17 00:00:00 2001 From: "Naoki Ikeguchi (YUMEMI Inc.)" Date: Wed, 24 Nov 2021 22:25:22 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20Fix=20the=20reporter=20is=20?= =?UTF-8?q?not=20working=20on=20organisation=20repos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yml | 4 ++++ entrypoint.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index c3fae95..9c0ab01 100644 --- a/action.yml +++ b/action.yml @@ -5,6 +5,10 @@ branding: icon: 'search' color: 'yellow' inputs: + report_enabled: + required: true + description: 'Reports to GitHub pull request only if this input is "true".' + default: '${{ github.event.repository.owner.id }} == ${{ github.event.pull_request.head.user.id }}' owner: required: true description: 'The owner (organization) of the repository.' diff --git a/entrypoint.sh b/entrypoint.sh index 93b8c75..2e91176 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh -if [ "${GITHUB_ACTOR}" = "${GITHUB_REPOSITORY_OWNER}" ]; then +if [ "${INPUT_REPORT_ENABLED}" = "true" ]; then # shellcheck disable=SC2034 export LOXCAN_REPORTER_GITHUB="1" export LOXCAN_REPORTER_GITHUB_OWNER="${INPUT_OWNER}" From 4f9d4743694bbfb458295a7309c647037fb36c51 Mon Sep 17 00:00:00 2001 From: "Naoki Ikeguchi (YUMEMI Inc.)" Date: Wed, 24 Nov 2021 22:27:03 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=A7=20Fix=20syntax?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 9c0ab01..35c81bf 100644 --- a/action.yml +++ b/action.yml @@ -8,7 +8,7 @@ inputs: report_enabled: required: true description: 'Reports to GitHub pull request only if this input is "true".' - default: '${{ github.event.repository.owner.id }} == ${{ github.event.pull_request.head.user.id }}' + default: '${{ github.event.repository.owner.id == github.event.pull_request.head.user.id }}' owner: required: true description: 'The owner (organization) of the repository.'