Skip to content

new workflow: close stale prs after 60 days#31633

Merged
katbyte merged 3 commits intomainfrom
kt/stale-draft-prs
Feb 11, 2026
Merged

new workflow: close stale prs after 60 days#31633
katbyte merged 3 commits intomainfrom
kt/stale-draft-prs

Conversation

@katbyte
Copy link
Copy Markdown
Collaborator

@katbyte katbyte commented Jan 30, 2026

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

Adds a new GitHub Actions workflow to automatically manage stale draft PRs, since the standard actions/stale bot doesn't support filtering by draft status (see actions/stale#1314).

Behavior:

  • Draft PRs inactive for 30+ days are labeled stale-draft with a warning comment
  • Draft PRs inactive for 60+ days are automatically closed with a comment
  • Draft PRs with the keep-draft label are exempt from this process

The workflow runs weekly on Mondays at 6am UTC and can also be triggered manually via workflow_dispatch.

PR Checklist

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.
    For example: "resource_name_here - description of change e.g. adding property new_property_name_here"

Changes to existing Resource / Data Source

N/A - This PR adds a new workflow and does not modify any existing resources or data sources.

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)

Script tested locally with dry-run flag (-d) against the repository. The workflow can be manually triggered via workflow_dispatch for testing in CI.

Change Log

Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.

N/A - internal workflow change, no user-facing changelog entry required.

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

N/A

AI Assistance Disclosure

  • AI Assisted - This contribution was made by, or with the assistance of, AI/LLMs

Script and workflow generated with AI assistance.

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the provider.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

No changes to security controls. The workflow uses the standard GITHUB_TOKEN with appropriately scoped permissions (issues: write, pull-requests: write).

Note

If this PR changes meaningfully during the course of review please update the title and description as required.

Copy link
Copy Markdown
Collaborator

@sreallymatt sreallymatt left a comment

Choose a reason for hiding this comment

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

Thanks @katbyte - LGTM :shipit:

@katbyte katbyte merged commit a7e3492 into main Feb 11, 2026
22 checks passed
@katbyte katbyte deleted the kt/stale-draft-prs branch February 11, 2026 16:06
@github-actions github-actions bot added this to the v4.60.0 milestone Feb 11, 2026
anurag-hashicorp pushed a commit to anurag-hashicorp/terraform-provider-azurerm that referenced this pull request Feb 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants