Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push handler leaves changes empty when pushing tags #26

Open
r7l opened this issue Jan 25, 2022 · 2 comments
Open

Push handler leaves changes empty when pushing tags #26

r7l opened this issue Jan 25, 2022 · 2 comments

Comments

@r7l
Copy link
Contributor

r7l commented Jan 25, 2022

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:

  • Create a new repo with a single branch
  • Add a commit or two
  • Push those commits
  • Create a tag and push it
@pampersrocker
Copy link
Contributor

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
Copy link
Contributor Author

r7l commented Feb 6, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants