Commit Graph

73 Commits

Author SHA1 Message Date
Luke Tomlinson 3a971aeb80 Revert "Merge pull request #586 from C0ZEN/feature/split-pr-and-issue-options"
This reverts commit db699ab3b1, reversing
changes made to b83d488cb9.
2021-10-20 09:25:24 -04:00
TESTELIN Geoffrey b9a40762bf
feat: remove the remove-stale-when-updated option
BREAKING CHANGE:
The option remove-stale-when-updated was removed
2021-10-08 21:30:39 +02:00
TESTELIN Geoffrey bab816b473
feat: remove the days-before-stale option
BREAKING CHANGE:
The option days-before-stale was removed
2021-10-08 21:06:12 +02:00
TESTELIN Geoffrey 6299c36a0d
feat: remove the only-labels option
BREAKING CHANGE:
The option only-labels was removed
2021-10-08 20:39:44 +02:00
TESTELIN Geoffrey a8c5bb1c29
feat: remove the only-labels option
BREAKING CHANGE:
The option only-labels was removed
2021-10-08 20:26:58 +02:00
TESTELIN Geoffrey 1c81c38e2f
feat: remove the any-of-labels option
BREAKING CHANGE:
The option any-of-labels was removed
2021-10-08 20:18:01 +02:00
TESTELIN Geoffrey f6a70aa856
feat: remove the exempt-milestones option
BREAKING CHANGE:
The option exempt-milestones was removed
2021-10-08 19:48:38 +02:00
TESTELIN Geoffrey 315391885d
feat: remove the exempt-all-milestones option
BREAKING CHANGE:
The option exempt-all-milestones was removed
2021-10-08 19:19:07 +02:00
TESTELIN Geoffrey 4665995b65
feat: remove the exempt-assignees option
BREAKING CHANGE:
The option exempt-assignees was removed
2021-10-08 19:06:51 +02:00
TESTELIN Geoffrey b80ae639fa
feat: remove the exempt-all-assignees option
BREAKING CHANGE:
The option exempt-all-assignees was removed
2021-10-08 18:50:37 +02:00
Geoffrey Testelin b98591d49e
docs(stale-issue-comment): update the docs to remove that omitting the option will not send a message (#522)
* 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>
2021-09-22 09:18:19 -04:00
Geoffrey Testelin 9912fa74d1
feat(draft-pr): add new option to not process PRs which are in draft (#539)
* 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
2021-09-20 09:37:32 -04:00
Geoffrey Testelin 1cdda06bb3
feat(options): add new option ignore-updates to stale even with activity (#540)
* 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
2021-09-17 09:54:38 -04:00
Marko Kungla 002bc97450
add missing inputs to action.yml closes #551 (#554) 2021-09-14 10:13:17 -04:00
Luke Tomlinson a78d0b721e
Make label comparison case insensitive (#517)
* Make label comparison case insensitive

* PR Feedback
2021-07-12 13:56:58 -04:00
Luke Tomlinson d901397e11
Filter comments by content instead of actor (#519)
* Filter comments by content instead of actor

* Remove dead actor code

* WIP fix tests

* Fix test
2021-07-12 10:37:47 -04:00
Geoffrey Testelin d3bfc50685
Revert "feat(options): add new options to avoid stale base on comments (#494)" (#507)
This reverts commit 1efddcbe9f.
2021-06-15 17:16:31 -04:00
Geoffrey Testelin 1efddcbe9f
feat(options): add new options to avoid stale base on comments (#494)
* 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
2021-06-14 09:56:55 -04:00
Geoffrey Testelin f1017f33dd
fix(dry-run): forbid mutations in dry-run (#500)
Bring back the dry-run by default for the tests - bad idea to disable it sorry
Fix bad documentation array format
Fixes #499
2021-06-10 10:14:45 -04:00
Ben Villalobos b1da9e1fb1
Add support for adding & removing labels when no longer stale (#468)
* 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>
2021-06-08 09:31:20 -04:00
Falk Puschner 52f5648db3
🎨 Add message grouping (#483)
* 🎨 add message grouping

* ⚗️ try output

* 🔥 remove unnecessary code

* ⬆️ bump deps

* 🎨 build project

* ⬆️ bump deps

* 🎨 formatting code

* ⬇️ revert bumps

* 🎨 using logger service

* 🎨 using package lock version 1

* 🎨 add engines keyword

* ♻️ create processIssue method

*  add grouping method

* 🎨 build project

* 🎨 update engine declaration

* 💚 fix merge conflicts
2021-06-07 17:22:55 -04:00
Geoffrey Testelin 5f6f311ca6
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
2021-06-07 15:20:11 -04:00
Geoffrey Testelin 77a1abc9e8
chore(logs): add more logs and better dry-run (#463)
* 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
2021-06-07 09:49:49 -04:00
Ori Arditi 965862c5a6
minor fix (#487) 2021-06-07 09:27:59 -04:00
Falk Puschner 3e6d35b685
feat(output): print output parameters (#458)
*  print output parameters

* 📝 add output table

* ⚗️ try output parameters

* ⚗️ stringify output

* ⚗️ try test output

* 🔥 remove test output

* 💚 build and lint code

* 🔥 remove output test

* 🔒 fix vulnerabilities

* 🎨 renaming staled variables

* 🎨 build code

* 📝 update contributing commands
2021-06-03 09:18:48 -04:00
Geoffrey Testelin 5fbbfba142
fix(logs): coloured logs (#465)
* 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
2021-06-02 17:04:34 -04:00
Geoffrey Testelin 6ec637d238
feat(options): simplify config by removing skip stale message options (#457)
* feat(options): simplify config by removing skip stale message options

Closes #405
Closes #455

BREAKING CHANGES: remove skip-stale-issue-message and skip-stale-pr-message options. If you used this option, replace it by an empty message for the options stale-issue-message and stale-pr-message

* build(dist): update dist

also lint some files

* docs(readme): update the docs by removing the skip options
2021-05-25 14:14:22 -04:00
Geoffrey Testelin 98ed4cb500
chore(logs): final overhaul of the logs (#433)
* feat(logs): add a new log when an issue consumed at least one operation (#386)

* docs(only-labels): enhance the docs and fix duplicate (#341)

* docs(only-labels): remove duplicated option and improve descriptions

a bad rebase happend

* docs(readme): use a multi-line array and remove the optional column

the option column was not helpful since each value is optional
the multi-line array will allow to have a better UI in small devices and basically in GitHub too due to the max-width

* style(readme): break line for the statistics

* docs(readme): add a better description for the ascending option

* docs(action): add missing punctuation

* build(deps-dev): bump @typescript-eslint/eslint-plugin (#342)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.15.2 to 4.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.16.1/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump @octokit/rest from 18.3.0 to 18.3.2 (#350)

Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.3.0 to 18.3.2.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v18.3.0...v18.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#15)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#17)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#18)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs(operations-per-run): improve the doc for this option

* feat(logs): add a new log when an issue consumed at least one operation

the log will be visible as the last row of the processing of the given issue
closes #348

* chore(readme): improve the operations per run

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* chore(readme): improve the operations per run

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* chore(readme): improve the operations per run

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* chore(readme): improve the operations per run

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* chore(readme): improve the operations per run

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* chore(readme): improve the operations per run

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Typo in how to perform check for specific labels (#357)

Not tests but feels like a typo.

Or if we keep the title it `exempt` feels more approriate:

          exempt-issue-labels: 'roadmap'
          exempt-pr-labels: 'roadmap'

* feat(any-of-labels): add 2 new options to customize for issues/PRs (#380)

* docs(only-labels): enhance the docs and fix duplicate (#341)

* docs(only-labels): remove duplicated option and improve descriptions

a bad rebase happend

* docs(readme): use a multi-line array and remove the optional column

the option column was not helpful since each value is optional
the multi-line array will allow to have a better UI in small devices and basically in GitHub too due to the max-width

* style(readme): break line for the statistics

* docs(readme): add a better description for the ascending option

* docs(action): add missing punctuation

* build(deps-dev): bump @typescript-eslint/eslint-plugin (#342)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.15.2 to 4.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.16.1/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump @octokit/rest from 18.3.0 to 18.3.2 (#350)

Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.3.0 to 18.3.2.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v18.3.0...v18.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#15)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#17)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#18)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(any-of-labels): add 2 new options to customize for issues/PRs

closes #371
change this option and only-labels to have tree-logs

* chore(index): update it

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(logs): enhance the logs for assignees and milestones (#382)

* docs(only-labels): enhance the docs and fix duplicate (#341)

* docs(only-labels): remove duplicated option and improve descriptions

a bad rebase happend

* docs(readme): use a multi-line array and remove the optional column

the option column was not helpful since each value is optional
the multi-line array will allow to have a better UI in small devices and basically in GitHub too due to the max-width

* style(readme): break line for the statistics

* docs(readme): add a better description for the ascending option

* docs(action): add missing punctuation

* build(deps-dev): bump @typescript-eslint/eslint-plugin (#342)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.15.2 to 4.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.16.1/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump @octokit/rest from 18.3.0 to 18.3.2 (#350)

Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.3.0 to 18.3.2.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v18.3.0...v18.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#15)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#17)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#18)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(logs): enhance the logs for assignees and milestones

closes #381

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* style(typo): fix typo plural issue

* style(naming): rename two methods

* chore(error): remove a potential useless throw of error

* style(naming): rename one method

* refactor(issue): change the way to count the operations

* refactor(operations): create a method to reduce code duplication

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Romain Rigaux <romain.rigaux@gmail.com>

* chore(logs): final overhaul of the logs

display more values in cyan
display all the options the same way (with links pointing to the readme so that with anchors we could find them easily later
make them a little more humanized
add more logs especially for the stale conditions

* style(logs): fix typos

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Romain Rigaux <romain.rigaux@gmail.com>
2021-05-12 10:00:14 -04:00
Luke Tomlinson 523075947f
Remove unused @octokit/reset and generate dist (#440) 2021-05-12 09:33:22 -04:00
Geoffrey Testelin c11507e9b7
feat(logs): add a new log when an issue consumed at least one operation (#386)
* docs(only-labels): enhance the docs and fix duplicate (#341)

* docs(only-labels): remove duplicated option and improve descriptions

a bad rebase happend

* docs(readme): use a multi-line array and remove the optional column

the option column was not helpful since each value is optional
the multi-line array will allow to have a better UI in small devices and basically in GitHub too due to the max-width

* style(readme): break line for the statistics

* docs(readme): add a better description for the ascending option

* docs(action): add missing punctuation

* build(deps-dev): bump @typescript-eslint/eslint-plugin (#342)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.15.2 to 4.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.16.1/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump @octokit/rest from 18.3.0 to 18.3.2 (#350)

Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.3.0 to 18.3.2.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v18.3.0...v18.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#15)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#17)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#18)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs(operations-per-run): improve the doc for this option

* feat(logs): add a new log when an issue consumed at least one operation

the log will be visible as the last row of the processing of the given issue
closes #348

* chore(readme): improve the operations per run

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* chore(readme): improve the operations per run

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* chore(readme): improve the operations per run

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* chore(readme): improve the operations per run

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* chore(readme): improve the operations per run

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* chore(readme): improve the operations per run

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Typo in how to perform check for specific labels (#357)

Not tests but feels like a typo.

Or if we keep the title it `exempt` feels more approriate:

          exempt-issue-labels: 'roadmap'
          exempt-pr-labels: 'roadmap'

* feat(any-of-labels): add 2 new options to customize for issues/PRs (#380)

* docs(only-labels): enhance the docs and fix duplicate (#341)

* docs(only-labels): remove duplicated option and improve descriptions

a bad rebase happend

* docs(readme): use a multi-line array and remove the optional column

the option column was not helpful since each value is optional
the multi-line array will allow to have a better UI in small devices and basically in GitHub too due to the max-width

* style(readme): break line for the statistics

* docs(readme): add a better description for the ascending option

* docs(action): add missing punctuation

* build(deps-dev): bump @typescript-eslint/eslint-plugin (#342)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.15.2 to 4.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.16.1/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump @octokit/rest from 18.3.0 to 18.3.2 (#350)

Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.3.0 to 18.3.2.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v18.3.0...v18.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#15)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#17)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#18)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(any-of-labels): add 2 new options to customize for issues/PRs

closes #371
change this option and only-labels to have tree-logs

* chore(index): update it

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(logs): enhance the logs for assignees and milestones (#382)

* docs(only-labels): enhance the docs and fix duplicate (#341)

* docs(only-labels): remove duplicated option and improve descriptions

a bad rebase happend

* docs(readme): use a multi-line array and remove the optional column

the option column was not helpful since each value is optional
the multi-line array will allow to have a better UI in small devices and basically in GitHub too due to the max-width

* style(readme): break line for the statistics

* docs(readme): add a better description for the ascending option

* docs(action): add missing punctuation

* build(deps-dev): bump @typescript-eslint/eslint-plugin (#342)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.15.2 to 4.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.16.1/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump @octokit/rest from 18.3.0 to 18.3.2 (#350)

Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.3.0 to 18.3.2.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v18.3.0...v18.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#15)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#17)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#18)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(logs): enhance the logs for assignees and milestones

closes #381

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* style(typo): fix typo plural issue

* style(naming): rename two methods

* chore(error): remove a potential useless throw of error

* style(naming): rename one method

* refactor(issue): change the way to count the operations

* refactor(operations): create a method to reduce code duplication

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Romain Rigaux <romain.rigaux@gmail.com>
2021-05-03 09:20:07 -04:00
Geoffrey Testelin 440fb174b5
feat(remove-stale-when-updated): add 2 options for issues and prs (#383)
* docs(only-labels): enhance the docs and fix duplicate (#341)

* docs(only-labels): remove duplicated option and improve descriptions

a bad rebase happend

* docs(readme): use a multi-line array and remove the optional column

the option column was not helpful since each value is optional
the multi-line array will allow to have a better UI in small devices and basically in GitHub too due to the max-width

* style(readme): break line for the statistics

* docs(readme): add a better description for the ascending option

* docs(action): add missing punctuation

* build(deps-dev): bump @typescript-eslint/eslint-plugin (#342)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.15.2 to 4.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.16.1/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump @octokit/rest from 18.3.0 to 18.3.2 (#350)

Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.3.0 to 18.3.2.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v18.3.0...v18.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#15)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#17)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#18)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(remove-stale-when-updated): add 2 options for issues and prs

closes #377
also I closed the stale process once the stale label is removed since the following process is regarding the closing and it should simply not occur if no longer stale

* chore(logs): add more logs to understand the process

* chore(logs): highlights more logs and humanize a bit more

* chore(index): update it

* refactor(checks): simplify if complexity

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-30 09:14:51 -04:00
Geoffrey Testelin 043fbbdea3
feat(logs): enhance the logs for assignees and milestones (#382)
* docs(only-labels): enhance the docs and fix duplicate (#341)

* docs(only-labels): remove duplicated option and improve descriptions

a bad rebase happend

* docs(readme): use a multi-line array and remove the optional column

the option column was not helpful since each value is optional
the multi-line array will allow to have a better UI in small devices and basically in GitHub too due to the max-width

* style(readme): break line for the statistics

* docs(readme): add a better description for the ascending option

* docs(action): add missing punctuation

* build(deps-dev): bump @typescript-eslint/eslint-plugin (#342)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.15.2 to 4.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.16.1/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump @octokit/rest from 18.3.0 to 18.3.2 (#350)

Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.3.0 to 18.3.2.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v18.3.0...v18.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#15)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#17)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#18)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(logs): enhance the logs for assignees and milestones

closes #381

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-28 16:39:28 -04:00
Geoffrey Testelin c70e174d4a
feat(any-of-labels): add 2 new options to customize for issues/PRs (#380)
* docs(only-labels): enhance the docs and fix duplicate (#341)

* docs(only-labels): remove duplicated option and improve descriptions

a bad rebase happend

* docs(readme): use a multi-line array and remove the optional column

the option column was not helpful since each value is optional
the multi-line array will allow to have a better UI in small devices and basically in GitHub too due to the max-width

* style(readme): break line for the statistics

* docs(readme): add a better description for the ascending option

* docs(action): add missing punctuation

* build(deps-dev): bump @typescript-eslint/eslint-plugin (#342)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.15.2 to 4.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.16.1/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump @octokit/rest from 18.3.0 to 18.3.2 (#350)

Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.3.0 to 18.3.2.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v18.3.0...v18.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#15)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#17)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#18)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(any-of-labels): add 2 new options to customize for issues/PRs

closes #371
change this option and only-labels to have tree-logs

* chore(index): update it

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-28 16:33:42 -04:00
Geoffrey Testelin 5e20aa8410
feat(statistics): split the stats between issues and PRs (#364)
* docs(only-labels): enhance the docs and fix duplicate (#341)

* docs(only-labels): remove duplicated option and improve descriptions

a bad rebase happend

* docs(readme): use a multi-line array and remove the optional column

the option column was not helpful since each value is optional
the multi-line array will allow to have a better UI in small devices and basically in GitHub too due to the max-width

* style(readme): break line for the statistics

* docs(readme): add a better description for the ascending option

* docs(action): add missing punctuation

* build(deps-dev): bump @typescript-eslint/eslint-plugin (#342)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.15.2 to 4.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.16.1/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump @octokit/rest from 18.3.0 to 18.3.2 (#350)

Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.3.0 to 18.3.2.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v18.3.0...v18.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#15)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#17)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test(refactor): use toHaveLength

* feat(statistics): split the processed issues and prs

* feat(statistics): split the new stale issues and prs

* feat(statistics): split the no longer stale issues and prs

* chore(deps): undo upgrade of dependencies

* feat(statistics): split closed issues and prs

* feat(statistics): use the word "items" when something concern both issues and prs

* feat(statistics): split more stats by issues and prs

* feat(statistics): split more stats by issues and prs (final)

* chore(index): update it

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-27 14:47:02 -04:00
Geoffrey Testelin b717aa9f47
chore(logs): enhance the logs (#358)
* docs(only-labels): enhance the docs and fix duplicate (#341)

* docs(only-labels): remove duplicated option and improve descriptions

a bad rebase happend

* docs(readme): use a multi-line array and remove the optional column

the option column was not helpful since each value is optional
the multi-line array will allow to have a better UI in small devices and basically in GitHub too due to the max-width

* style(readme): break line for the statistics

* docs(readme): add a better description for the ascending option

* docs(action): add missing punctuation

* build(deps-dev): bump @typescript-eslint/eslint-plugin (#342)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.15.2 to 4.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.16.1/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump @octokit/rest from 18.3.0 to 18.3.2 (#350)

Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.3.0 to 18.3.2.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v18.3.0...v18.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (#352) (#15)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(logs): add logs for the milestones

* chore(errors): use actions error instead of throw errors

* chore(logs): enhance the logs and add some colors

tl;dr: blue for values, megenta for options, white for messages, yellow light for warnings, yellow for milestones and green for success
still a WIP but I wish to confirm this before continuing
@hross is it ok for you?

* chore(index): update the index

* chore(ci): use npm ci instead of npm i

* chore(logs): removed some useless logs

* refactor(issues): remove useless check

* chore(statistics): show the real count of fetched issues

* refactor(operations): use a class to handle the operations left

closes #361

* chore(logs): include the total number of issues in the log for a batch

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-08 05:56:52 -05:00
Geoffrey Testelin 419a53bc05
feat(statistics): display some stats in the logs (#337)
* test: add more coverage

* docs: reorder and enhance typo

* docs(contributing): add more information about the npm scripts

* feat(statistics): add simple statistics

* feat(statistics): add more stats

* refactor(issues-processor): remove some options from the constructor

it should have been only useful for the tests

* feat(statistics): add stats for new stale or undo stale issues

* chore(rebase): handle rebase conflicts
2021-03-01 15:34:35 -05:00
Jose Veiga 63ae8ac024
Feat: add any-of-labels option (#319)
* feat: add any-of-labels option

* chore: run pack script

* fix: error in milestones spec

* chore: update readme

* chore: fix default value in action.yml

* chore: add some unit tests

* docs: update README.md

Co-authored-by: Geoffrey Testelin <geoffrey.testelin@gmail.com>

* refactor: add return type to lambda

Co-authored-by: Geoffrey Testelin <geoffrey.testelin@gmail.com>
2021-03-01 11:05:53 -05:00
Geoffrey Testelin 0e95ddbecb
feat(only-labels): add 2 new options to distinguish issue and PR configs (#336)
* feat(assignees): add new option to avoid stale for assignees

closes #271

* test: add more coverage

* docs: fix readme format issue

* docs: reorder and enhance typo

* docs(contributing): add more information about the npm scripts

* feat(only-labels): add new options to customize it for issues and PR

closes #308
2021-02-28 19:08:33 -05:00
Geoffrey Testelin 836169b81a
feat(close-label): automatically remove close-label when no longer closed nor locked (#334)
* feat(assignees): add new option to avoid stale for assignees

closes #271

* test: add more coverage

* docs: fix readme format issue

* docs: reorder and enhance typo

* docs(contributing): add more information about the npm scripts

* docs(readme): update the default values to reflect the real applied ones

* feat(close-label): automatically remove it when no longer closed nor locked

closes #278
2021-02-28 19:07:54 -05:00
Geoffrey Testelin ec96ff65b0
feat(assignees): add 6 new options to avoid stale for assignees (#327)
* feat(assignees): add new option to avoid stale for assignees

closes #271

* test: add more coverage

* docs: fix readme format issue

* docs: reorder and enhance typo

* docs(contributing): add more information about the npm scripts
2021-02-28 06:15:08 -05:00
Geoffrey Testelin 6a493760cf
feat(milestones): add new options to exempt all milestones (#291)
* refactor: move and rename the interfaces/classes

closes #272

* docs: update the readme and action to describe the new options for milestones

* refactor: split the tests into multiple files

* feat(milestones): add new options to exempt all milestones

* test: add coverage for the default values

* test(milestones): add more coverage (wip)

* test(milestones): add more coverage for the multiple exempt milestones

* test: reduce duplicated code

* test: change some describes

* test: add more coverage

* test: add more coverage

* test: add final coverage

* build(tsc): add missing project flag to build with the right tsconfig

* test(milestones): use each to reduce the complexity of the tests

* chore: fix an eslint issue with prettier on windows

the end of line was wrong each time the os process the files

* docs: move the contribution section to a dedicated file

add more content to help the debug

* chore: make sure the rebase is ok
2021-02-16 06:18:48 -05:00
Geoffrey Testelin e96f31f877
refactor: move and rename the interfaces/classes (#290)
closes #272
2021-02-13 06:09:37 -05:00
Ross Brodbeck 9d6f46564a Add rebuilt index
Code scanning / CodeQL-Build (push) Failing after 35s Details
2021-02-05 06:56:22 -05:00
Geoffrey Testelin f71123a6f7
feat(exempt): add new options to exempt the milestones (#279)
* feat(exempt): add new options to exempt the milestones

closes #270

* test(milestones): add coverage

* test(issue): add coverage

* chore(rebase): fix all errors due to the rebase

also made some changes regarding the change I made with the lint scripts and prettier. I did not saw that some scripts were already here and I created to more to keep the old ones as well

* test(milestone): add coverage

* chore(index): update index

* fix(checks): remove checks over optional number options

the code was actually handling the case where the values are NaN so it's fine
2021-01-19 05:54:16 -05:00
Ross Brodbeck 1b9f13b607 Add rebuilt package 2021-01-18 08:19:26 -05:00
Ross Brodbeck b12dccced8
Update package dependencies (#267) 2021-01-15 07:52:52 -05:00
Ross Brodbeck 546a4e9fd6
Fix failing tests (#266) 2021-01-15 07:35:41 -05:00
Rylan Polster a0b4b61711
Determine actor from PAT if possible (#231) 2021-01-15 07:20:32 -05:00
Sora Morimoto 39de730f99
Provide the GitHub token by default (#253)
* Provide the GitHub token by default

Signed-off-by: Sora Morimoto <sora@morimoto.io>

* npm run build

Signed-off-by: Sora Morimoto <sora@morimoto.io>
2021-01-15 07:07:08 -05:00
Ross Brodbeck 87c2b794b9 Update dist with latest dependencies
Code scanning / CodeQL-Build (push) Failing after 34s Details
2020-11-20 07:07:11 -05:00