Skip to content

Commit 00f8090

Browse files
authored
Don't create action when syncing mirror pull refs (#32659)
Fix #27961
1 parent 1b296ed commit 00f8090

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

services/feed/action.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,12 @@ func (a *actionNotifier) DeleteRef(ctx context.Context, doer *user_model.User, r
390390
}
391391

392392
func (a *actionNotifier) SyncPushCommits(ctx context.Context, pusher *user_model.User, repo *repo_model.Repository, opts *repository.PushUpdateOptions, commits *repository.PushCommits) {
393+
// ignore pull sync message for pull requests refs
394+
// TODO: it's better to have a UI to let users chose
395+
if opts.RefFullName.IsPull() {
396+
return
397+
}
398+
393399
data, err := json.Marshal(commits)
394400
if err != nil {
395401
log.Error("json.Marshal: %v", err)

0 commit comments

Comments
 (0)