On 8/13/20 12:19 PM, Ben Cooksley wrote:
The developer should receive an automated email from Bugzilla when this happens, informing them that their action failed due to the lack of an account. They should therefore be very much aware of the failure of the hook.
They do, but they seem to ignore it or not know how to proceed. Otherwise we wouldn't see this happen over and over. :)
On 8/13/20 12:19 PM, Ben Cooksley wrote:> The problem is that comments on Bugzilla have to be associated with an
account - so there isn't a check to remove here, as the issue is the lack of an account. Currently our hooks operate on the assumption that the 'author' email address on the Git commit will have a Bugzilla account, and try to use that account to make the necessary changes (add the comment, close the bug, change any necessary fields, etc). Should the account not exist, they're unable to proceed which is what causes the failure.
Thanks for explaining. That makes sense. On 8/13/20 12:19 PM, Ben Cooksley wrote:
The only way to implement what you are proposing would be to have all Bugzilla actions from commit hooks take place as a 'Bot' user.
That seems reasonable in the abstract, but this would mess with people's commit stats since their own Bugzilla accounts wouldn't get the credit for fixing bugs. :)
So here's an idea: close the bug with the committer's own Bugzilla account when an account is found that matches the email address in the commit. Otherwise, use a bot account so that the bug at least gets closed as intended. Could that work?
Nate