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

Webhook doesn't send on repository delete event #9180

Closed
2 of 7 tasks
matrozov opened this issue Nov 27, 2019 · 6 comments
Closed
2 of 7 tasks

Webhook doesn't send on repository delete event #9180

matrozov opened this issue Nov 27, 2019 · 6 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/enhancement An improvement of existing functionality

Comments

@matrozov
Copy link

matrozov commented Nov 27, 2019

  • Gitea version (or commit ref): 1.11.0+dev-331-g055f6d229
  • Git version: not needed
  • Operating system: Docker container from gitea/gitea
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

No notifications are sent via webhook upon the deletion of the repository. The notification is not a joke either when specifying a webhook in the repository settings, or when specifying a global webhook.

@matrozov matrozov changed the title Webhook does't send on repository delete event Webhook doesn't send on repository delete event Nov 27, 2019
@stale
Copy link

stale bot commented Jan 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label Jan 26, 2020
@lunny
Copy link
Member

lunny commented Jan 27, 2020

Currently repository webhooks will not be sent but I think Orgnization webhooks should be sent.

@stale stale bot removed the issue/stale label Jan 27, 2020
@lunny lunny added type/enhancement An improvement of existing functionality issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented labels Jan 27, 2020
@matrozov
Copy link
Author

Currently repository webhooks will not be sent but I think Orgnization webhooks should be sent.
In the configuration of the global webhook it is written like this: creating and deleting a repository. That's why I started this bug, because when I deleted the repository I did not see the global webhook working.

@lunny
Copy link
Member

lunny commented Feb 1, 2020

@matrozov That's not global webhook. It's a default webhook.

zeripath pushed a commit that referenced this issue Oct 2, 2020
This small PR changes the webhook trigger behaviour to be more in line with what's expected. (When 'repository' events are enabled, of course)

In other words:

For system-wide or default webhooks, repository events will now trigger said webhook. Previously it had to be under an organization for create events to be visible - a tad unexpected!
Deleting a repository will now fire its own defined webhooks, not just organisational and system ones.
In order to enable the latter the webhook has to now be triggered before the actual repo undergoes deletion. I'm willing to tweak this to try and 'grab' the webhook model beforehand and trigger the webhook notifier directly afterwards, but this may make the code more complex for little benefit.

Closes #11766, #9180.
@jamesorlakin
Copy link
Contributor

This has been fixed in master (due to become 1.13), and I've opened a backport to fix this for 1.12.

@zeripath
Copy link
Contributor

zeripath commented Oct 4, 2020

Fixed by #13008

@zeripath zeripath closed this as completed Oct 4, 2020
@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/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants