Skip to content

Commit

Permalink
Feat: Enable use of recursion-level parameter for wiki get_page (show…
Browse files Browse the repository at this point in the history
…) command (#1405)
  • Loading branch information
Devvox93 authored Apr 22, 2024
1 parent 87b9d07 commit 22694d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions azure-devops/azext_devops/dev/team/wiki.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def update_page(wiki, path, version, comment=_DEFAULT_PAGE_UPDATE_MESSAGE, conte


def get_page(wiki, path, version=None, open=False, # pylint: disable=redefined-builtin
include_content=False, organization=None, project=None, detect=None):
include_content=False, organization=None, project=None, detect=None, recursion_level=None):
"""Get the content of a page or open a page.
:param wiki: Name or Id of the wiki.
:type wiki: str
Expand All @@ -194,14 +194,16 @@ def get_page(wiki, path, version=None, open=False, # pylint: disable=redefined-
:type include_content: str
:param open: Open the wiki page in your web browser.
:type open: bool
:param recursion_level: Include subpages of the page.
:type recursion_level: str
"""
organization, project = resolve_instance_and_project(detect=detect,
organization=organization,
project=project)
wiki_client = get_wiki_client(organization)
page_object = wiki_client.get_page(
wiki_identifier=wiki, project=project, path=path,
recursion_level=None, version_descriptor=version,
recursion_level=recursion_level, version_descriptor=version,
include_content=include_content)
if open:
webbrowser.open_new(url=page_object.page.remote_url)
Expand Down

0 comments on commit 22694d5

Please sign in to comment.