Add `--[min/max]-created-time` to `az pipelines releases list` (#1344)

This commit is contained in:
Reinier Hartog 2023-02-08 12:55:32 +01:00 коммит произвёл GitHub
Родитель 3ec3dc19ad
Коммит 68cea39439
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -79,11 +79,15 @@ def release_show(id, open=False, organization=None, project=None, detect=None):
return release
def release_list(definition_id=None, source_branch=None, organization=None, project=None, detect=None, top=None,
status=None):
def release_list(definition_id=None, min_created_time=None, max_created_time=None, source_branch=None,
organization=None, project=None, detect=None, top=None, status=None):
"""List release results.
:param definition_id: ID of definition to list releases for.
:type definition_id: int
:param min_created_time: Releases that were created after this time.
:type min_created_time: datetime
:param max_created_time: Releases that were created before this time.
:type max_created_time: datetime
:param branch: Filter by releases for this branch.
:type branch: str
:param top: Maximum number of releases to list. Default is 50.
@ -99,6 +103,8 @@ def release_list(definition_id=None, source_branch=None, organization=None, proj
client = get_release_client(organization)
releases = client.get_releases(definition_id=definition_id,
min_created_time=min_created_time,
max_created_time=max_created_time,
project=project,
source_branch_filter=source_branch,
top=top,