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

feat: add auto PR / issue close after being stale for a certain amount of time #1317

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

Conversation

monilpat
Copy link
Collaborator

@monilpat monilpat commented Dec 21, 2024

Relates to:
#1318

This PR addresses the need to manage inactive issues and pull requests by implementing a workflow that automatically marks them as stale after a period of inactivity.

Risks

  • Risk Level: Low
  • Potential Impact: The workflow may inadvertently mark active issues or pull requests as stale if there is a lack of recent activity, potentially causing confusion among contributors.

Background

What does this PR do?

This PR introduces a GitHub Actions workflow that automatically marks issues and pull requests as stale after a specified period of inactivity and subsequently closes them if no further activity occurs.

What kind of change is this?

  • Features (non-breaking change which adds functionality)

Documentation changes needed?

  • My changes require a change to the project documentation.
  • I have updated the documentation accordingly to include information about the new workflow and how it manages stale issues and pull requests.

Testing

Where should a reviewer start?

Review the newly added workflow file located at .github/workflows/stale.yml.

Detailed testing steps

  1. Review Workflow Configuration:

    • Ensure that the days-before-stale and days-before-close parameters are set to appropriate values that align with the project's maintenance policies.
  2. Simulate Inactivity:

    • Create a test issue and a test pull request.
    • Manually adjust their timestamps to simulate inactivity beyond the days-before-stale threshold.
  3. Trigger Workflow:

    • Manually trigger the workflow to process the test issue and pull request.
    • Verify that the workflow adds the 'stale' label and posts the configured stale message.
  4. Simulate Further Inactivity:

    • Allow the test issue and pull request to remain inactive beyond the days-before-close threshold.
  5. Trigger Workflow Again:

    • Manually trigger the workflow again.
    • Verify that the workflow closes the test issue and pull request and posts the configured close message.
  6. Activity Check:

    • Create another test issue and add a comment before it reaches the days-before-stale threshold.
    • Ensure that the workflow does not mark it as stale, confirming that activity resets the inactivity timer.

Discord username

0x8664

Base automatically changed from develop to main December 22, 2024 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant