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

Update autoplan so commit status is set only after finding projects #955

Closed
wants to merge 4 commits into from

Conversation

cket
Copy link
Contributor

@cket cket commented Mar 26, 2020

Resolves #954.

@codecov
Copy link

codecov bot commented Mar 26, 2020

Codecov Report

Merging #955 into master will decrease coverage by 0.02%.
The diff coverage is 14.28%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #955      +/-   ##
=========================================
- Coverage   72.12%   72.1%   -0.03%     
=========================================
  Files          65      65              
  Lines        5310    5313       +3     
=========================================
+ Hits         3830    3831       +1     
- Misses       1184    1186       +2     
  Partials      296     296
Impacted Files Coverage Δ
cmd/server.go 79.26% <ø> (ø) ⬆️
server/user_config.go 100% <ø> (ø) ⬆️
server/events/command_runner.go 50.21% <0%> (-0.43%) ⬇️
server/server.go 63.44% <100%> (+0.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5335785...f285e30. Read the comment docs.

Copy link
Member

@lkysow lkysow left a comment

Choose a reason for hiding this comment

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

Some people require the Atlantis status checks to pass before merging. The change to only set a success status if there were projects to plan would prevent anyone in this situation from merging pull requests that didn't have terraform changes.

I think it would make sense to pull this behaviour into a flag: --set-vcs-status-no-plans that defaults to true.

@cket
Copy link
Contributor Author

cket commented Mar 27, 2020

Thanks for the review! That works for me, I'm using silence-vcs-status-no-plans to match the name of a couple similar flags, let me know if I'm missing something. Thanks again!

@lkysow
Copy link
Member

lkysow commented Mar 29, 2020

Thanks Christopher! I ended up refactoring the cmd tests so it was less annoying to add a new flag and rebased your changes on top in #959. This will be in the next release.

@lkysow lkysow added the feature New functionality/enhancement label Mar 29, 2020
@cket cket deleted the cket/954 branch March 30, 2020 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality/enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autoplan should only set commit status if it finds a project
2 participants