feat: add auto PR / issue close after being stale for a certain amount of time
Relates to: https://github.com/ai16z/eliza/issues/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
-
Review Workflow Configuration:
- Ensure that the
days-before-staleanddays-before-closeparameters are set to appropriate values that align with the project's maintenance policies.
- Ensure that the
-
Simulate Inactivity:
- Create a test issue and a test pull request.
- Manually adjust their timestamps to simulate inactivity beyond the
days-before-stalethreshold.
-
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.
-
Simulate Further Inactivity:
- Allow the test issue and pull request to remain inactive beyond the
days-before-closethreshold.
- Allow the test issue and pull request to remain inactive beyond the
-
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.
-
Activity Check:
- Create another test issue and add a comment before it reaches the
days-before-stalethreshold. - Ensure that the workflow does not mark it as stale, confirming that activity resets the inactivity timer.
- Create another test issue and add a comment before it reaches the
Discord username
0x8664