From 566e30ed2c7a061fa9e14117c14eb385a197e750 Mon Sep 17 00:00:00 2001 From: Michael Shick Date: Wed, 8 Apr 2020 16:49:21 -0700 Subject: [PATCH] debug: adding context debugging --- dist/index.js | 4 ++++ index.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/dist/index.js b/dist/index.js index 844358b..89e9671 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1999,6 +1999,8 @@ const getPulls = async (repoToken, repo, commitSha) => { [Headers.Authorization]: `token ${repoToken}`, }; + core.debug(`https://api.github.com/repos/${repo}/commits/${commitSha}/pulls`); + const response = await http.getJson( `https://api.github.com/repos/${repo}/commits/${commitSha}/pulls`, additionalHeaders @@ -2025,6 +2027,8 @@ async function run() { } = github.context; core.debug(JSON.stringify(github.context)); + core.debug(JSON.stringify(pullRequest)); + core.debug(`sha: ${sha}`); const { full_name: repoFullName } = repository; diff --git a/index.js b/index.js index ead5923..b5c3a6b 100644 --- a/index.js +++ b/index.js @@ -12,6 +12,8 @@ const getPulls = async (repoToken, repo, commitSha) => { [Headers.Authorization]: `token ${repoToken}`, }; + core.debug(`https://api.github.com/repos/${repo}/commits/${commitSha}/pulls`); + const response = await http.getJson( `https://api.github.com/repos/${repo}/commits/${commitSha}/pulls`, additionalHeaders @@ -38,6 +40,8 @@ async function run() { } = github.context; core.debug(JSON.stringify(github.context)); + core.debug(JSON.stringify(pullRequest)); + core.debug(`sha: ${sha}`); const { full_name: repoFullName } = repository;