Skip to content

Commit 38991c4

Browse files
committed
fix: handle BUILDKITE_PULL_REQUEST correctly for non PRs
For pull requests, the variable is set to the number of the pull request. For builds triggers not on pull requests its... the string literal "false". That broke submitting coverage data from non-pr branches because it tried to submit coverage data for a pull request with number "false", instead of submitting for the branch on which the test was run. Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
1 parent 401702f commit 38991c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/integration_tests/build/test_coverage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def test_coverage(monkeypatch):
9393

9494
codecov_cmd = f"codecov -f {lcov_file} -F {global_props.host_linux_version}-{global_props.instance}"
9595

96-
if pr_number:
96+
if pr_number and pr_number != "false":
9797
codecov_cmd += f" -P {pr_number}"
9898
else:
9999
codecov_cmd += f" -B {branch}"

0 commit comments

Comments
 (0)