Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Fix CI for PRs targeting non-master branches - #6293

Merged
NateBrady23 merged 1 commit into
TechEmpower:masterfrom
ajohnstonTE:fix-non-master-pr-targets-ci
Jan 13, 2021
Merged

NateBrady23 merged 1 commit into
TechEmpower:masterfrom
ajohnstonTE:fix-non-master-pr-targets-ci

Conversation

@ajohnstonTE

Copy link
Copy Markdown
Contributor

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 master in github_actions_diff.py was 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.

@NateBrady23
NateBrady23 merged commit d7bdd0b into TechEmpower:master Jan 13, 2021
andreasrueb pushed a commit to digitallyinduced/IHP-FrameworkBenchmarks that referenced this pull request Apr 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants