fix: discussions not closing after 30 days of being stale#481
Merged
mvadari merged 2 commits intoXRPLF:masterfrom Feb 26, 2026
Merged
fix: discussions not closing after 30 days of being stale#481mvadari merged 2 commits intoXRPLF:masterfrom
mvadari merged 2 commits intoXRPLF:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where stale discussions were not being closed after 30 days of inactivity. The root cause was a mismatch between how the GraphQL and REST APIs handle bot usernames (GraphQL returns without [bot] suffix, REST requires it), and an incorrect reliance on the updatedAt timestamp which gets updated by the bot's own warning comment.
Changes:
- Fixed bot login handling to use the correct format for each API (without
[bot]suffix for GraphQL, with suffix for REST API verification) - Updated discussion closing logic to check for actual non-bot user activity after warnings instead of relying on the
updatedAttimestamp - Added explanatory comments documenting the API behavior differences
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/discussions.yml |
Removed [bot] suffix from BOT_LOGIN environment variable to match GraphQL API format |
.github/scripts/process-stale-discussions.sh |
Added [bot] suffix only for REST API user verification, with comments explaining the API differences |
.github/scripts/filter-discussions-to-close.jq |
Changed closing criteria from checking updatedAt timestamp to counting non-bot comments after the warning, which correctly identifies discussions with no user activity |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Tapanito
approved these changes
Feb 26, 2026
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
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.
High Level Overview of Change
Title says it all.
Context of Change
e.g. this discussion: #105 (comment)
Type of Change