Skip to content

Commit 967d9d3

Browse files
authored
Fixing check-commits-count to work on other branches than master. (#118)
Signed-off-by: Yoni Bettan <yonibettan@gmail.com>
1 parent a4822a3 commit 967d9d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ci/prow/check-commits-count

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ set -euxo pipefail
55
git remote add upstream https://github.com/openshift/driver-toolkit.git
66
git fetch upstream
77

8-
commits_count=$(git rev-list --count HEAD ^upstream/master)
8+
branch_name=$(git branch --show-current)
9+
commits_count=$(git rev-list --count HEAD ^upstream/${branch_name})
910
# When Prow is testing a PR, it is creating a branch for it but then merges it
1011
# into the "master" branch for testing, therefore, we also get the "merge commit"
1112
# in addition to the original commit.

0 commit comments

Comments
 (0)