This repository was archived by the owner on Mar 24, 2026. It is now read-only.
Repository navigation
Fix CI for PRs targeting non-master branches - #6293
Merged
NateBrady23 merged 1 commit intoJan 13, 2021
Merged
Conversation
andreasrueb
pushed a commit
to digitallyinduced/IHP-FrameworkBenchmarks
that referenced
this pull request
Apr 13, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Demonstrating this is difficult (or at least hard to explain what's going on), but the short of it is that when a non-master branch is targeted in a PR, the differ previously still treated the diff target as master. You'd think this would be fine, but it isn't.
Specifically, the
git merge HEAD masteringithub_actions_diff.pywas returning empty. I read a little about it, and while I could probably try to understand it better in relation to the specific commands GH actions uses to checkout PRs, changing the target branch for diffing to be the target branch of the PR fixed the issue and seemed like a better/simpler option. So that's all this does. The differ now directly compares against the PR target rather than master.Fwiw, here are the demonstrations.
The first build fails to do the diff, and runs no language jobs. The second one correctly generates the diff and sets up the Java job.