Commit Graph

30 Commits

Author SHA1 Message Date
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 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
Geoffrey Testelin f698371c0d
Add a start date option to ignore old issues and PRs (#269)
* docs(readme): add a small precision about the operations-per-run

closes #230

* chore(lint): ignore the lib folder for prettier

* chore(date): add a function to check if a date is valid

* chore(date): add a function to get a humanized date

* chore(date): add a function to check if the date is more recent than

* feat(date): add a start date to ignore old issues and PRs

closes #174

* docs(readme): change the date to match the description

* chore(date): add a better type for the date

* docs(date): add missing JSDoc about the return type

* chore(rebase): fix issues due to rebase

* docs(readme): fix table formatting issues
2021-01-17 20:22:36 -05:00
Geoffrey Testelin 552e4c60f0
feat(stale-and-close): add new options to change the days before close (#224)
* docs(readme): add new options in the documentation

* chore: update the action schema

* chore: parse the new arguments

* feat(stale-and-close): add new options to change the days before close

to avoid a breaking change and simplify the configuration the old options 'daysBeforeStale' and 'daysBeforePrClose' are kept and new options are available to override them with 'daysBeforeIssueStale', 'daysBeforePrStale', 'daysBeforeIssueClose' and 'daysBeforePrClose'

* chore: rename the issue type enum to remove the enum suffix

* chore: add missing dependency for eslint and typescript

also upgrade the parser

* chore: fix an issue with the linter for the shadow rules

it was not configured properly for TypeScript

* chore: use camelCase for constants

* chore: use camelCase for enum members

* chore: fix the tests

* chore: enhance prettier to also lint other kind of files

it was configured to only work with ts and it was not working well to be honest
also now the lint scripts will also run prettier
2021-01-16 08:28:29 -05:00
Chad Whitacre 44c3cb508b
Clarify significance of the exempt-* config knobs (#260)
This action doesn't apply exempt labels, it reads them.
2021-01-15 07:12:30 -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
Alex Brazier 107018c400
feat: Add `delete-branch` option to delete PR branches after closing (#190)
* feat: Add `delete-branch` option to delete PR branches after closing

* Fix branch ref
2021-01-15 06:49:38 -05:00
Daniel Jankowski 13b324e4b2
Add support for adding close label (#135) 2020-09-08 15:32:42 -04:00
Harshit Pant fbaa974a12
Add skip-stale-pr-message and skip-stale-issue-message (#119)
This introduces two new flags `skip-stale-issue-message` and `skip-stale-pr-message` which would skip the message addition if these are set to true.

They are backward compatible as empty `stale-issue-message` or `stale-pr-message` will take precedence over them
2020-07-24 08:08:48 -04:00
Phillip Johnsen f111c4f385
Allow for issues/PRs to be closed after manually being marked as stale (#103)
Previously this action would stop and skip all issues or pull requests
it found if no `stale-issue-message | stale-pr-message` option had
been configured.

Configuring `days-before-stale: -1` will activate that behaviour.
2020-07-13 16:20:45 -04:00
Owen Voke 32507178a3
Add support for posting comment on closure (#99) 2020-07-13 13:05:59 -04:00
Andy McKay e169e4e149
Allow ordering (#97)
* allow ordering of issue lookup
2020-06-23 13:55:24 -04:00
Ross Brodbeck 3838b887be
Remove stale labels and ignore stale issues with comments (#58)
* Ignore issues that have recent comments and ignore the stale label. Defaulting to this behavior but added an option to turn it off.
* Fix up tests a bit to make this runnable. Add a test for the logic.
* Add vscode debugging configuration.
2020-05-11 10:46:03 -04:00
Ross Brodbeck 78921b6863
one more fix to the actions yml 2020-04-16 14:05:24 -04:00
Ross Brodbeck 29c3838f9a
Fix parsing issues with action.yml 2020-04-16 14:03:58 -04:00
Ross Brodbeck aad6ffa865
Refactor issue processor (#45)
* Refctor into an issue processor, add debug mode
* Move processor to use its own types so testing is easier
* Add more tests
2020-04-16 13:57:59 -04:00
Ryan Wilson-Perkin 6127f8ef7a
Allow multiple exempt labels (#19)
* Update description to clarify exempt labels

* [breaking change] Use array for exempt labels

* Switch to a comma separated string for exempt labels

* Update descriptions for multiple labels

* Update examples for exempt labels

* lint: apply fixes

* Re-generate transpiled output
2020-04-15 21:33:09 -04:00
Ross Brodbeck e78f171ed1
Fix main entrypoint in action yml (#43) 2020-04-14 14:02:29 -04:00
Tobias Diez 7ba95148ac
Update action.yml 2020-04-14 11:44:58 +02:00
Tobias Diez e9da8a66a5
Fix closing tag in only-labels description
The `only-labels` description was missing the closing tag `'`.
2020-04-14 11:43:56 +02:00
Ross Brodbeck 3d5d474504
Merge pull request #22 from yuya-takeyama/only-labels-pr
Add only-labels option
2020-04-13 07:19:13 -04:00
Ross Brodbeck 54897a34f9
Fix labelsOnly description so it is easier to understand
Co-Authored-By: Stephan Miehe <49914758+stephanmiehe@users.noreply.github.com>
2020-04-13 07:17:15 -04:00
Ross Brodbeck c5c8bac9c4
Merge pull request #16 from actions/dont-close-option
Add option to not close stale issues/prs
2020-04-13 07:12:39 -04:00
Edward Thomson d6c1b70646 Update description 2019-11-08 16:47:32 +00:00
Yuya Takeyama 8588c16319 Add only-labels 2019-09-27 22:50:35 +09:00
damccorm 2521dbb244 Add option to not close stale 2019-09-04 16:38:09 -04:00
Ryan Wilson-Perkin 9f69ef12ad Feature: Exempt labels from action (#11)
* Change name to isLabeled for re-use with "exempt"

* Add args for exempt labels

* Skip operation if labeled exempt

* Only check for exempt label if defined

Since the exempt label parameter is not required, we don't want to both
checking for it if it was not defined.

* Don't reduce operationsLeft if exempt

This variable just tracks the number of operations we're using to avoid
rate limiting. Since the exempt check wouldn't result in a rate-limited
request, we don't need to reduce the variable.

* Update the action.yml with new exempt values

* Update README with example of exempt labels

* Remove redundant defaults
2019-08-27 15:58:14 -04:00
Edward Thomson cc7f3505fc Spelling fixes in action description (#7)
Fix typo 'iusses' -> 'issues'.  Also update 'prs' to 'pull requests'.
2019-08-19 14:34:16 -04:00
Danny McCormick dc7133054e Add most recent action 2019-08-06 16:25:08 -04:00
Chris Patterson 62b122fb5f Initial import 2019-08-03 21:34:59 -04:00