Skip to content

fix: discussions not closing after 30 days of being stale#481

Merged
mvadari merged 2 commits intoXRPLF:masterfrom
mvadari:fix-discussion-close
Feb 26, 2026
Merged

fix: discussions not closing after 30 days of being stale#481
mvadari merged 2 commits intoXRPLF:masterfrom
mvadari:fix-discussion-close

Conversation

@mvadari
Copy link
Collaborator

@mvadari mvadari commented Feb 24, 2026

High Level Overview of Change

Title says it all.

Context of Change

e.g. this discussion: #105 (comment)

Type of Change

  • Infrastructure (CI, workflows, scripts, website)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 updatedAt timestamp
  • 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.

@mvadari mvadari merged commit 2f87a23 into XRPLF:master Feb 26, 2026
4 checks passed
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.

3 participants