Skip to content

Commit 3f8db9f

Browse files
committed
Add GH token as optional input
1 parent cf47a6c commit 3f8db9f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ inputs:
1414
description: Enable/disable sending comments back to PR when PSScriptAnalyzer finds one or more failure checks.
1515
required: false
1616
default: true
17+
repoToken:
18+
description: GitHub token the action will use to send comments back to PR with.
19+
required: false
1720
# sendCommentOnWarnings:
1821
# description: Enable/disable sending comments back to PR when PSScriptAnalyzer finds one or more warning checks.
1922
# required: false

entrypoint.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ if ($env:INPUT_SENDCOMMENT -ne 'false' -and $env:INPUT_SENDCOMMENT -ne 0 -and $c
6161
Uri = $commentsUrl
6262
Method = 'Post'
6363
Headers = @{
64-
Authorization = "token $env:GITHUB_TOKEN"
64+
Authorization = "token $env:INPUT_REPOTOKEN"
6565
}
6666
ContentType = 'application/json'
6767
Body = @{body = $comment} | ConvertTo-Json

0 commit comments

Comments
 (0)