diff --git a/dist/index.js b/dist/index.js index 44bbf57..a8987d1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -199593,15 +199593,21 @@ process.env['NODE_ENV'] = 'production-github-action'; }, }) .then((res) => { - core.info(`Backport success: ${res.status}`); + core.info(`Backport result: ${res.status}`); core.setOutput('Result', res); const failureMessage = (0, run_1.getFailureMessage)(res); if (failureMessage) { - core.setFailed(failureMessage); + // if the failure message includes the string "There are no branches to backport to.", we don't want to fail the action, instead just issue a warning + if (failureMessage.includes('There are no branches to backport to.')) { + core.warning(failureMessage); + } + else { + core.setFailed(failureMessage); + } } }) .catch((error) => { - core.error(`Backport failure: ${error.message}`); + core.error(`Backport unable to be completed: ${error.message}`); core.setFailed(error.message); }); diff --git a/src/index.ts b/src/index.ts index 0ae3d92..f5a5cae 100644 --- a/src/index.ts +++ b/src/index.ts @@ -23,14 +23,19 @@ run({ }, }) .then((res) => { - core.info(`Backport success: ${res.status}`); + core.info(`Backport result: ${res.status}`); core.setOutput('Result', res); const failureMessage = getFailureMessage(res); if (failureMessage) { - core.setFailed(failureMessage); + // if the failure message includes the string "There are no branches to backport to.", we don't want to fail the action, instead just issue a warning + if (failureMessage.includes('There are no branches to backport to.')) { + core.warning(failureMessage); + } else { + core.setFailed(failureMessage); + } } }) .catch((error) => { - core.error(`Backport failure: ${error.message}`); + core.error(`Backport unable to be completed: ${error.message}`); core.setFailed(error.message); });