diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2024-12-13 00:25:22 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-13 08:25:22 +0000 |
commit | 8eefa1f6dedf2488db2c9e12c916e8e51f673160 (patch) | |
tree | 496f36eacead04e8ff209e559d4519bddc81b0eb | |
parent | d172c6d2b0fc832f594fe14f114d8b02daa9ad2c (diff) | |
download | gitea-8eefa1f6dedf2488db2c9e12c916e8e51f673160.tar.gz gitea-8eefa1f6dedf2488db2c9e12c916e8e51f673160.zip |
Add missing two sync feed for refs/pull (#32815) (#32822)v1.22.6
Fowllow #32659
Backport #32815
-rw-r--r-- | services/feed/action.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/services/feed/action.go b/services/feed/action.go index a8820aeb77..d941027c35 100644 --- a/services/feed/action.go +++ b/services/feed/action.go @@ -417,6 +417,12 @@ func (a *actionNotifier) SyncPushCommits(ctx context.Context, pusher *user_model } func (a *actionNotifier) SyncCreateRef(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, refFullName git.RefName, refID string) { + // ignore pull sync message for pull requests refs + // TODO: it's better to have a UI to let users chose + if refFullName.IsPull() { + return + } + if err := activities_model.NotifyWatchers(ctx, &activities_model.Action{ ActUserID: repo.OwnerID, ActUser: repo.MustOwner(ctx), @@ -431,6 +437,12 @@ func (a *actionNotifier) SyncCreateRef(ctx context.Context, doer *user_model.Use } func (a *actionNotifier) SyncDeleteRef(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, refFullName git.RefName) { + // ignore pull sync message for pull requests refs + // TODO: it's better to have a UI to let users chose + if refFullName.IsPull() { + return + } + if err := activities_model.NotifyWatchers(ctx, &activities_model.Action{ ActUserID: repo.OwnerID, ActUser: repo.MustOwner(ctx), |