We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b541128 commit c09c1e9Copy full SHA for c09c1e9
ci/prow/check-commits-count
@@ -0,0 +1,18 @@
1
+#!/usr/bin/env bash
2
+
3
+set -euxo pipefail
4
5
+git remote add main https://github.com/rh-ecosystem-edge/kernel-module-management.git
6
+git fetch main
7
8
+commits_count=$(git rev-list --count HEAD ^main)
9
+# When Prow is testing a PR, it is creating a branch for it but then merges it
10
+# into the "main" branch for testing, therefore, we also get the "merge commit"
11
+# in addition to the original commit.
12
+if [[ ${commits_count} != 2 ]]; then
13
+ echo '
14
+ All PRs must contain a single commit.
15
+ Please refer to https://github.com/rh-ecosystem-edge/kernel-module-management/blob/main/CONTRIBUTING.md
16
+ '
17
+ exit 1
18
+fi
0 commit comments