Webhook for mirrored repositories #377

Closed
opened 2025-11-02 03:20:48 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @olymk2 on GitHub (Feb 21, 2017).

Not sure what the correct behavior would be, currently i am mirroring a branch from github into gitea and would like to trigger drone on a sync.

This currently does not seem to happen, i had a quick look in the code base and could not see any hooks for mirroring.

Seems we could hook into the pull web hook or perhaps it should be its own configurable hook in the admin area.

I may have a stab at this (maybe beyond my ability) but thought it would be good to have a discussion about how it should work or just general thought on the subject.

Originally created by @olymk2 on GitHub (Feb 21, 2017). Not sure what the correct behavior would be, currently i am mirroring a branch from github into gitea and would like to trigger drone on a sync. This currently does not seem to happen, i had a quick look in the code base and could not see any hooks for mirroring. Seems we could hook into the pull web hook or perhaps it should be its own configurable hook in the admin area. I may have a stab at this (maybe beyond my ability) but thought it would be good to have a discussion about how it should work or just general thought on the subject.
GiteaMirror added the type/feature label 2025-11-02 03:20:48 -06:00
Author
Owner

@gzsombor commented on GitHub (Feb 22, 2017):

I've started doing something similar - basically the ability to run local scripts instead of calling web services. I thought this wouldn't be interesting to others, but if there is a need, I can contribute it.
For your use case, would you want to run a script ?

@gzsombor commented on GitHub (Feb 22, 2017): I've started doing something similar - basically the ability to run local scripts instead of calling web services. I thought this wouldn't be interesting to others, but if there is a need, I can contribute it. For your use case, would you want to run a script ?
Author
Owner

@olymk2 commented on GitHub (Feb 22, 2017):

I would certainly be interested in seeing you script, but it would be nice if it was a web hook as well just so its a standard way of working.

I am thinking in the back end have a checkbox to initiate webhook on sync with the mirror, can we detect if there are changes a part of the sync ?

And what should wee trigger can we trigger an existing hook like pull on mirror or should it be a totally separate one ?

@olymk2 commented on GitHub (Feb 22, 2017): I would certainly be interested in seeing you script, but it would be nice if it was a web hook as well just so its a standard way of working. I am thinking in the back end have a checkbox to initiate webhook on sync with the mirror, can we detect if there are changes a part of the sync ? And what should wee trigger can we trigger an existing hook like pull on mirror or should it be a totally separate one ?
Author
Owner

@Mattze96 commented on GitHub (Nov 22, 2017):

what is the status on this?

@Mattze96 commented on GitHub (Nov 22, 2017): what is the status on this?
Author
Owner

@lunny commented on GitHub (Nov 22, 2017):

@Mattze96 no people declared working on this.

@lunny commented on GitHub (Nov 22, 2017): @Mattze96 no people declared working on this.
Author
Owner

@jonasob commented on GitHub (Apr 19, 2018):

I would just like to echo this. Right now, I have a repository hosted on Github which is mirrored to a Gitea with Drone. I'd love if a mirror would trigger a webhook to fire off a build in Drone, just as if it was a direct commit to Gitea.

@jonasob commented on GitHub (Apr 19, 2018): I would just like to echo this. Right now, I have a repository hosted on Github which is mirrored to a Gitea with Drone. I'd love if a mirror would trigger a webhook to fire off a build in Drone, just as if it was a direct commit to Gitea.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#377