Skip to content

Commit 4ba3c49

Browse files
committed
Update function names
1 parent 2befdf9 commit 4ba3c49

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

github_action_utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def end_group() -> None:
354354

355355

356356
@contextmanager
357-
def group_context_manager(title: str) -> Generator[Any, None, None]:
357+
def group(title: str) -> Generator[Any, None, None]:
358358
"""
359359
creates and closes an expandable group in GitHub Actions log.
360360
@@ -379,7 +379,7 @@ def add_mask(value: Any) -> None:
379379
_print_command("add-mask", value)
380380

381381

382-
def stop_commands(token: Union[str, None] = None) -> str:
382+
def begin_stop_commands(token: Union[str, None] = None) -> str:
383383
"""
384384
stops processing any workflow commands between this and `end_stop_commands()`.
385385
@@ -399,7 +399,7 @@ def stop_commands(token: Union[str, None] = None) -> str:
399399

400400
def end_stop_commands(token: str) -> None:
401401
"""
402-
stops processing any workflow commands between this and `stop_commands()`
402+
stops processing any workflow commands between this and `begin_stop_commands()`
403403
404404
Template: ::{token}::
405405
Example: echo "::{12345}::"
@@ -411,7 +411,7 @@ def end_stop_commands(token: str) -> None:
411411

412412

413413
@contextmanager
414-
def stop_commands_context_manager(
414+
def stop_commands(
415415
token: Union[str, None] = None,
416416
) -> Generator[Any, None, None]:
417417
"""
@@ -420,7 +420,7 @@ def stop_commands_context_manager(
420420
:param token: token to use for the stop command
421421
:returns: None
422422
"""
423-
stop_token = stop_commands(token=token)
423+
stop_token = begin_stop_commands(token=token)
424424
yield
425425
end_stop_commands(stop_token)
426426

tests/test_github_action_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ def test_add_mask(capfd: Any, test_input: str, expected: str) -> None:
338338
assert out == expected
339339

340340

341-
def test_stop_commands(capfd: Any) -> None:
342-
gha_utils.stop_commands(token="test token")
341+
def test_begin_stop_commands(capfd: Any) -> None:
342+
gha_utils.begin_stop_commands(token="test token")
343343
out, err = capfd.readouterr()
344344
assert out == "::stop-commands ::test token\n"
345345

0 commit comments

Comments
 (0)