-
Notifications
You must be signed in to change notification settings - Fork 371
feat: add automated issue auto-close workflows with dry-run testing #832
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…support - Daily workflow checks issues with configurable label after X days - Removes label if unauthorized users comment, closes if only authorized users - Supports team-based or write-access authorization modes - Includes comprehensive input validation and error handling - Adds manual trigger with dry-run mode for safe testing
- Replace github.rest.search.issuesAndPullRequests with github.rest.issues.listForRepo - Add pagination support to handle repositories with many labeled issues
- Add missing try block around main logic - Fix indentation alignment for proper nesting - Resolves "Unexpected token 'catch'" error
- Check for unauthorized comments before time validation - Remove label instantly when non-authorized users respond
- Add REPLACEMENT_LABEL environment variable for optional label substitution - Apply replacement label when unauthorized users comment and auto-close label is removed
pgrayy
reviewed
Sep 11, 2025
- Merge auto-close-3-days.yml and auto-close-7-days.yml into auto-close.yml - Use matrix strategy to handle both 3-day and 7-day label processing
Unshure
reviewed
Sep 11, 2025
Can you share an example workflow where this has run? |
mehtarac
reviewed
Sep 11, 2025
Example runs from testing; please let me know if you don't have access for some reason. |
Unshure
requested changes
Sep 11, 2025
Unshure
approved these changes
Sep 12, 2025
mehtarac
approved these changes
Sep 12, 2025
pgrayy
approved these changes
Sep 12, 2025
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds two GitHub workflows to automatically manage stale issues with configurable timeouts.
Key features include
• Environment variables for all settings (label names, timeouts, auth modes)
• Flexible authorization modes (user list or write permissions)
• Label removal when external users respond
• Optional replacement label when removing auto-close labels
• Support for issues, pull requests, or both
• Weekday-only scheduling (9 AM EST, Monday-Friday)
Files Added
• .github/workflows/auto-close-3-days.yml - Auto-close workflow with 3-day timeout
• .github/workflows/auto-close-7-days.yml - Auto-close workflow with 7-day timeout
Workflow Logic
Related Issues
Documentation PR
Type of Change
New feature
Testing
Tested on a forked branch, tested shadow mode, live mode, removal, and addition of labels.
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.