Skip to content
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: Ignore apply check(s) even if missing from rollup when determining mergeability for GitHub #4974

Merged

Conversation

henriklundstrom
Copy link
Contributor

what

Ignores the atlantis/apply check even if it's missing in the API rollup response.

why

The previous implementation would only ignore the status of the atlantis/apply check, but the absence of the check (if required by ruleset or branch protection) would not be ignored.

In practice this hardly makes any difference since there are no normal situations where an apply would be attempted when the apply check was not already set (typically it would be set to PENDING by the preceding plan) and such attempts to apply would be rejected for other reasons anyway. However I think it would be best for this function to not rely on the check being created beforehand.

tests

Adds a test case for the situation when atlantis/apply is required by a ruleset, but the check is missing in the rollup response from GitHub.

references

@henriklundstrom henriklundstrom requested review from a team as code owners October 2, 2024 10:18
@henriklundstrom henriklundstrom requested review from jamengual, lukemassa and nitrocode and removed request for a team October 2, 2024 10:18
@github-actions github-actions bot added go Pull requests that update Go code provider/github labels Oct 2, 2024
@dosubot dosubot bot added the bug Something isn't working label Oct 2, 2024
Copy link
Contributor

@X-Guardian X-Guardian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the PR title to indicate that this is for GitHub

…leset-atlantis-apply-expected.json

Co-authored-by: Simon Heather <32168619+X-Guardian@users.noreply.github.com>
Signed-off-by: Henrik Lundström <henrik94lundstrom@gmail.com>
@henriklundstrom henriklundstrom changed the title fix: Ignore apply check(s) even if missing from rollup when determining mergeability fix: Ignore apply check(s) even if missing from rollup when determining mergeability for GitHub Nov 4, 2024
Copy link
Contributor

@X-Guardian X-Guardian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @henriklundstrom.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 4, 2024
@X-Guardian X-Guardian merged commit e4dea03 into runatlantis:main Nov 4, 2024
34 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working go Pull requests that update Go code lgtm This PR has been approved by a maintainer provider/github
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants