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 days-before-lock and lock-reason options to lock issues and Pull requests #1188

Open
Andre601 opened this issue Nov 28, 2024 · 1 comment
Labels
feature request New feature or request to improve the current logic

Comments

@Andre601
Copy link

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.

@Andre601 Andre601 added feature request New feature or request to improve the current logic needs triage labels Nov 28, 2024
@priyagupta108
Copy link

Hi, @Andre601 👋,
Thank you for the feature request, we will investigate it and get back to you as soon as we have updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

2 participants