Skip to content

Commit

Permalink
Fix duplicated notifier
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Nov 5, 2024
1 parent 2537c8f commit 6061683
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions services/repository/commitstatus/commitstatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ func CreateCommitStatus(ctx context.Context, repo *repo_model.Repository, creato
return err
}

pushCommit := repo_module.CommitToPushCommit(commit)

notify.CreateCommitStatus(ctx, repo, pushCommit, creator, status)
notify.CreateCommitStatus(ctx, repo, repo_module.CommitToPushCommit(commit), creator, status)

defaultBranchCommit, err := gitRepo.GetBranchCommit(repo.DefaultBranch)
if err != nil {
Expand All @@ -112,8 +110,6 @@ func CreateCommitStatus(ctx context.Context, repo *repo_model.Repository, creato
}
}

notify.CreateCommitStatus(ctx, repo, repo_module.CommitToPushCommit(commit), creator, status)

return nil
}

Expand Down

0 comments on commit 6061683

Please sign in to comment.