- provide alternative method to sort tags

- introduce option configuration allowing to specify which method to pick
  - semver (default)
  - alphabetical sort order (sort)
This commit is contained in:
Mike Penz
2020-10-20 11:55:09 +02:00
parent 58bf38f3d9
commit 1089e28a2f
4 changed files with 91 additions and 11 deletions
+10 -1
View File
@@ -9,6 +9,7 @@ export interface Configuration {
empty_template: string
categories: Category[]
transformers: Transformer[]
tag_resolver: TagResolver
}
export interface Category {
@@ -21,6 +22,10 @@ export interface Transformer {
target: string
}
export interface TagResolver {
method: string // semver, sort
}
export const DefaultConfiguration: Configuration = {
max_tags_to_fetch: 200, // the amount of tags to fetch from the github API
max_pull_requests: 200, // the amount of pull requests to process
@@ -44,5 +49,9 @@ export const DefaultConfiguration: Configuration = {
labels: ['test']
}
], // the categories to support for the ordering
transformers: [] // transformers to apply on the PR description according to the `pr_template`
transformers: [], // transformers to apply on the PR description according to the `pr_template`
tag_resolver: {
// defines the logic on how to resolve the previous tag, only relevant if `fromTag` is not specified
method: 'semver' // defines which method to use, by default it will use `semver` (dropping all non matching tags). Alternative `sort` is also available.
}
}