fix(operations): fail fast the current batch to respect the operations limit (#474)

* fix(operations): fail fast the current batch to respect the operations limit

Instead of processing an entire batch of 100 issues before checking the operations left, simply do it before processing an issue so that we respect as expected the limitation of the operations per run
Fixes #466

* test(debug): disable the dry-run for the test by default

we will be able to test the operations per run and have more complete logs that could help us debug the workflow

* chore(logs): also display the stats when the operations per run stopped the workflow

* chore(stats): fix a bad stats related to the consumed operations

* test(operations-per-run): add coverage

* chore: update index
This commit is contained in:
Geoffrey Testelin
2021-06-07 21:20:11 +02:00
committed by GitHub
parent 8deaf75055
commit 5f6f311ca6
5 changed files with 267 additions and 24 deletions

View File

@@ -25,7 +25,7 @@ export const DefaultProcessorOptions: IIssuesProcessorOptions = Object.freeze({
anyOfIssueLabels: '',
anyOfPrLabels: '',
operationsPerRun: 100,
debugOnly: true,
debugOnly: false,
removeStaleWhenUpdated: false,
removeIssueStaleWhenUpdated: undefined,
removePrStaleWhenUpdated: undefined,