Skip to content

Commit

Permalink
Don't create action when syncing mirror pull refs (#32659)
Browse files Browse the repository at this point in the history
Fix #27961
  • Loading branch information
lunny authored Nov 28, 2024
1 parent 1b296ed commit 00f8090
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions services/feed/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,12 @@ func (a *actionNotifier) DeleteRef(ctx context.Context, doer *user_model.User, r
}

func (a *actionNotifier) SyncPushCommits(ctx context.Context, pusher *user_model.User, repo *repo_model.Repository, opts *repository.PushUpdateOptions, commits *repository.PushCommits) {
// ignore pull sync message for pull requests refs
// TODO: it's better to have a UI to let users chose
if opts.RefFullName.IsPull() {
return
}

data, err := json.Marshal(commits)
if err != nil {
log.Error("json.Marshal: %v", err)
Expand Down

0 comments on commit 00f8090

Please sign in to comment.