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

No system webhook triggered for repository migration #13996

Closed
3 of 6 tasks
kasbah opened this issue Dec 15, 2020 · 0 comments · Fixed by #14004
Closed
3 of 6 tasks

No system webhook triggered for repository migration #13996

kasbah opened this issue Dec 15, 2020 · 0 comments · Fixed by #14004
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@kasbah
Copy link

kasbah commented Dec 15, 2020

  • Gitea version (or commit ref): 980b0df
  • Git version:
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No (need admin access)
  • Log gist:

Description

System webhooks (added with #10546) trigger when you create a new repository but not when you migrate a repository.

Steps to reproduce

  • Compile and run a local Gitea
  • Start a web server that will log webhook attempts, e.g.
$ python3 -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...

image

  • Add a new repository, see that the web server logs them (the 501 error is expected)
127.0.0.1 - - [15/Dec/2020 14:30:05] code 501, message Unsupported method ('POST')
127.0.0.1 - - [15/Dec/2020 14:30:05] "POST / HTTP/1.1" 501 -
  • Migrate a repository and observe that no request is sent and nothing is logged on the webserver.
@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Dec 15, 2020
zeripath added a commit to zeripath/gitea that referenced this issue Dec 15, 2020
This PR simply makes NotifyMigrateRepository emit a Create Repo webhook.
The reason for no new payload is that the information sent to
NotifyMigrateRepository is only essentially the same as
NotifyCreateRepository

Fix go-gitea#13996

Signed-off-by: Andrew Thornton <art27@cantab.net>
6543 pushed a commit that referenced this issue Dec 17, 2020
* Cause NotifyMigrateRepository to emit a repo create webhook

This PR simply makes NotifyMigrateRepository emit a Create Repo webhook.
The reason for no new payload is that the information sent to
NotifyMigrateRepository is only essentially the same as
NotifyCreateRepository

Fix #13996

Signed-off-by: Andrew Thornton <art27@cantab.net>
6543 pushed a commit to 6543-forks/gitea that referenced this issue Dec 17, 2020
…#14004)

* Cause NotifyMigrateRepository to emit a repo create webhook

This PR simply makes NotifyMigrateRepository emit a Create Repo webhook.
The reason for no new payload is that the information sent to
NotifyMigrateRepository is only essentially the same as
NotifyCreateRepository

Fix go-gitea#13996

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Jan 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants