Skip to content

Commit

Permalink
fix: dont hardcode "main" in gitlint test
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
roypat committed Nov 11, 2024
1 parent d18fe9e commit 3b5d49a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/integration_tests/style/test_gitlint.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os

from framework import utils
from framework.ab_test import DEFAULT_A_REVISION


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

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

0 comments on commit 3b5d49a

Please sign in to comment.