Allow TagBot to handle Copilot PRs#408
Allow TagBot to handle Copilot PRs#408IanButterworth merged 2 commits intoJuliaRegistries:masterfrom
Conversation
|
@IanButterworth Would you be able to review this? |
IanButterworth
left a comment
There was a problem hiding this comment.
Is there an isdefined equivalent in python? It seems brittle to special case this so much?
So the problem is that Ordinarily this lookup will succeed, and I assume that that's what we want to do for ordinary users, but for Copilot it fails and we can't check for that without either using some PyGithub internals, or making an upstream change to PyGithub. If you'd prefer something that doesn't special-case Copilot we could maybe do: try:
name = user.name or user.login
except github.GithubException.UnknownObjectException:
name = user.loginI prefer the original because it recognises that Copilot is indeed a special case, whereas this might mask more errors that we are yet unaware of, but I'm not fussed and am very happy to change it. |
|
Ok! Seems like an upstream bug. The fix seems like an improvement at least. |
|
I'm going to merge the dep updates first to try and get CI green here. |
This line fails when the user is the special GitHub copilot bot, meaning that TagBot will always error if Copilot has had a PR in a repo merged. Specifically, fetching
user.nameultimately leads to the PyGithub library querying https://api.github.com/users/Copilot which throws a 404 error.TagBot/tagbot/action/changelog.py
Line 187 in 2923435
This PR fixes it. An example of a release created with this patch of TagBot (I ran it locally) can be found at https://github.com/TuringLang/AbstractPPL.jl/releases/tag/v0.13.1.
I'm unsure why CI is failing, but it seems rather unrelated to this PR.