Skip to content

Commit

Permalink
fix(changelogs): protect against null host (#24281)
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Sep 6, 2023
1 parent 2431c5a commit b6bc47f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/workers/repository/update/pr/changelog/github/source.ts
Expand Up @@ -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;

Expand All @@ -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(
Expand Down

0 comments on commit b6bc47f

Please sign in to comment.