From 02cdae80b622fc325e9b8be45cff2c50e3fa46c2 Mon Sep 17 00:00:00 2001 From: Naoki Oketani Date: Thu, 9 Jan 2020 18:59:40 +0900 Subject: [PATCH] Action fails always if vulnerabilities are found (#35) --- dist/index.js | 1 + src/main.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/dist/index.js b/dist/index.js index 76feaf4..0c98134 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4075,6 +4075,7 @@ function run() { const option = issue.getIssueOption(issueBody); const { data: createdIssue } = yield client.issues.create(Object.assign(Object.assign({}, github.context.repo), option)); core.debug(`#${createdIssue.number}`); + core.setFailed('This repo has some vulnerabilities'); } } } diff --git a/src/main.ts b/src/main.ts index c10fb2a..eb3c308 100644 --- a/src/main.ts +++ b/src/main.ts @@ -43,6 +43,7 @@ export async function run(): Promise { ...option }) core.debug(`#${createdIssue.number}`) + core.setFailed('This repo has some vulnerabilities') } } } catch (error) {