* chore(assignees): add logs
* docs(stale-issue-comment): update the docs to remove that omitting will not send a message
To be sure, what would be even better is to add a test using the default config (because the main issue is that the default options of the specs are not matching the ones from the action).
Closes#521
* test(comment): add more coverage to test the stale issue message
* docs(readme): improve the wording
Co-authored-by: Luke Tomlinson <luketomlinson@github.com>
* refactor: simplify the code to use the stats for the specs
* chore(rebase): fix rebase issue
* chore(statistics): fix issue due to rebase
Co-authored-by: Luke Tomlinson <luketomlinson@github.com>
* chore(assignees): add logs
* feat(draft-pr): add new option to not process PRs which are in draft
* refactor(draft-pr): create a dedicated class to handle the logic
* chore(index): update index file
* chore(assignees): add logs
* docs(readme): use the override syntax to simplify the reading
* docs(readme): add missing default options
* docs(readme): add 3 new options to ignore activity before stale
* chore(action): add 3 new options
* fix(removeStaleWhenUpdated): use the value of the action config as expected
Fixes#451
* chore(main): add 3 new options
* feat(ignore): add new class to ignore all activities before stale
* feat(option): add new options to ignore all activities before stale
* chore(index): update index file
* docs(readme): fix typo
* docs(readme): add missing empty row
* chore(rebase): fix logger issues due to rebase
* chore: aplly changes due to rebase
* refactor(naming): change the name of the options as suggested
* chore(logs): reverse the logs as well
* docs(readme): format the table of options
* refactor(naming): rename the the options
* style(rename): rename more updates wording to activities
* build(ci): run the test step as expected for a CI
instead of using a real linter with auto fix and the tests verbose as fuck
* chore: handle breaking changes due to new changes
* refactor(naming): rename and reverse the options
* style(tests): use plural for some describe
* docs(days-before-stale): list the new option
* chore(index): update index file
* chore: keep static methods on top
* chore(logs): remove useless log
* docs(readme): add branch hint
* using english words
Co-authored-by: Luke Tomlinson <luketomlinson@github.com>
Co-authored-by: Luke Tomlinson <luketomlinson@github.com>
* feat(options): add new options to avoid stale based on comments
Helping to close#441, #470, #435?
Closes#390 due to no activity
BREAKING CHANGES: the options related to remove-stale-when-updated will only check the updates, not the comment. It is only impactint the configurations using the value at false
* style(readme): fix table syntax due to rebase
* docs(readme): add permissions only for the new options
* Add support for adding & removing labels when no longer stale
* Add remove/addLabelsWhenUpdatedFromStale to relevant spec files. Modify arguments to remove ambiguity in 'labels' var & parameter
* Change parameters for clarity, let autoformat do its thing
* PR feedback: More useful logging when removing labels
* Wrap client calls in try catches
* Use Unstale in variable names
* Don't run add label logic under debug
* Add test for labels added to unstale issues
* PR Feedback: logging
* Update README
* Rename vars to labels-to-add/remove-when-unstale
* Apply doc suggestions from code review
Co-authored-by: Geoffrey Testelin <geoffrey.testelin@gmail.com>
* PR Feedback
Co-authored-by: Geoffrey Testelin <geoffrey.testelin@gmail.com>
* 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
* feat(logs): improve the logs when removing the close label
A log was missing when the option was configured but the close label was not present on the issue/PR
Change the log about not removing the close label to explicitly mention that this behaviour occur because the option is not configured
Fixes#462
* feat(dry-run): display the logs and count the operations
the dry-run checks were cancelling way sooner the workflow
the logs and the count of operations could not occur in dry run due to this
the goal of the dry run is just to skip some logic regarding the api calls to avoid altering the repos but the goal IMO is to also make them reflect the real world run so this change allow this
BTW it also allow now to test the consumed operations
Fixes#461
* feat(logs): add more logs to debug the stale label removal
* chore(index): update index
* chore(dry-run): fix bad dry-run conditions
* docs(contributing): add information to update the changelog
* docs(changelog): add a first draft
it needs to contain the new PRs and only contains a not very nice version of the previous release to have an example
* chore(release): propose a way to locally generate a release
* refactor(logs): replace chalk by ansi-styles
* test(logs): fix the failing tests due to ansi styles
I was not able to disable or mock ansi-styles so instead I found a way to make the tests pass
it's not perfect but it's still nice because the logs will keep their trustful colour when running through the tests
* refactor(logs): simplify the syntax to colour the logs
* chore(rebase): update files due to rebase
* refactor(logger): reduce code duplication