From c8490afe8660f4f75d990c06b3623f441a7ecfbe Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Tue, 8 Jul 2025 12:44:00 +0200 Subject: [PATCH] improve logs --- dist/chunk1.js | 2 +- dist/post.js | 3 +-- src/post.ts | 5 +---- src/utils.ts | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dist/chunk1.js b/dist/chunk1.js index ba23e4b..801a546 100644 --- a/dist/chunk1.js +++ b/dist/chunk1.js @@ -19921,7 +19921,7 @@ function getUserAgent() { function runAction(fn) { fn().catch((error) => { const errorMessage = error instanceof Error ? error.message : String(error); - core.setFailed(`Error: ${errorMessage}`); + core.setFailed(errorMessage); }); } diff --git a/dist/post.js b/dist/post.js index 91fd6dd..8e64077 100644 --- a/dist/post.js +++ b/dist/post.js @@ -22,9 +22,8 @@ async function cleanup() { await revokeToken(registryUrl, token); } async function revokeToken(registryUrl, token) { - core.info("Revoking trusted publishing token"); const tokensEndpoint = _chunk1js.getTokensEndpoint.call(void 0, registryUrl); - core.info(`Revoking token at: ${tokensEndpoint}`); + core.info(`Revoking trusted publishing token at ${tokensEndpoint}`); const response = await fetch(tokensEndpoint, { method: "DELETE", headers: { diff --git a/src/post.ts b/src/post.ts index e6c7f6a..d27cf74 100644 --- a/src/post.ts +++ b/src/post.ts @@ -27,11 +27,8 @@ export async function cleanup(): Promise { } async function revokeToken(registryUrl: string, token: string): Promise { - core.info("Revoking trusted publishing token"); - const tokensEndpoint = getTokensEndpoint(registryUrl); - - core.info(`Revoking token at: ${tokensEndpoint}`); + core.info(`Revoking trusted publishing token at ${tokensEndpoint}`); const response = await fetch(tokensEndpoint, { method: "DELETE", diff --git a/src/utils.ts b/src/utils.ts index b4a782d..d038fcf 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -95,6 +95,6 @@ export function runAction(fn: () => Promise): void { fn().catch((error: unknown) => { const errorMessage = error instanceof Error ? error.message : String(error); - core.setFailed(`Error: ${errorMessage}`); + core.setFailed(errorMessage); }); }