Skip to content

Commit d9bb201

Browse files
authored
Merge pull request #1010 from mo-rieger/mrieger/1009
fix: adding of duplicate commit statuses in gitlab
2 parents 7ee7239 + 764123c commit d9bb201

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/notifier/gitlab.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ func (g *GitLab) Post(ctx context.Context, event eventv1.Event) error {
9999
Description: desc,
100100
}
101101

102-
getOpt := &gitlab.GetCommitStatusesOptions{}
102+
getOpt := &gitlab.GetCommitStatusesOptions{
103+
Name: &status.Name,
104+
}
103105
statuses, _, err := g.Client.Commits.GetCommitStatuses(g.Id, rev, getOpt, gitlab.WithContext(ctx))
104106
if err != nil {
105107
return fmt.Errorf("unable to list commit status: %s", err)

0 commit comments

Comments
 (0)