-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: set policy_check status to success for PRs with no modified projects #3780
fix: set policy_check status to success for PRs with no modified projects #3780
Conversation
if err := p.commitStatusUpdater.UpdateCombinedCount(baseRepo, pull, models.SuccessCommitStatus, command.PolicyCheck, 0, 0); err != nil { | ||
ctx.Log.Warn("unable to update commit status: %s", err) | ||
} | ||
if err := p.commitStatusUpdater.UpdateCombinedCount(baseRepo, pull, models.SuccessCommitStatus, command.Apply, 0, 0); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make sure this doesn't affect issues like #3725 and cause a regression?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I understand what you are asking here - this part of the code just replicates what autoplan does. Is autoplan broken wrt #3725?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3244d82
to
f95ff71
Compare
Autoplan would set the "policy_check" status to successful if there were no modified projects in a PR, but "atlantis plan" would not. Changed "atlantis plan" to behave like autoplan in this regard.
49f3389
to
ced9146
Compare
Autoplan would set the "policy_check" status to successful if there were no modified projects in a PR, but "atlantis plan" would not. Changed "atlantis plan" to behave like autoplan in this regard.
Autoplan would set the "policy_check" status to successful if there were no modified projects in a PR, but "atlantis plan" would not. Changed "atlantis plan" to behave like autoplan in this regard.
what
set policy_check status to successful after a
atlantis plan
command finds no projects that are modified. This makesatlantis plan
behave likeautoplan
in this regard.why
If you have set policy_check as a required status in github, this would only work with autoplan for PRs that did not modify any projects. The code path for autoplan and "atlantis plan" were different in this regard, but autoplan is not always appropriate.
tests
references