Skip to content

Commit

Permalink
fix: update commit status check logic to match the commit status name
Browse files Browse the repository at this point in the history
  • Loading branch information
michelmzs committed Mar 30, 2022
1 parent 69c49a1 commit 94b0ecd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/events/vcs/gitlab_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func (g *GitlabClient) PullIsMergeable(repo models.Repo, pull models.PullRequest
}

for _, status := range statuses {
if !strings.HasSuffix(status.Name, fmt.Sprintf("/%s", command.Apply.String())) {
if !strings.HasPrefix(status.Name, fmt.Sprintf("atlantis/%s", command.Apply.String())) {
if !status.AllowFailure && project.OnlyAllowMergeIfPipelineSucceeds && status.Status != "success" {
return false, nil
}
Expand Down

0 comments on commit 94b0ecd

Please sign in to comment.