Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't semver filter git-refs and git-tags #13043

Merged
merged 2 commits into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions lib/datasource/git-refs/index.ts
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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