Skip to content

Commit

Permalink
Remove updating the policy check run (#717)
Browse files Browse the repository at this point in the history
We no longer need it with the new workflow check run combining the plan
and validate steps together.
  • Loading branch information
samrabelachew authored Aug 14, 2023
1 parent f17c2eb commit ef108a9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions server/legacy/events/vcs/github_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"encoding/base64"
"fmt"
"net/http"
"regexp"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -96,8 +95,6 @@ func (e ChecksConclusion) String() string {
return ""
}

var policyCheckRunRegex = regexp.MustCompile("atlantis/policy_check.*")

// github checks status
type CheckStatus int

Expand Down Expand Up @@ -507,9 +504,7 @@ func (g *GithubClient) UpdateStatus(ctx context.Context, request types.UpdateSta
return "", errors.Wrap(err, "unable to allocate legacy deprecation feature flag")
}
// if legacy deprecation is enabled, don't mutate check runs in legacy workflow
// exception: we always want to mutate atlantis/policy_check since new PR workflow has no knowledge of it
// eventually we will get rid of it entirely
if shouldAllocate && !policyCheckRunRegex.MatchString(request.StatusName) {
if shouldAllocate {
g.logger.InfoContext(ctx, "legacy deprecation feature flag enabled, not updating check runs")
return "", nil
}
Expand Down

0 comments on commit ef108a9

Please sign in to comment.