While working on https://github.com/nix-community/buildbot-nix I've noticed that al PR changes are considered as changes to master branch, which differs from what the upstream GitHub upstream webhook handler does, see the attached screenshots:


I think the problem is here, because the branch attribute of the change is set to base["branch"] when I think it should be head["branch"].
https://github.com/lab132/buildbot-gitea/blob/master/buildbot_gitea/webhook.py#L102