This is an automated email from the ASF dual-hosted git repository.
pvillard31 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 11e677d67bf NIFI-16428 Allowed up to 10 commits behind for PR branch
validation (#11760)
11e677d67bf is described below
commit 11e677d67bf00e42109ad32291a0ea1573b119d3
Author: David Handermann <[email protected]>
AuthorDate: Mon Oct 5 12:58:16 2026 -0500
NIFI-16428 Allowed up to 10 commits behind for PR branch validation (#11760)
---
.github/scripts/build/validate-branch-status.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/.github/scripts/build/validate-branch-status.sh
b/.github/scripts/build/validate-branch-status.sh
index fbbe1a135d7..44d90ef3980 100755
--- a/.github/scripts/build/validate-branch-status.sh
+++ b/.github/scripts/build/validate-branch-status.sh
@@ -18,9 +18,14 @@ set -e
git fetch origin "${TARGET_BRANCH}"
+MAX_COMMITS_BEHIND=10
+COMMITS_BEHIND=$(git rev-list --count --first-parent
"HEAD...origin/${TARGET_BRANCH}")
+
if git merge-base --is-ancestor "origin/${TARGET_BRANCH}" HEAD; then
echo "Branch is up to date with origin/${TARGET_BRANCH}"
+elif [ "${COMMITS_BEHIND}" -le "${MAX_COMMITS_BEHIND}" ]; then
+ echo "Branch is ${COMMITS_BEHIND} commits behind origin/${TARGET_BRANCH}"
else
- echo "::error::Branch is not up to date with origin/${TARGET_BRANCH}. Rebase
the branch with the latest changes from ${TARGET_BRANCH}."
+ echo "::error::Branch is ${COMMITS_BEHIND} commits behind
origin/${TARGET_BRANCH}. Rebase the branch with the latest changes from
${TARGET_BRANCH}."
exit 1
fi