From e678015aa90d58b2fb356fcbdb3f716b3402557c Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Sat, 15 Jan 2022 00:21:54 +0100 Subject: [PATCH 1/2] pass pat to comment action --- actions/comment/action.yaml | 6 +++++- inst/touchstone-comment.yaml | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/actions/comment/action.yaml b/actions/comment/action.yaml index 1c8ad87..2308d66 100644 --- a/actions/comment/action.yaml +++ b/actions/comment/action.yaml @@ -1,5 +1,9 @@ name: 'comment' description: 'Action to comment {touchstone} results on the appropriate PR. Needs read/write access.' +inputs: + GITHUB_TOKEN: + description: The GITHUB_TOKEN secret. + required: true runs: using: "composite" steps: @@ -28,7 +32,7 @@ runs: - name: 'Comment on PR' uses: actions/github-script@v3 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ inputs.GITHUB_TOKEN }} script: | var fs = require('fs'); var issue_number = Number(fs.readFileSync('./NR')); diff --git a/inst/touchstone-comment.yaml b/inst/touchstone-comment.yaml index 4d33e8a..00096bd 100644 --- a/inst/touchstone-comment.yaml +++ b/inst/touchstone-comment.yaml @@ -18,3 +18,5 @@ jobs: github.event.workflow_run.conclusion == 'success' }} steps: - uses: lorenzwalthert/touchstone/actions/comment@main + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ad9b3ab893c0209a646203cebfbf7fab5e104291 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Sat, 15 Jan 2022 00:25:10 +0100 Subject: [PATCH 2/2] fix string --- actions/comment/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/comment/action.yaml b/actions/comment/action.yaml index 2308d66..69da90f 100644 --- a/actions/comment/action.yaml +++ b/actions/comment/action.yaml @@ -2,7 +2,7 @@ name: 'comment' description: 'Action to comment {touchstone} results on the appropriate PR. Needs read/write access.' inputs: GITHUB_TOKEN: - description: The GITHUB_TOKEN secret. + description: 'The GITHUB_TOKEN secret.' required: true runs: using: "composite"