Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be7031378c | ||
|
|
6d315dfff9 | ||
|
|
8ab4197aab | ||
|
|
f7036c59b8 | ||
|
|
8bf5a6ff54 | ||
|
|
4fb07a618d | ||
|
|
294cebf0f7 | ||
|
|
d5dff17d10 | ||
|
|
f19564431b | ||
|
|
339028b826 | ||
|
|
3734ceee33 | ||
|
|
4cb1102b56 | ||
|
|
e7dbe62d2a |
+12
-3
@@ -100,11 +100,20 @@ bazel build --spawn_strategy=standalone //:run
|
|||||||
|
|
||||||
// 1. Determine target branch and fetch changes
|
// 1. Determine target branch and fetch changes
|
||||||
def targetBranch = env.CHANGE_TARGET ?: 'main'
|
def targetBranch = env.CHANGE_TARGET ?: 'main'
|
||||||
sh "git fetch origin ${targetBranch}"
|
|
||||||
|
|
||||||
// 2. Identify changed files relative to the target branch
|
sh """
|
||||||
|
git fetch origin \
|
||||||
|
+refs/heads/${targetBranch}:refs/remotes/origin/${targetBranch}
|
||||||
|
"""
|
||||||
|
def mergeBase = sh(
|
||||||
|
script: "git merge-base HEAD origin/${targetBranch}",
|
||||||
|
returnStdout: true
|
||||||
|
).trim()
|
||||||
|
|
||||||
|
echo "Merge base: ${mergeBase}"
|
||||||
|
|
||||||
def changedFiles = sh(
|
def changedFiles = sh(
|
||||||
script: "git diff --name-only origin/${targetBranch}...HEAD",
|
script: "git diff --name-only ${mergeBase} HEAD",
|
||||||
returnStdout: true
|
returnStdout: true
|
||||||
).trim()
|
).trim()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user