roots / issue-closer-action

GitHub action to automatically close issues/PRs that don't match a regexp
MIT License
34 stars 5 forks source link

Feature Request: change `close-issue-reason` to `not_planned` #3

Open joey-ma opened 1 year ago

joey-ma commented 1 year ago

Terms

Summary

I appreciate how Issue auto-closer aims to close issues that did not follow the issue templates, but I think it would make sense to close it as not_planned instead of completed (which kind of contradicts with the issue-close-message: "this issue was automatically closed because it did not follow the issue template").

Motivation

Why are we doing this?

Improve clarity and consistency; i.e., the issue is closed not because it is completed, but it is closed because it is not planned.

image image

What use cases does it support?

I think it improves consistency for original intention of issue-closer-action. Another perspective is that it can also introduce flexibility if it is added as an optional input, as not required and with a default value of not_planned.

What is the expected outcome?

image

    steps:
    - name: Autoclose issues that did not follow issue template
      uses: roots/issue-closer@v1.1
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        close-issue-reason: not_planned 
        # makes more sense than `completed` 
        # and introduces flexibility should user wants to change it

Potential conflicts / foreseeable issues

None, except to add this info in the README.md / documentation.

Additional Context

On a side note, I am seeing this in warning in Annotations. I'm hesitant to turn this into another issue, though. Please let me know if I should.

autoclose

Node.js 12 actions are deprecated. For more information see:
https://github.blog/changelog/2022-09-22-github-actions-all-
actions-will-begin-running-on-node16-instead-of-node12/. 
Please update the following actions to use Node.js 16: 
roots/issue-closer@v1.1

Not sure how I can confirm running on node16 would not introduce bugs, but I believe Node.js 18 is now out and node12 does seem a bit behind. Will you update this as well?

swalkinshaw commented 1 year ago

Adding the close-issue-reason reason sounds like a good idea to me 👍 You're welcome to contribute a PR

Not sure how I can confirm running on node16 would not introduce bugs, but I believe Node.js 18 is now out and node12 does seem a bit behind. Will you update this as well?

Probably not, but you can if you want.