Skip to content

Commit 6213479

Browse files
authored
feat: do not run signing on pull requests (#935)
* update Signed-off-by: laurentsimon <[email protected]> * update Signed-off-by: laurentsimon <[email protected]> Signed-off-by: laurentsimon <[email protected]>
1 parent d733726 commit 6213479

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ func main() {
3333
log.Fatalf("error during command execution: %v", err)
3434
}
3535

36-
if os.Getenv(options.EnvInputPublishResults) == "true" {
36+
if os.Getenv(options.EnvInputPublishResults) == "true" &&
37+
// `pull_request` do not have the necessary `token-id: write` permissions.
38+
os.Getenv("GITHUB_EVENT_NAME") != "pull_request" {
3739
// Get json results by re-running scorecard.
3840
jsonPayload, err := signing.GetJSONScorecardResults()
3941
if err != nil {

0 commit comments

Comments
 (0)