Conversation
szokeasaurusrex
left a comment
There was a problem hiding this comment.
Is this still in progress? If yes, please mark as draft; otherwise, please add a PR description, since I am unsure what this change's purpose is
szokeasaurusrex
left a comment
There was a problem hiding this comment.
lgtm — Please consider renaming the PR to "test(vcs): ..." as this is only changing test code (that change should also make the Danger CI failure go away, as changelog is not required for "test" changes; you might need to manually retrigger the Danger check)
| // Test without GITHUB_EVENT_PATH | ||
| std::env::remove_var("GITHUB_EVENT_PATH"); | ||
| let result = find_base_sha("origin"); | ||
| let result = find_base_sha("no_such_remote"); |
There was a problem hiding this comment.
Ah ok, so this test will pass locally as long as the user hasn't configured a no_such_remote git remote?
Def agree with what you wrote on Slack that this is not ideal. Would be nice to make the tests not depend on local git state, but this is fine as a workaround I suppose
Thanks done! |
The following test:
can't really work well both in CI and locally.
Locally there will (almost) always be a merge-base between the local HEAD and the default
merge branch. In GitHub CI there will almost never be a merge-base which is why we need
to inspect
GITHUB_EVENT_PATHsometimes in the first place.For now replace that with:
Which tests a different code path which should fail on both.