Skip to content

Commit cdd1c12

Browse files
lunnyGiteaBot
authored andcommitted
Don't create action when syncing mirror pull refs (go-gitea#32659)
Fix go-gitea#27961
1 parent 2933557 commit cdd1c12

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)