Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
x/build/cmd/gitmirror: lock commit conversations #25450
Occasionally a GitHub user will post a comment on a commit. Frequently these are spam which leads to nuisance emails generated if you watch the repo. Very occasionally these are requests for help, which currently require a human to reply, reminding the OP to raise an issue. This also generates nuisance emails.
I propose that the bot should blanket lock discussion on all commits in this repo.
SGTM. But we don't record any GitHub commit activity in maintner, so the bot wouldn't know what it has or hasn't already done. But I suppose it could do occasional background queries of the past few dozen commits and lock any that aren't locked, and not use maintner at all.
I've looked into this.
I think a better place to implement this might be in
According to https://help.github.com/articles/locking-conversations/, it's possible to:
I've looked into GitHub API v3 and I found existing endpoints to lock conversation on issues (https://developer.github.com/v3/issues/#lock-an-issue). I don't see a dedicated method for locking conversation on PRs, but I would guess the same endpoint might work on PRs because PRs are treated like issues in many ways.
However, I don't see an endpoint for locking conversation on commits at https://developer.github.com/v3/repos/commits/. It's possible it exists, but like for PRs, doesn't have documentation coverage.
I've also looked into GitHub API v4 and it contains a pretty generic
So, the next step is to check if GitHub has API support for locking commits programmatically (and request it if not).
Edit: I've created https://platform.github.community/t/api-to-lock-conversations-on-commits/6891 to request this for GitHub GraphQL API v4.