Skip to content

Commit

Permalink
[ORCA-558] Fix mergeability clause for tfe statuses. (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
nishkrishnan authored and Nish Krishnan committed Jun 24, 2021
1 parent 5c07974 commit ee2e5ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion server/events/vcs/github_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ func (g *GithubClient) getSubmitQueueMergeability(repo models.Repo, pull models.
ownersCheckApplied = true
}

if status.GetContext() == AtlantisApplyStatusContext ||
if strings.HasPrefix(status.GetContext(), AtlantisApplyStatusContext) ||
state == "success" ||
(state == "pending" && status.GetContext() == SubmitQueueReadinessStatusContext) {
continue
Expand Down
1 change: 1 addition & 0 deletions server/events/vcs/github_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ func TestGithubClient_PullisMergeable_BlockedStatus(t *testing.T) {
fmt.Sprintf(statusJSON, "pending", "sq-ready-to-merge"),
fmt.Sprintf(statusJSON, "success", "_owners-check"),
fmt.Sprintf(statusJSON, "failure", "atlantis/apply"),
fmt.Sprintf(statusJSON, "failure", "atlantis/apply: terraform_cloud_workspace"),
},
true,
},
Expand Down

0 comments on commit ee2e5ed

Please sign in to comment.