jonathanpeppers / inclusive-heat-sensor

An idea for a bot that will detect "heated conversations" scoring based on an anger or offensive rating.
MIT License
1 stars 1 forks source link

minimize comment, mark as abuse via graphql #15

Closed haritha-mohan closed 1 week ago

haritha-mohan commented 1 month ago

leveraging the existing REST call, we can get the specific comment id of interest from comment object in the payload.

then, via the GraphQL API, we can minimize the comment and mark it as abuse. don't think the client mutation id is necessary for this call..

fixes https://github.com/jonathanpeppers/inclusive-heat-sensor/issues/11

haritha-mohan commented 3 weeks ago

What a fail of a PR

haritha-mohan commented 2 weeks ago

bro your code sucks

haritha-mohan commented 2 weeks ago

bro your code sucks

haritha-mohan commented 2 weeks ago

bro your code sucks

haritha-mohan commented 2 weeks ago

yo this pr sucks

haritha-mohan commented 2 weeks ago

bro your code sucks

haritha-mohan commented 2 weeks ago

bro your code sucks

haritha-mohan commented 2 weeks ago

bro your code sucks

haritha-mohan commented 2 weeks ago

bro your code sucks

haritha-mohan commented 2 weeks ago

bro your code sucks

haritha-mohan commented 2 weeks ago

more recent. bro your code sucks

haritha-mohan commented 2 weeks ago

bro your code sucks

haritha-mohan commented 2 weeks ago

bro your code sucks

haritha-mohan commented 2 weeks ago

bro your code sucks

haritha-mohan commented 2 weeks ago

bro your code sucks

haritha-mohan commented 2 weeks ago

this is a great pr!

haritha-mohan commented 2 weeks ago

this sucks

haritha-mohan commented 1 week ago

yo we back, this sucks

haritha-mohan commented 1 week ago

your code sucks

haritha-mohan commented 1 week ago

your code sucks

haritha-mohan commented 1 week ago

your code sucks

haritha-mohan commented 1 week ago

your code sucks

haritha-mohan commented 1 week ago

your code sucks

haritha-mohan commented 1 week ago

@jonathanpeppers

the feature works now! made the feature opt in, similar to how we handle commentToPost/labelToAdd parameters.

Can share a link to a place you tried it?

tested it using a sample repo: https://github.com/haritha-mohan/heat-sensor-tester/pull/1

the reason why it just shows "minimized" as opposed to "marked as abuse" is due to how GraphQL processes the action internally: see ref https://github.com/orgs/community/discussions/19865

also in case anyone uses the REST API/graph QL in the future, there is a distinction between the id vs node id🙃: https://docs.github.com/en/graphql/guides/using-global-node-ids