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

Deleting a branch after merging a PR does not trigger webhook #6181

Closed
2 of 7 tasks
LBlaboon opened this issue Feb 25, 2019 · 5 comments
Closed
2 of 7 tasks

Deleting a branch after merging a PR does not trigger webhook #6181

LBlaboon opened this issue Feb 25, 2019 · 5 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug

Comments

@LBlaboon
Copy link

  • Gitea version (or commit ref): 1.7.2
  • Git version: 2.20.1
  • Operating system: Arch Linux
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

After merging a branch from a PR, if you delete the branch from the web interface then any webhooks configured to trigger on the "Delete" event will not be triggered. The webhook is only triggered when deleting a branch remotely (via git push origin :branch).

I reported the same issue with Gogs a few months ago and it was fixed with this commit: gogs/gogs@1ec365d

I'm guessing the same thing will need to be applied here.

@lunny lunny added the type/bug label Feb 26, 2019
@stale
Copy link

stale bot commented Apr 27, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Apr 27, 2019
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Apr 27, 2019
@stale stale bot removed the issue/stale label Apr 27, 2019
@RobH123
Copy link

RobH123 commented Nov 3, 2019

To confirm: Using v1.9.5 Gitea webhooks with All Events selected, deleting a repo branch by clicking on the trash-can icon from inside the Branch(es) GUI handler correctly gives a delete notification for the branch (followed by a somewhat unexpected push notification with commits=[ ] and after=all zeroes).

However, if you merge a PR (gives 3 notifications: pull_request [opened], pull_request [closed], and push) and then delete the branch from inside that PR GUI handler, NO FURTHER NOTIFICATIONS are given, or more specifically, there is no webhook notification that the branch has been deleted.

BTW, the documentation at https://docs.gitea.io/en-us/webhooks/ is very minimal -- a list of what notifications are given by what events would be very helpful. (I'm still trying to figure out what particular event sends the create notification. Tried looking through the code but quickly got lost -- I can see ActionCreateRepo, ActionCreateIssue, ActionCreatePull Request, and crudActionCreateFile in the code, but can't easily match those to which webhooks are actually called and from where, e.g., I think from what I've seen flying by in my webhook handler, create issue gives a issue webhook, not a create one?)

@bhalbright
Copy link
Contributor

Just leaving a note that I'm going to try to fix this bug.

@bhalbright
Copy link
Contributor

This issue can be closed, it was fixed by PR #9424 and was also backported to 1.10.0

@techknowlogick
Copy link
Member

@bhalbright thanks :)

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Projects
None yet
Development

No branches or pull requests

5 participants