1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00

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

Fix #27961
This commit is contained in:
Lunny Xiao 2024-11-27 23:43:38 -08:00 committed by GitHub
parent 1b296ed1a4
commit 00f8090de4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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) { 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) data, err := json.Marshal(commits)
if err != nil { if err != nil {
log.Error("json.Marshal: %v", err) log.Error("json.Marshal: %v", err)