lab132 / buildbot-gitea

Buildbot plugin for integration with gitea.
MIT License
62 stars 21 forks source link

Push handler leaves changes empty when pushing tags #26

Open r7l opened 2 years ago

r7l commented 2 years ago

Hello,

looking at the code, it should do something when pushing tags:

# We only care about regular heads or tags
match = re.match(r"^refs/(heads|tags)/(.+)$", refname)

Not sure how it is supposed to be used but pushing a tag without any further commit, does not fill anything to changes since Gitea leaves commits empty and therefor the event will be skipped by the scheduler.

This can easily be reproduced with the following steps:

pampersrocker commented 2 years ago

Hey, thank you for the report!

I am currently very busy right now, but the only thing that comes to mind in this case is that gitea might be sending a different request when pushing tags that are not handled correctly at the moment.

r7l commented 2 years ago

Thanks for the response. For now i've managed around the issue, using the create event in a custom hook. The structure of the response from Gitea is differently when creating tags compared to a push. This leads to a number of issues, i've curved by only using the info i actually need.