Skip to content

Discussion management#426

Merged
mvadari merged 67 commits intomasterfrom
discussion-management
Jan 28, 2026
Merged

Discussion management#426
mvadari merged 67 commits intomasterfrom
discussion-management

Conversation

@mvadari
Copy link
Collaborator

@mvadari mvadari commented Dec 23, 2025

This PR adds a bot that manages discussions in this repo. It comments in a discussion when it is old and closes and locks it if nobody responds.

Example: #97 (comment)
image

This comment was marked as resolved.

This comment was marked as resolved.

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 19 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +259 to +263
if ! gh api graphql -f query='mutation($discussionId: ID!, $body: String!) { addDiscussionComment(input: {discussionId: $discussionId, body: $body}) { comment { id } } }' -f discussionId="$DISCUSSION_ID" -f body="$CLOSE_MESSAGE"; then
echo " Error: Failed to add close comment for discussion #$DISCUSSION_NUMBER. Skipping close/lock for this discussion."
echo ""
continue
fi
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

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

When the close comment fails, the script continues to the next discussion without attempting to close or lock it, which is correct. However, if the comment was partially created (e.g., API accepted the request but the response was lost), subsequent runs might still try to close the discussion since no warning marker was added. This is acceptable behavior, but consider logging the discussion ID/number to a separate file for manual review in case of repeated failures.

Copilot uses AI. Check for mistakes.
@mvadari
Copy link
Collaborator Author

mvadari commented Jan 23, 2026

@Tapanito I reduced the threshold from 1000 to 900 so it would trigger: https://github.com/XRPLF/XRPL-Standards/actions/runs/21291035207/job/61284406705?pr=426

@mvadari mvadari merged commit dd47baf into master Jan 28, 2026
2 checks passed
@mvadari mvadari deleted the discussion-management branch January 28, 2026 15:41
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.

4 participants