Skip to content

Commit

Permalink
Don't create action when syncing mirror pull refs (go-gitea#32659)
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny authored and GiteaBot committed Nov 28, 2024
1 parent 2933557 commit cdd1c12
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 cdd1c12

Please sign in to comment.