Don't create action when syncing mirror pull refs (#32659) (#32664)

Backport #32659 by @lunny

Fix #27961

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
pull/32673/head
Giteabot 2 months ago committed by GitHub
parent 293355777f
commit 27489f2e0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      services/feed/action.go

@ -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)

Loading…
Cancel
Save