Skip to content

Commit f1d0d12

Browse files
committed
Use correct refs inserting to db
1 parent e7f6c45 commit f1d0d12

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

tests/ci/clickhouse_helper.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99

1010
import requests
1111

12-
from env_helper import CLICKHOUSE_TEST_STAT_URL, CLICKHOUSE_TEST_STAT_PASSWORD, CLICKHOUSE_TEST_STAT_LOGIN
12+
from env_helper import (
13+
GITHUB_REPOSITORY,
14+
CLICKHOUSE_TEST_STAT_URL,
15+
CLICKHOUSE_TEST_STAT_PASSWORD,
16+
CLICKHOUSE_TEST_STAT_LOGIN,
17+
)
1318
from get_robot_token import get_parameter_from_ssm
1419
from pr_info import PRInfo
1520
from report import TestResults
@@ -212,11 +217,11 @@ def prepare_tests_results_for_clickhouse(
212217
report_url: str,
213218
check_name: str,
214219
) -> List[dict]:
215-
pull_request_url = "https://github.com/Altinity/ClickHouse/commits/master"
216-
base_ref = "master"
217-
head_ref = "master"
218-
base_repo = pr_info.repo_full_name
219-
head_repo = pr_info.repo_full_name
220+
base_ref = pr_info.base_ref
221+
base_repo = pr_info.base_name
222+
head_ref = pr_info.head_ref
223+
head_repo = pr_info.head_name
224+
pull_request_url = f"https://github.com/{GITHUB_REPOSITORY}/commits/{head_ref}"
220225
if pr_info.number != 0:
221226
pull_request_url = pr_info.pr_html_url
222227

0 commit comments

Comments
 (0)