Skip to content

Commit 8eefa1f

Browse files
authored
Add missing two sync feed for refs/pull (#32815) (#32822)
Fowllow #32659 Backport #32815
1 parent d172c6d commit 8eefa1f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

services/feed/action.go

+12
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,12 @@ func (a *actionNotifier) SyncPushCommits(ctx context.Context, pusher *user_model
417417
}
418418

419419
func (a *actionNotifier) SyncCreateRef(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, refFullName git.RefName, refID string) {
420+
// ignore pull sync message for pull requests refs
421+
// TODO: it's better to have a UI to let users chose
422+
if refFullName.IsPull() {
423+
return
424+
}
425+
420426
if err := activities_model.NotifyWatchers(ctx, &activities_model.Action{
421427
ActUserID: repo.OwnerID,
422428
ActUser: repo.MustOwner(ctx),
@@ -431,6 +437,12 @@ func (a *actionNotifier) SyncCreateRef(ctx context.Context, doer *user_model.Use
431437
}
432438

433439
func (a *actionNotifier) SyncDeleteRef(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, refFullName git.RefName) {
440+
// ignore pull sync message for pull requests refs
441+
// TODO: it's better to have a UI to let users chose
442+
if refFullName.IsPull() {
443+
return
444+
}
445+
434446
if err := activities_model.NotifyWatchers(ctx, &activities_model.Action{
435447
ActUserID: repo.OwnerID,
436448
ActUser: repo.MustOwner(ctx),

0 commit comments

Comments
 (0)