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

Fix mirror repository webhooks #7366

merged 3 commits into from Jul 6, 2019


7 participants
Copy link

commented Jul 6, 2019

Fixes #5441

I found that mirror syncs will properly create hook tasks, however, the hook queue that gitea is monitoring is never updated/notified of the hook task for the repo and thus the hook task is never fulfilled. If you restart the gitea server, the goroutine first fulfills the current task list and then blocks on the hook queue. This is why any mirror action webhooks are sent on restart and why any new hook tasks created by mirror actions do not get fulfilled automatically.

Signed-off-by: Drew Kowalski

akkowal2 added some commits Jul 6, 2019

@techknowlogick techknowlogick added this to the 1.9.0 milestone Jul 6, 2019

@akkowal2 akkowal2 changed the title Fix mirror webhooks Fix mirror repository webhooks Jul 6, 2019


This comment has been minimized.

Copy link

commented Jul 6, 2019

Codecov Report

Merging #7366 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7366      +/-   ##
- Coverage   41.24%   41.24%   -0.01%     
  Files         467      467              
  Lines       63295    63298       +3     
  Hits        26108    26108              
- Misses      33770    33773       +3     
  Partials     3417     3417
Impacted Files Coverage Δ
models/action.go 58.5% <0%> (-0.28%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef57fe4...a1ebb8b. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 label Jul 6, 2019

@akkowal2 akkowal2 marked this pull request as ready for review Jul 6, 2019

@GiteaBot GiteaBot added lgtm/need 1 and removed lgtm/need 2 labels Jul 6, 2019

@GiteaBot GiteaBot added lgtm/done and removed lgtm/need 1 labels Jul 6, 2019


lafriks approved these changes Jul 6, 2019

@techknowlogick techknowlogick merged commit 89aa08d into go-gitea:master Jul 6, 2019

1 of 2 checks passed

continuous-integration/drone/pr Build is pending
approvals/lgtm this commit looks good

@akkowal2 akkowal2 deleted the akkowal2:fix-mirror-webhooks branch Jul 6, 2019

@@ -896,6 +896,11 @@ func mirrorSyncAction(e Engine, opType ActionType, repo *Repository, refName str
}); err != nil {
return fmt.Errorf("notifyWatchers: %v", err)

This comment has been minimized.

Copy link

lunny Jul 7, 2019


You should move these to because it should be with webhook.

jeffliu27 added a commit to jeffliu27/gitea that referenced this pull request Jul 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.