Skip to content

Commit

Permalink
[buildkite] Fix backport PR pipeline generation (elastic#100427)
Browse files Browse the repository at this point in the history
(cherry picked from commit f4d53bc)
  • Loading branch information
brianseeders committed Oct 6, 2023
1 parent 360aed6 commit a45cb6b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .buildkite/scripts/pull-request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ export const generatePipelines = (
.filter((x) => x);

if (!changedFiles?.length) {
const mergeBase = execSync(`git merge-base ${process.env["GITHUB_PR_TARGET_BRANCH"]} HEAD`, { cwd: PROJECT_ROOT })
const mergeBase = execSync(
`git fetch origin ${process.env["GITHUB_PR_TARGET_BRANCH"]}; git merge-base origin/${process.env["GITHUB_PR_TARGET_BRANCH"]} HEAD`,
{ cwd: PROJECT_ROOT }
)
.toString()
.trim();

Expand Down

0 comments on commit a45cb6b

Please sign in to comment.