Open imjasonh opened 2 years ago
This seems to be a good monthly query:
SELECT
url,
login as closer,
title,
num_comments
FROM (
SELECT
repo.name AS repo,
actor.login AS login,
JSON_EXTRACT(payload,
'$.issue.html_url') AS url,
JSON_EXTRACT(payload,
'$.issue.active_lock_reason') AS reason,
JSON_EXTRACT(payload,
'$.issue.comments') as num_comments,
JSON_EXTRACT(payload,
'$.issue.title') AS title
FROM
`githubarchive.month.202110`
WHERE
type = 'IssuesEvent')
WHERE
reason LIKE '%too heated%'
AND PARSE_NUMERIC(num_comments) > 10
ORDER BY num_comments DESC
From here I could probably set up a GitHub Action to run at the beginning of a month (using 🌟OIDC magic🌟), query for last month's issues, and fail the run to send me an email. It's not pretty but it'd work 🤷
Sometimes popular projects lock issues for being too contentious, and usually people just piling on meaningless "+1"s or "why haven't you fixed this yet you dummies" or whatever.
.type == "IssuesEvent"
: https://docs.github.com/en/developers/webhooks-and-events/events/github-event-types#issuesevent"active_lock_reason": "too heated"
off-topic
,too heated
,resolved
,spam
If this is too spammy you could filter for issues that have >N comments or unique commenters, or are for repos with lots of watchers/stars/forks.
If you don't care about immediate gratification, you could periodically (daily?) query the public BigQuery dataset provided by https://www.gharchive.org/ and send an email or something.
In fact, this is almost definitely going to be easier.
returns all locked-as-too-heated issues last month (well, 10 of them).
I could filter and sort until it's a nice little digest of internet drama. I could run this weekly/monthly/whatever on GHA and send me an email. I should see how much this is costing me in BQ bucks. 💰