-
Notifications
You must be signed in to change notification settings - Fork 357
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
[CORL-2948] emit moderation actions #4377
Conversation
✅ Deploy Preview for gallant-galileo-14878c canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aggregating commentActions
instead of actions
. moderationAction
is a single object rather than an array, and isn't aggregated because Moderation Actions set a status on the comment, and so short circuit the pipeline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming field
Pick<PhaseResult, "actions" | "status" | "tags"> | ||
>; | ||
Pick<PhaseResult, "status" | "tags"> | ||
> & { actions: PhaseResult["commentActions"] }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because our public API for external moderation phases still accepts the actions
field, but their type is now internally called commentActions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This make sense and thanks for adding in the new mod actions distinction! Solid refactor!
also flag comment before rejecting for banned word
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The refactor looks good overall!
I did notice that when banned words are rejected, their moderation cards don't include the Banned word
marker next to Details
at the bottom of the card. The MarkersContainer
component is checking in actionCounts flag reasons for whether to show that. Is there a way to update so this is still included in the moderation card in this case?
What does this PR do?
This PR updates our comment moderation pipeline to distinguish between
commentActions
andmoderationActions
during the pipeline. It causes certain phases to conditionally emit amoderationAction
field that sets the status and terminates the pipeline.These changes will impact:
What changes to the GraphQL/Database Schema does this PR introduce?
none.
Does this PR introduce any new environment variables or feature flags?
No.
If any indexes were added, were they added to
INDEXES.md
?n/a
How do I test this PR?
Where any tests migrated to React Testing Library?
No.
How do we deploy this PR?
No special considerations should be needed.