- move pr collection into npm module
(publish without any furhter notes or docs) - refactor action to use npm dependency
This commit is contained in:
+2
-24
@@ -1,3 +1,5 @@
|
||||
import {Extractor, Regex, Rule, Sort, Transformer} from 'github-pr-collector/lib/configuration'
|
||||
|
||||
export interface Configuration {
|
||||
max_tags_to_fetch: number
|
||||
max_pull_requests: number
|
||||
@@ -45,30 +47,6 @@ export type Property =
|
||||
| 'approvedReviewers'
|
||||
| 'status'
|
||||
|
||||
export interface Rule extends Regex {
|
||||
on_property?: Property // retrieve the property to apply the rule on
|
||||
}
|
||||
|
||||
export interface Sort {
|
||||
order: 'ASC' | 'DESC' // the sorting order
|
||||
on_property: 'mergedAt' | 'title' // the property to sort on. (mergedAt falls back to createdAt)
|
||||
}
|
||||
|
||||
export interface Regex {
|
||||
pattern: string // the regex pattern to match
|
||||
flags?: string // the regex flag to use for RegExp
|
||||
}
|
||||
|
||||
export interface Transformer extends Regex {
|
||||
target?: string // the target string to transform the source string using the regex to
|
||||
}
|
||||
|
||||
export interface Extractor extends Transformer {
|
||||
on_property?: Property[] | Property | undefined // retrieve the property to extract the value from
|
||||
method?: 'replace' | 'match' | undefined // the method to use to extract the value, `match` will not use the `target` property
|
||||
on_empty?: string | undefined // in case the regex results in an empty string, this value is gonna be used instead (only for label_extractor currently)
|
||||
}
|
||||
|
||||
export interface TagResolver {
|
||||
method: string // semver, sort
|
||||
filter?: Regex // the regex to filter the tags, prior to sorting
|
||||
|
||||
Reference in New Issue
Block a user