diff --git a/dist/add-item.js b/dist/add-item.js index 78987fe..ea8b9ac 100644 --- a/dist/add-item.js +++ b/dist/add-item.js @@ -23390,8 +23390,12 @@ async function installGhCli() { async function execCliCommand(args) { const token = core.getInput("token", { required: true }); const gh = await installGhCli(); + const env = { GH_TOKEN: token }; + if (core.isDebug()) { + env.GH_DEBUG = "api"; + } const { exitCode, stdout, stderr } = await exec.getExecOutput(gh, args, { - env: { GH_TOKEN: token }, + env, ignoreReturnCode: true, silent: !core.isDebug() }); diff --git a/dist/archive-item.js b/dist/archive-item.js index 9df69ef..f9f2c1f 100644 --- a/dist/archive-item.js +++ b/dist/archive-item.js @@ -23390,8 +23390,12 @@ async function installGhCli() { async function execCliCommand(args) { const token = core.getInput("token", { required: true }); const gh = await installGhCli(); + const env = { GH_TOKEN: token }; + if (core.isDebug()) { + env.GH_DEBUG = "api"; + } const { exitCode, stdout, stderr } = await exec.getExecOutput(gh, args, { - env: { GH_TOKEN: token }, + env, ignoreReturnCode: true, silent: !core.isDebug() }); diff --git a/dist/close-project.js b/dist/close-project.js index 761e0fe..646dbff 100644 --- a/dist/close-project.js +++ b/dist/close-project.js @@ -21937,8 +21937,12 @@ async function installGhCli() { async function execCliCommand(args) { const token = core.getInput("token", { required: true }); const gh = await installGhCli(); + const env = { GH_TOKEN: token }; + if (core.isDebug()) { + env.GH_DEBUG = "api"; + } const { exitCode, stdout, stderr } = await exec.getExecOutput(gh, args, { - env: { GH_TOKEN: token }, + env, ignoreReturnCode: true, silent: !core.isDebug() }); diff --git a/dist/completed-by.js b/dist/completed-by.js index b58f00a..0971d6d 100644 --- a/dist/completed-by.js +++ b/dist/completed-by.js @@ -23390,8 +23390,12 @@ async function installGhCli() { async function execCliCommand(args) { const token = core.getInput("token", { required: true }); const gh = await installGhCli(); + const env = { GH_TOKEN: token }; + if (core.isDebug()) { + env.GH_DEBUG = "api"; + } const { exitCode, stdout, stderr } = await exec.getExecOutput(gh, args, { - env: { GH_TOKEN: token }, + env, ignoreReturnCode: true, silent: !core.isDebug() }); diff --git a/dist/copy-project.js b/dist/copy-project.js index 82af578..fa5d826 100644 --- a/dist/copy-project.js +++ b/dist/copy-project.js @@ -23861,8 +23861,12 @@ async function installGhCli() { async function execCliCommand(args) { const token = core.getInput("token", { required: true }); const gh = await installGhCli(); + const env = { GH_TOKEN: token }; + if (core.isDebug()) { + env.GH_DEBUG = "api"; + } const { exitCode, stdout, stderr } = await exec.getExecOutput(gh, args, { - env: { GH_TOKEN: token }, + env, ignoreReturnCode: true, silent: !core.isDebug() }); diff --git a/dist/delete-item.js b/dist/delete-item.js index 6d9d9da..9c41905 100644 --- a/dist/delete-item.js +++ b/dist/delete-item.js @@ -23390,8 +23390,12 @@ async function installGhCli() { async function execCliCommand(args) { const token = core.getInput("token", { required: true }); const gh = await installGhCli(); + const env = { GH_TOKEN: token }; + if (core.isDebug()) { + env.GH_DEBUG = "api"; + } const { exitCode, stdout, stderr } = await exec.getExecOutput(gh, args, { - env: { GH_TOKEN: token }, + env, ignoreReturnCode: true, silent: !core.isDebug() }); diff --git a/dist/delete-project.js b/dist/delete-project.js index 43ec49b..67b81b7 100644 --- a/dist/delete-project.js +++ b/dist/delete-project.js @@ -21937,8 +21937,12 @@ async function installGhCli() { async function execCliCommand(args) { const token = core.getInput("token", { required: true }); const gh = await installGhCli(); + const env = { GH_TOKEN: token }; + if (core.isDebug()) { + env.GH_DEBUG = "api"; + } const { exitCode, stdout, stderr } = await exec.getExecOutput(gh, args, { - env: { GH_TOKEN: token }, + env, ignoreReturnCode: true, silent: !core.isDebug() }); diff --git a/dist/edit-item.js b/dist/edit-item.js index 150a770..cbfb8b5 100644 --- a/dist/edit-item.js +++ b/dist/edit-item.js @@ -23390,8 +23390,12 @@ async function installGhCli() { async function execCliCommand(args) { const token = core.getInput("token", { required: true }); const gh = await installGhCli(); + const env = { GH_TOKEN: token }; + if (core.isDebug()) { + env.GH_DEBUG = "api"; + } const { exitCode, stdout, stderr } = await exec.getExecOutput(gh, args, { - env: { GH_TOKEN: token }, + env, ignoreReturnCode: true, silent: !core.isDebug() }); diff --git a/dist/edit-project.js b/dist/edit-project.js index 28f8daa..0683a55 100644 --- a/dist/edit-project.js +++ b/dist/edit-project.js @@ -21937,8 +21937,12 @@ async function installGhCli() { async function execCliCommand(args) { const token = core.getInput("token", { required: true }); const gh = await installGhCli(); + const env = { GH_TOKEN: token }; + if (core.isDebug()) { + env.GH_DEBUG = "api"; + } const { exitCode, stdout, stderr } = await exec.getExecOutput(gh, args, { - env: { GH_TOKEN: token }, + env, ignoreReturnCode: true, silent: !core.isDebug() }); diff --git a/dist/find-project.js b/dist/find-project.js index f24197f..97b55d1 100644 --- a/dist/find-project.js +++ b/dist/find-project.js @@ -21937,8 +21937,12 @@ async function installGhCli() { async function execCliCommand(args) { const token = core.getInput("token", { required: true }); const gh = await installGhCli(); + const env = { GH_TOKEN: token }; + if (core.isDebug()) { + env.GH_DEBUG = "api"; + } const { exitCode, stdout, stderr } = await exec.getExecOutput(gh, args, { - env: { GH_TOKEN: token }, + env, ignoreReturnCode: true, silent: !core.isDebug() }); diff --git a/dist/get-item.js b/dist/get-item.js index 74d6996..ef88d95 100644 --- a/dist/get-item.js +++ b/dist/get-item.js @@ -23390,8 +23390,12 @@ async function installGhCli() { async function execCliCommand(args) { const token = core.getInput("token", { required: true }); const gh = await installGhCli(); + const env = { GH_TOKEN: token }; + if (core.isDebug()) { + env.GH_DEBUG = "api"; + } const { exitCode, stdout, stderr } = await exec.getExecOutput(gh, args, { - env: { GH_TOKEN: token }, + env, ignoreReturnCode: true, silent: !core.isDebug() }); diff --git a/dist/get-project.js b/dist/get-project.js index 265503e..7c520cf 100644 --- a/dist/get-project.js +++ b/dist/get-project.js @@ -21937,8 +21937,12 @@ async function installGhCli() { async function execCliCommand(args) { const token = core.getInput("token", { required: true }); const gh = await installGhCli(); + const env = { GH_TOKEN: token }; + if (core.isDebug()) { + env.GH_DEBUG = "api"; + } const { exitCode, stdout, stderr } = await exec.getExecOutput(gh, args, { - env: { GH_TOKEN: token }, + env, ignoreReturnCode: true, silent: !core.isDebug() }); diff --git a/dist/github-script/index.js b/dist/github-script/index.js index fd66a56..d21a4dd 100644 --- a/dist/github-script/index.js +++ b/dist/github-script/index.js @@ -37507,8 +37507,12 @@ exports.installGhCli = installGhCli; async function execCliCommand(args) { const token = core.getInput('token', { required: true }); const gh = await installGhCli(); + const env = { GH_TOKEN: token }; + if (core.isDebug()) { + env.GH_DEBUG = 'api'; + } const { exitCode, stdout, stderr } = await exec.getExecOutput(gh, args, { - env: { GH_TOKEN: token }, + env, ignoreReturnCode: true, silent: !core.isDebug() }); diff --git a/dist/link-project.js b/dist/link-project.js index 0022d06..58870ff 100644 --- a/dist/link-project.js +++ b/dist/link-project.js @@ -23390,8 +23390,12 @@ async function installGhCli() { async function execCliCommand(args) { const token = core.getInput("token", { required: true }); const gh = await installGhCli(); + const env = { GH_TOKEN: token }; + if (core.isDebug()) { + env.GH_DEBUG = "api"; + } const { exitCode, stdout, stderr } = await exec.getExecOutput(gh, args, { - env: { GH_TOKEN: token }, + env, ignoreReturnCode: true, silent: !core.isDebug() }); diff --git a/src/helpers.ts b/src/helpers.ts index a9477ad..0de239f 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -38,8 +38,14 @@ export async function execCliCommand(args: string[]): Promise { const token = core.getInput('token', { required: true }); const gh = await installGhCli(); + const env: Record = { GH_TOKEN: token }; + + if (core.isDebug()) { + env.GH_DEBUG = 'api'; + } + const { exitCode, stdout, stderr } = await exec.getExecOutput(gh, args, { - env: { GH_TOKEN: token }, + env, ignoreReturnCode: true, silent: !core.isDebug() });