Skip to content

Commit 2e02bbc

Browse files
committed
fix: dont hardcode "main" in gitlint test
Hardcoding main means the test looks at the wrong range of commits for feature branches, which can result in problem if feature branches are long-lived. Signed-off-by: Patrick Roy <[email protected]>
1 parent 1fc3ef2 commit 2e02bbc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/integration_tests/style/test_gitlint.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import os
66

77
from framework import utils
8+
from framework.ab_test import DEFAULT_A_REVISION
89

910

1011
def test_gitlint():
@@ -15,6 +16,6 @@ def test_gitlint():
1516
os.environ["LANG"] = "C.UTF-8"
1617

1718
rc, _, stderr = utils.run_cmd(
18-
"gitlint --commits origin/main..HEAD -C ../.gitlint --extra-path framework/gitlint_rules.py",
19+
f"gitlint --commits origin/{DEFAULT_A_REVISION}..HEAD -C ../.gitlint --extra-path framework/gitlint_rules.py",
1920
)
2021
assert rc == 0, "Commit message violates gitlint rules: {}".format(stderr)

0 commit comments

Comments
 (0)