Replies: 1 comment
-
|
Discussions themselves are not counted in that statistics. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
The recent change in
scripts/people.pythat excludes minimized comments/replies from the FastAPI People statistics is incomplete for top-level discussions.The GraphQL query now fetches
minimizedReasonfor each discussion node, butDiscussionsNodedoes not model that field andget_discussions_experts()never checks it before processing the discussion's comments/replies.As a result, a minimized discussion can still contribute participants to the People stats through its non-minimized replies/comments, even though the thread itself has already been moderation-minimized.
Relevant recent change
0227991(🔨 Exclude spam comments from statistics in scripts/people.py)What I observed
In
scripts/people.py:minimizedReasonon the discussion node itself.DiscussionsNodeonly defines:numberauthortitlecreatedAtcommentsget_discussions_experts()filterscomment.minimizedReasonandreply.minimizedReason, but never filters the discussion/thread itself.That means the top-level moderation state is fetched but ignored.
Why this matters
If a discussion is minimized for spam / abuse / off-topic / duplicate reasons, the script still traverses that discussion and can count participants from replies/comments under that thread.
So the recent fix is only partial: it excludes minimized comments, but not minimized discussions.
Expected behavior
If a discussion itself is minimized for one of the excluded reasons, the script should skip the entire discussion when computing People statistics.
Possible fix
minimizedReason: LowerStr | None = NonetoDiscussionsNodeget_discussions_experts(), skip processing when:Extra note
Because the GraphQL query already requests the field, this looks like an accidental omission rather than a design decision.
Beta Was this translation helpful? Give feedback.
All reactions