Skip to content

Commit

Permalink
fix(pod): Massage only registry URLs that matched the GitHub regex
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamindetroch committed Apr 20, 2022
1 parent e23b8fc commit 2abed27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/modules/datasource/pod/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ export class PodDatasource extends Datasource {

const podName = packageName.replace(regEx(/\/.*$/), '');
let baseUrl = registryUrl.replace(regEx(/\/+$/), '');
baseUrl = massageGithubUrl(baseUrl);
// In order to not abuse github API limits, query CDN instead
if (isDefaultRepo(baseUrl)) {
[baseUrl] = this.defaultRegistryUrls;
Expand All @@ -231,6 +230,7 @@ export class PodDatasource extends Datasource {
let result: ReleaseResult | null = null;
const match = githubRegex.exec(baseUrl);
if (match) {
baseUrl = massageGithubUrl(baseUrl);
const { hostURL, account, repo } = match?.groups ?? {};
const opts = { hostURL, account, repo };
result = await this.getReleasesFromGithub(podName, opts);
Expand Down

0 comments on commit 2abed27

Please sign in to comment.