Skip to content

Commit

Permalink
fix: don't semver filter git-refs and git-tags (#13043)
Browse files Browse the repository at this point in the history
Closes #13034

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
  • Loading branch information
rarkins and viceice committed Dec 10, 2021
1 parent bcea325 commit eeedade
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions lib/datasource/git-refs/index.ts
@@ -1,6 +1,5 @@
import { cache } from '../../util/cache/package/decorator';
import { regEx } from '../../util/regex';
import * as semver from '../../versioning/semver';
import { Datasource } from '../datasource';
import type { DigestConfig, GetReleasesConfig, ReleaseResult } from '../types';
import { GitDatasource } from './base';
Expand Down Expand Up @@ -32,8 +31,7 @@ export class GitRefsDatasource extends Datasource {

const refs = rawRefs
.filter((ref) => ref.type === 'tags' || ref.type === 'heads')
.map((ref) => ref.value)
.filter((ref) => semver.isVersion(ref));
.map((ref) => ref.value);

const uniqueRefs = [...new Set(refs)];

Expand Down
2 changes: 0 additions & 2 deletions lib/datasource/git-tags/index.ts
@@ -1,6 +1,5 @@
import { cache } from '../../util/cache/package/decorator';
import { regEx } from '../../util/regex';
import * as semver from '../../versioning/semver';
import { Datasource } from '../datasource';
import { GitDatasource } from '../git-refs/base';
import type { DigestConfig, GetReleasesConfig, ReleaseResult } from '../types';
Expand Down Expand Up @@ -28,7 +27,6 @@ export class GitTagsDatasource extends Datasource {
}
const releases = rawRefs
.filter((ref) => ref.type === 'tags')
.filter((ref) => semver.isVersion(ref.value))
.map((ref) => ({
version: ref.value,
gitRef: ref.value,
Expand Down

0 comments on commit eeedade

Please sign in to comment.