From 86165a49213c3095a08e9ab940d3216c3bedebea Mon Sep 17 00:00:00 2001 From: arjundashrath <54043589+arjundashrath@users.noreply.github.com> Date: Wed, 9 Feb 2022 00:18:30 +0530 Subject: [PATCH] Update index.ts --- src/index.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index a05991a..dbfbd08 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ import { printInfo } from "./common"; +import * as core from "@actions/core"; (async () => { if (process.platform !== "linux") { @@ -6,6 +7,11 @@ import { printInfo } from "./common"; return; } - var web_url = "https://app.stepsecurity.io"; - printInfo(web_url); + if (core.getInput("send-insights") === 'true'){ + var web_url = "https://app.stepsecurity.io"; + printInfo(web_url); + } + else{ + core.warning("Insights will not be sent to StepSecurity API as send-insights is set to false"); + } })();