File tree Expand file tree Collapse file tree 2 files changed +10
-18
lines changed
Expand file tree Collapse file tree 2 files changed +10
-18
lines changed Original file line number Diff line number Diff line change 1010from opentelemetry .sdk .trace import export
1111
1212from mergify_cli import console
13- from mergify_cli .ci import detector
1413from mergify_cli .ci import junit
1514
1615
@@ -55,14 +54,6 @@ def upload_spans(
5554 raise UploadError (logstr .getvalue ())
5655
5756
58- def connect_traces (run_id : str ) -> None :
59- if detector .get_ci_provider () == "github_actions" :
60- console .print (
61- f"::notice title=Mergify CI::MERGIFY_TEST_RUN_ID={ run_id } " ,
62- soft_wrap = True ,
63- )
64-
65-
6657async def upload ( # noqa: PLR0913, PLR0917
6758 api_url : str ,
6859 token : str ,
@@ -97,7 +88,9 @@ async def upload( # noqa: PLR0913, PLR0917
9788 except UploadError as e :
9889 console .log (f"Error uploading spans: { e } " , style = "red" )
9990 else :
100- connect_traces (run_id )
91+ console .print (
92+ f"MERGIFY_TEST_RUN_ID={ run_id } " ,
93+ )
10194 console .log ("[green]:tada: File(s) uploaded[/]" )
10295 else :
10396 console .log ("[orange]No tests were detected in the JUnit file(s)[/]" )
Original file line number Diff line number Diff line change @@ -62,14 +62,13 @@ async def test_junit_upload(
6262 )
6363
6464 captured = capsys .readouterr ()
65- if env ["GITHUB_ACTIONS" ] == "true" :
66- matched = re .search (
67- r"^::notice title=Mergify CI::MERGIFY_TEST_RUN_ID=(.+)" ,
68- captured .out ,
69- re .MULTILINE ,
70- )
71- assert matched is not None
72- assert len (bytes .fromhex (matched .group (1 ))) == 8
65+ matched = re .search (
66+ r"^MERGIFY_TEST_RUN_ID=(.+)" ,
67+ captured .out ,
68+ re .MULTILINE ,
69+ )
70+ assert matched is not None
71+ assert len (bytes .fromhex (matched .group (1 ))) == 8
7372
7473 assert "🎉 File(s) uploaded" in captured .out
7574
You can’t perform that action at this time.
0 commit comments