Skip to content

Commit

Permalink
Revert "refactor: use detectPlatform (renovatebot#28945)"
Browse files Browse the repository at this point in the history
This reverts commit 5de7eee.
  • Loading branch information
RahulGautamSingh committed May 24, 2024
1 parent 8023279 commit fcfcd3d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/workers/repository/update/pr/changelog/github/source.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import URL from 'node:url';
import { GlobalConfig } from '../../../../../../config/global';
import { logger } from '../../../../../../logger';
import { detectPlatform } from '../../../../../../util/common';
import * as hostRules from '../../../../../../util/host-rules';
import type { BranchUpgradeConfig } from '../../../../../types';
import { ChangeLogSource } from '../source';
Expand Down Expand Up @@ -42,7 +42,8 @@ export class GitHubChangeLogSource extends ChangeLogSource {
error?: ChangeLogError;
} {
const sourceUrl = config.sourceUrl!;
const host = detectPlatform(sourceUrl);
const parsedUrl = URL.parse(sourceUrl);
const host = parsedUrl.host;
const manager = config.manager;
const packageName = config.packageName;

Expand All @@ -56,7 +57,7 @@ export class GitHubChangeLogSource extends ChangeLogSource {
});
// istanbul ignore if
if (host && !token) {
if (host === 'github') {
if (host.endsWith('.git.luolix.top') || host === 'github.com') {
if (!GlobalConfig.get('githubTokenWarn')) {
logger.debug(
{ manager, packageName, sourceUrl },
Expand Down

0 comments on commit fcfcd3d

Please sign in to comment.