Allow ordering (#97)

* allow ordering of issue lookup
This commit is contained in:
Andy McKay
2020-06-23 10:55:24 -07:00
committed by GitHub
parent d7468118d7
commit e169e4e149
5 changed files with 13 additions and 4 deletions

View File

@@ -47,6 +47,7 @@ export interface IssueProcessorOptions {
operationsPerRun: number;
removeStaleWhenUpdated: boolean;
debugOnly: boolean;
ascending: boolean;
}
/***
@@ -292,6 +293,7 @@ export class IssueProcessor {
state: 'open',
labels: this.options.onlyLabels,
per_page: 100,
direction: this.options.ascending ? 'asc' : 'desc',
page
}
);

View File

@@ -35,7 +35,8 @@ function getAndValidateArgs(): IssueProcessorOptions {
removeStaleWhenUpdated: !(
core.getInput('remove-stale-when-updated') === 'false'
),
debugOnly: core.getInput('debug-only') === 'true'
debugOnly: core.getInput('debug-only') === 'true',
ascending: core.getInput('ascending') === 'true'
};
for (const numberInput of [