diff --git a/src/github.ts b/src/github.ts index 9c373c13..2db47632 100644 --- a/src/github.ts +++ b/src/github.ts @@ -285,18 +285,25 @@ export class GitHub { public static async annotateBuildWarnings(source: string, st: SolveStatus): Promise { st.warnings?.forEach(warning => { - core.info(JSON.stringify(warning, null, 2)); + if (!warning.detail || !warning.short) { + return; + } + + const short = atob(warning.short); + let detail = warning.detail.map(encoded => atob(encoded).replace(/\s\(line \d+\)$/, '')).join(' '); + if (warning.url) { + detail += `\nMore info: ${warning.url}`; + } + core.info(`warning.level=${warning.level}`); core.info(`warning.url=${warning.url}`); core.info(`warning.short=${atob(warning.short)}`); core.info(`warning.detail=${warning.detail?.map(encoded => atob(encoded)).join(' ') || ''}`); + core.info(`short=${short}`); + core.info(`detail=${detail}`); - if (!warning.detail || !warning.short) { - return; - } - - core.warning(atob(warning.short), { - title: warning.detail.map(encoded => atob(encoded).replace(/\s\(line \d+\)$/, '')).join(' '), + core.warning(short, { + title: detail, file: source, startLine: warning.range && warning.range.length > 0 ? warning.range[0]?.start.line : undefined });