From 8315c2aee05789e4b73da7a56d9640e68fbcb42d Mon Sep 17 00:00:00 2001 From: Anand Chowdhary Date: Tue, 24 Nov 2020 15:39:19 +0530 Subject: [PATCH] :sparkles: Add v1 --- src/index.ts | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/index.ts b/src/index.ts index 4737dab..06da4ca 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,25 +1,11 @@ -import { getInput, debug, setFailed, setOutput } from "@actions/core"; -import { getOctokit } from "@actions/github"; +import { getInput, setFailed } from "@actions/core"; -const token = - getInput("token") || process.env.GH_PAT || process.env.GITHUB_TOKEN; +const token = getInput("token") || process.env.GH_PAT || process.env.GITHUB_TOKEN; export const run = async () => { if (!token) throw new Error("GitHub token not found"); - const octokit = getOctokit(token); - const ms: string = getInput("milliseconds"); - debug(`Waiting ${ms} milliseconds ...`); - - debug(new Date().toTimeString()); - await wait(parseInt(ms, 10)); - debug(new Date().toTimeString()); - - setOutput("time", new Date().toTimeString()); -}; - -export const wait = (milliseconds: number) => { - return new Promise((resolve) => setTimeout(() => resolve(), milliseconds)); + console.log("OK"); }; run()