Skip to content

Add days-before-lock and lock-reason options to lock issues and Pull requests #1188

Open
@Andre601

Description

@Andre601

Description:
The Stale action should allow defining options to Lock an issue and/or Pull request after being closed for a number of days.

Here are the options I propose alongside their default values:

days-before-lock: -1 # Days the issue is closed before being locked. Disabled by default.
days-before-issue-lock: -1 # Override for issues. Disabled by default.
days-before-pr-lock: -1 # Override for Pull requests. Disabled by default

lock-reason: resolved # Reason for the Lock. Should allow off_topic, resolved, spam or too_heated
lock-issue-reason: resolved # Override for issues.
lock-pr-reason: resolved # Override for Pull requests.

lock-message: '' # Message to send when locking the issue/Pull request.
lock-issue-message: '' # Override for issues.
lock-pr-message: '' # Override for Pull requests.

Justification:
When an issue has been marked as stale, and later on was closed for being stale, a good practice may also be to lock these issues later on, to avoid people commenting on them, causing possibly dozens of individuals to receive notifications for an issue that has been closed months if not years ago.

Locking an issue after a while of being closed and still inactive seem like a good practice here to combat unwanted spam in the end while keeping the issue-tracker up-to-date.

The only current alternative to achieve the same result is to have a separate action for locking issues, which may work, but not only requires to maintain a separate action (keep it updated), but could even be incompatible in some way with the stale action (i.e. only checks for days of being closed and not for things such as specific labels).

Having such options in the stale action would allow easier maintenance and management of the issue and Pull request trackers

I hope it can be considered.
If not, then I would be open for recommendations of proper stale action + lock action combinations that work reliably and without causing too much strain on the GitHub API.

Are you willing to submit a PR?
I would be willing to contribute, but I'm not experienced in the coding language used to provide Pull requests myself.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or request to improve the current logic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions