Can you merge a PR when checks fail?
The answer might sound obvious, but it's not! Until lately, we've been merging in quite some PRs at WeTransfer with reasons like:
"The failing test is unrelated to my code changes."
Or another classic:
"Tests succeed locally."
Not caring about these tests too much allowed us to merge fast and move quickly, but it did result in the fact that we would revisit the same failing test not much later. You could even argue that it cost us more time to revisit the same failing test every time and run tests locally again, compared to just spending some extra time on fixing the failing test instead.
After asking
this question on Twitter, we changed our settings to require both CI and Danger to be always green, meaning that we can't merge in any PR w/o tests succeeding.
A benefit of this is enabling auto-merge, removing the need to get back to a PR to merge it. Though, I'm now getting back to PRs to see if auto-merge worked correctly, haha!
It's been a busy week for me since I got back up to speed with
RocketSim development. I'm working towards version 6.0, for which I've got
some great ideas.
Enjoy this week's SwiftLee Weekly!