From 69c9d121e58c9854356548bc5f51df5da857a7be Mon Sep 17 00:00:00 2001 From: Moritz Rieger Date: Thu, 19 Dec 2024 15:13:48 +0100 Subject: [PATCH] fix: adding of duplicate commit statuses in gitlab RESOLVES #1009 Signed-off-by: Moritz Rieger --- internal/notifier/gitlab.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/notifier/gitlab.go b/internal/notifier/gitlab.go index 9e976bd66..088e5ccd1 100644 --- a/internal/notifier/gitlab.go +++ b/internal/notifier/gitlab.go @@ -99,7 +99,9 @@ func (g *GitLab) Post(ctx context.Context, event eventv1.Event) error { Description: desc, } - getOpt := &gitlab.GetCommitStatusesOptions{} + getOpt := &gitlab.GetCommitStatusesOptions{ + Name: &status.Name, + } statuses, _, err := g.Client.Commits.GetCommitStatuses(g.Id, rev, getOpt, gitlab.WithContext(ctx)) if err != nil { return fmt.Errorf("unable to list commit status: %s", err)