diff --git a/lib/modules/manager/gomod/artifacts-extra.ts b/lib/modules/manager/gomod/artifacts-extra.ts index 8e416ad0d6bc9b..fbebc9efc20572 100644 --- a/lib/modules/manager/gomod/artifacts-extra.ts +++ b/lib/modules/manager/gomod/artifacts-extra.ts @@ -86,14 +86,27 @@ export function getExtraDepsNotice( return null; } - const noticeLines: string[] = []; + const noticeLines: string[] = [ + 'In order to perform the update(s) described in the table above, Renovate ran the `go get` command, which resulted in the following additional change(s):', + '\n', + ]; + + const goUpdated = extraDeps.some(({ depName }) => depName === 'go'); + const otherDepsCount = extraDeps.length - (goUpdated ? 1 : 0); + + if (otherDepsCount > 0) { + noticeLines.push(`- ${otherDepsCount} additional dependency was updated`); + } + + if (goUpdated) { + noticeLines.push( + '- The `go` directive was updated for compatibility reasons', + ); + } - noticeLines.push( - 'In addition to the dependencies listed above, the following packages will also be updated:', - ); noticeLines.push('\n'); + noticeLines.push('Details:'); noticeLines.push(extraDepsTable(extraDeps)); - noticeLines.push('\n'); return noticeLines.join('\n'); }