Skip to content

Conversation

@hrideshmg
Copy link
Member

@hrideshmg hrideshmg commented Oct 13, 2025

This PR removes the current discord based status update system and migrates it to the new mail based system which relies on Root.

Pre-requisite PR: amfoss/root#154

Summary of changes:

  • Removed the graphQL mutations as they are no longer used.
  • Updated the models and fetch query to reflect the new refactored root syntax.
  • Uses data from root to exclude members who have status updates suspended, logic for this can be found in feat: implement status update breaks root#154
  • The consecutiveMiss attribute is used to find the strikes for the members (also accounts for status breaks), see above PR for more info.
  • Removed redundant and dead code

This commit removes the current discord based status update
functionality from amD and instead uses the updated root queries to
generate the status update report for the day.

Currently an MVP, the code needs some more cleanup for a full clean
migration.
Copilot AI review requested due to automatic review settings October 13, 2025 09:02
Copy link

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 migrates from a Discord channel-based status update system to a mail-based system using Root's GraphQL API. The change simplifies the codebase by removing Discord message parsing and streak management logic, replacing it with direct data retrieval from Root.

  • Replaces Discord channel monitoring with Root GraphQL queries for status update data
  • Removes GraphQL mutation logic for streak management as it's now handled by Root
  • Updates data models to reflect the new API schema with status information

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/tasks/status_update.rs Major refactoring to use Root API instead of Discord message parsing
src/tasks/mod.rs Renamed task struct from StatusUpdateCheck to StatusUpdateReport
src/ids.rs Removed unused channel IDs for Discord-based status checking
src/graphql/queries.rs Updated query to fetch member data with status information for specific dates
src/graphql/mutations.rs Completely removed file as streak mutations are no longer needed
src/graphql/models.rs Updated models to support new Root API schema with status tracking
src/graphql/mod.rs Removed mutations module reference

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ivinjabraham
Copy link
Member

Is this up for review?

@hrideshmg
Copy link
Member Author

Is this up for review?

Yep, I just have to make the Root PR for the miss streaks. Work is already done, just have to push.

@hrideshmg hrideshmg force-pushed the mail_system_updates branch from 7476314 to a3abad0 Compare October 14, 2025 08:20
@hrideshmg
Copy link
Member Author

hrideshmg commented Oct 14, 2025

@ivinjabraham this is ready for review. Just tested it on a copy of the production database. Once we merge this and the prerequisite PR, we can fully move to the mail based system

Copy link
Member

@ivinjabraham ivinjabraham left a comment

Choose a reason for hiding this comment

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

LGTM

@ivinjabraham ivinjabraham merged commit efea35c into amfoss:develop Oct 25, 2025
2 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.

2 participants