Commit Graph

21 Commits

Author SHA1 Message Date
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
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
Geoffrey Testelin
ddc7648635 fix(remove-label): do not encode the label to make sure to remove it (#220)
* test: add two more tests relating the label syntax issues

both are failing

* chore: add more logs and fix the tests on error

meaning that I did not find a reproduction...

* chore: minor improvements with the types and logs

* fix(remove-label): do not encode the label to make sure to remove it

could lead to an issue since based on the comment it was here on purpose
2021-01-15 06:51:24 -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
Phillip Johnsen
c2daa6ff62 Avoid changing default options in tests (#102)
Primarily because changing the default options shared amongst tests will
affect other tests.
2020-07-13 16:18:51 -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
Filip Jeremic
db0a20585c Update issue.updated_at if we have just marked an issue stale (#85)
This is to ensure we do not close issues before days-before-close has
expired. Without this fix we can encounter a situation where an issue
gets marked as stale and it gets closed immediately without waiting
days-before-close number of days.
2020-05-29 09:32:20 -04:00
Ross Brodbeck
b6f9559915 Update logging to be info level, fix un-staling of issues (#83)
* The bot would un-stale issues because of how it checked staleness
* Made logging info by default so its easier to troubleshoot customer issues/runs
* Updated operation counts
2020-05-26 09:16:38 -04:00
Ross Brodbeck
96b682d29f Fix an issue where the bot doesn't ignore its own comments (#73) 2020-05-18 20:33:59 -04:00
Ross Brodbeck
5ce6b77f2c Fix issue close/stale dates (#72)
Added tests to confirm behavior.
2020-05-18 20:08:31 -04:00
Ross Brodbeck
e611bf905b Close stale issues even if they were just marked stale (#64) 2020-05-11 11:15:05 -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
James M. Greene
ae2c5c5308 Prevent processing of locked/closed issues/PRs (#52)
Fixes #50
Fixes #51
2020-04-27 07:53:58 -04:00
Ross Brodbeck
a23bda33c4 Update the readme, add a test (#46)
* Add a test to days = -1
* Update the readme on how to build it
2020-04-16 14:23:28 -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
Chris Patterson
62b122fb5f Initial import 2019-08-03 21:34:59 -04:00