From fd25b61a20814b2e5bce9c909cfeb997c75c6cbd Mon Sep 17 00:00:00 2001 From: Nitishkumar Singh Date: Thu, 28 Sep 2023 00:06:51 +0530 Subject: [PATCH] add logs Signed-off-by: Nitishkumar Singh --- dist/index.js | 7 +++++-- src/run.js | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index d8af606..04f6e14 100644 --- a/dist/index.js +++ b/dist/index.js @@ -18267,8 +18267,11 @@ const run = async (context) => { core.setSecret(token) core.setSecret(teamId) - const branch = core.getInput('branch') || (currentCtx.ref != null ? getBranchFromGithubRef(context.ref) : getBranch(eventName, payload)) - const commit = core.getInput('commit') || (currentCtx.sha != null ? context.sha : getSha(eventName, payload)) + console.log('== pull data from context ==') + console.log(`ref: ${currentCtx.ref}`) + console.log(`sha: ${currentCtx.sha}`) + const branch = core.getInput('branch') || (currentCtx.ref != null ? getBranchFromGithubRef(currentCtx.ref) : getBranch(eventName, payload)) + const commit = core.getInput('commit') || (currentCtx.sha != null ? currentCtx.sha : getSha(eventName, payload)) const body = { team_id: teamId, event_name: core.getInput('event_name'), diff --git a/src/run.js b/src/run.js index c0957ff..ee09eab 100644 --- a/src/run.js +++ b/src/run.js @@ -86,6 +86,8 @@ const run = async (context) => { repo: core.getInput('repo') || payload.repository.full_name, meta: { user: login } } + console.log('== Body ==') + console.dir(body) return got.post('https://events.cto.ai/', { headers: { Authorization: `Bearer ${token}`,