Skip to content

Apply labels and close stale issues and PRs #5111

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

GarethCabournDavies
Copy link
Contributor

This implements a new GitHub action to apply labels warning that a PR or issue is stale, and closes it automatically if nothing happens for a week after it has been labelled stale

I think I've set it so that we can apply bug or long term labels so that this won't happen.

Standard information about the request

This is a new feature for GitHub management
This change has been proposed using the contribution guidelines

Motivation

I want to reduce the number of issues, and this is the easiest way to do that, rather than commenting on each one asking for an update.

Contents

Add a GitHub workflow which uses the Close Stale Issues action to mark and close issues/PRs

Links to any issues or associated PRs

I could link all the issues and PRs older than a couple of months, but lets not do that for now.

Testing performed

None

  • The author of this pull request confirms they will adhere to the code of conduct

@GarethCabournDavies GarethCabournDavies added github_actions Pull requests that update GitHub Actions code code-quality Improvements to code quality labels Apr 28, 2025
@spxiwh
Copy link
Contributor

spxiwh commented Apr 29, 2025

This makes sense to me, but I'd like @ahnitz 's approval as well before merging.

@titodalcanton
Copy link
Contributor

I generally dislike this approach to issues, but will not oppose if there is consensus from others.

@ahnitz
Copy link
Member

ahnitz commented Apr 29, 2025

I think this is fine. The main issue is making sure people then add long-term labels to planning things and 'bug' as appropriate.

@spxiwh spxiwh requested a review from Copilot April 29, 2025 15:43
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a GitHub workflow to automatically mark stale issues and PRs, reducing backlog by closing those inactive for 60 days.

  • Adds a new GitHub action workflow using actions/stale@v9.
  • Configures exempt labels ("bug" and "long term") to prevent auto-closure of important items.

@GarethCabournDavies
Copy link
Contributor Author

I do see this as more a reminder to close if things are transient, or a kick to get things moving if it has just been delayed

Please approve or reject if we don't want this

@GarethCabournDavies
Copy link
Contributor Author

Ping on this

stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
close-issue-message: 'This issue was closed because it has been labelled as stale for 7 days with no activity.'
close-pr-message: 'This PR was closed because it has been labelled as stale for 7 days with no activity.'
exempt-issue-labels: 'long term,bug'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
exempt-issue-labels: 'long term,bug'
exempt-issue-labels: 'long term,bug,work in progress'

Looking back at some of the older PRs, it may be worth adding work in progress to the list, especially for those of us who have back-burner projects on the go. I realise this is pretty much equivalent to long term, but with different reasoning behind it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-quality Improvements to code quality github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants