golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
122.95k stars 17.53k forks source link

x/build/cmd/gerritbot: uses too much GitHub quota #50197

Open heschi opened 2 years ago

heschi commented 2 years ago

gerritbot makes GitHub API requests for each open PR. There are enough open PRs across all the Go repositories that each gerritbot restart consumes most (maybe all?) of our 5000 requests per hour.

In response, today I closed all the PRs that were opened more than a year ago. This has had the effect of annoying a number of people and probably is not a tenable plan long-term. It seems we'll have to figure out a way to avoid looking at unmodified PRs that works across restarts.

mvdan commented 2 years ago

Perhaps related: gerritbot could automatically close PRs fixing proposal issues that have been declined. That is, the issue is closed, has the Proposal label, but not the Proposal-Accepted label.

I found one manually right now (https://github.com/golang/go/pull/48267); I'm sure there are at least a handful of others right now, at least. The authors rarely close the PRs themselves, and auto-closing these shouldn't be too hard in terms of code logic.

Edit: also https://github.com/golang/go/pull/47640 and https://github.com/golang/go/pull/48015. I'm stopping the manual search here for now :)