Merge pull request #1189 from mikepenz/feature/optimize_tag_retrieval

Optimize tag retrieval if fully specified
This commit is contained in:
Mike Penz
2023-08-02 17:24:50 +02:00
committed by GitHub
3 changed files with 9839 additions and 25146 deletions
Generated Vendored
+9762 -25073
View File
File diff suppressed because one or more lines are too long
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+5 -1
View File
@@ -140,6 +140,9 @@ export class Tags {
maxTagsToFetch: number,
tagResolver: TagResolver
): Promise<TagResult> {
let tags: TagInfo[] = []
if (!toTag || !fromTag) {
// filter out tags not matching the specified filter
const filteredTags = filterTags(
// retrieve the tags from the API
@@ -171,7 +174,7 @@ export class Tags {
}
// sort tags, apply additional information (e.g. if tag is a pre release)
let tags = prepareAndSortTags(transformedTags, tagResolver)
tags = prepareAndSortTags(transformedTags, tagResolver)
if (transformed) {
// restore the original name, after sorting
@@ -183,6 +186,7 @@ export class Tags {
}
})
}
}
let resultToTag: TagInfo | null
let resultFromTag: TagInfo | null