Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to not close stale issues/prs #16

Merged
merged 2 commits into from
Apr 13, 2020
Merged

Add option to not close stale issues/prs #16

merged 2 commits into from
Apr 13, 2020

Conversation

damccorm
Copy link
Contributor

@damccorm damccorm commented Sep 4, 2019

Fixes #15

src/main.ts Outdated
if (wasLastUpdatedBefore(issue, args.daysBeforeClose)) {
operationsLeft -= await closeIssue(client, issue);
} else {
if (args.daysBeforeClose < 0) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could do:

if (args.daysBeforeClose >= 0 && wasLastUpdatedBefore(issue, args.daysBeforeClose)) {
  operationsLeft -= await closeIssue(client, issue);
} else {
  continue;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's cleaner

@eileenmcnaughton
Copy link

This is 'approved' but not merged. Is there a way to 'use' unmerged PRs in github workflows?

@damccorm
Copy link
Contributor Author

@bryanmacfarlane this should probably be merged (or a different solution should be found)

@bryanmacfarlane
Copy link
Member

@eileenmcnaughton - you should be able to use the @dont-close-option ref after the action name. Can you validate the change using that branch ref?

@goanpeca
Copy link

goanpeca commented Dec 9, 2019

Is this being merged soon 🙃 ?

@hross hross merged commit c5c8bac into master Apr 13, 2020
@bretterer
Copy link

It appears that this is still valid for not closing (adding days-before-close: -1 to the with options. Is this correct? It is not documented in the readme, but is documented in actions.yml still

@C0ZEN
Copy link
Contributor

C0ZEN commented Feb 13, 2021

@bretterer if you set days-before-close to -1 all issues and PRs will not be closed.
Note that days-before-issue-close and days-before-pr-close can also have this at -1 to override a particular case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to configure the action to not close stale issues/PRs automatically?
9 participants