diff --git a/lib/workers/repository/update/pr/changelog/github/source.ts b/lib/workers/repository/update/pr/changelog/github/source.ts index af62ea1e2b69f2..49eb858f99532b 100644 --- a/lib/workers/repository/update/pr/changelog/github/source.ts +++ b/lib/workers/repository/update/pr/changelog/github/source.ts @@ -42,7 +42,7 @@ export class GitHubChangeLogSource extends ChangeLogSource { } { const sourceUrl = config.sourceUrl!; const parsedUrl = URL.parse(sourceUrl); - const host = parsedUrl.host!; + const host = parsedUrl.host; const manager = config.manager; const packageName = config.packageName; @@ -54,7 +54,7 @@ export class GitHubChangeLogSource extends ChangeLogSource { url, }); // istanbul ignore if - if (!token) { + if (host && !token) { if (host.endsWith('.github.com') || host === 'github.com') { if (!GlobalConfig.get('githubTokenWarn')) { logger.debug(