@@ -134,6 +134,33 @@ def get_badge(self, project, definition_id, branch_name=None):
134
134
query_parameters = query_parameters )
135
135
return self ._deserialize ('str' , response )
136
136
137
+ def list_branches (self , project , provider_name , service_endpoint_id = None , repository = None ):
138
+ """ListBranches.
139
+ [Preview API] Gets a list of branches for the given source code repository.
140
+ :param str project: Project ID or project name
141
+ :param str provider_name: The name of the source provider.
142
+ :param str service_endpoint_id: If specified, the ID of the service endpoint to query. Can only be omitted for providers that do use service endpoints, e.g. TFVC or TFGit.
143
+ :param str repository: If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.
144
+ :rtype: [str]
145
+ """
146
+ route_values = {}
147
+ if project is not None :
148
+ route_values ['project' ] = self ._serialize .url ('project' , project , 'str' )
149
+ if provider_name is not None :
150
+ route_values ['providerName' ] = self ._serialize .url ('provider_name' , provider_name , 'str' )
151
+ query_parameters = {}
152
+ if service_endpoint_id is not None :
153
+ query_parameters ['serviceEndpointId' ] = self ._serialize .query ('service_endpoint_id' , service_endpoint_id , 'str' )
154
+ if repository is not None :
155
+ query_parameters ['repository' ] = self ._serialize .query ('repository' , repository , 'str' )
156
+ response = self ._send (http_method = 'GET' ,
157
+ location_id = 'e05d4403-9b81-4244-8763-20fde28d1976' ,
158
+ version = '4.1-preview.1' ,
159
+ route_values = route_values ,
160
+ query_parameters = query_parameters ,
161
+ returns_collection = True )
162
+ return self ._deserialize ('[str]' , response )
163
+
137
164
def get_build_badge (self , project , repo_type , repo_id = None , branch_name = None ):
138
165
"""GetBuildBadge.
139
166
[Preview API] Gets a badge that indicates the status of the most recent build for the specified branch.
@@ -235,16 +262,16 @@ def get_builds(self, project=None, definitions=None, queues=None, build_number=N
235
262
:param datetime min_time: If specified, filters to builds that finished/started/queued after this date based on the queryOrder specified.
236
263
:param datetime max_time: If specified, filters to builds that finished/started/queued before this date based on the queryOrder specified.
237
264
:param str requested_for: If specified, filters to builds requested for the specified user.
238
- :param BuildReason reason_filter: If specified, filters to builds that match this reason.
239
- :param BuildStatus status_filter: If specified, filters to builds that match this status.
240
- :param BuildResult result_filter: If specified, filters to builds that match this result.
265
+ :param str reason_filter: If specified, filters to builds that match this reason.
266
+ :param str status_filter: If specified, filters to builds that match this status.
267
+ :param str result_filter: If specified, filters to builds that match this result.
241
268
:param [str] tag_filters: A comma-delimited list of tags. If specified, filters to builds that have the specified tags.
242
269
:param [str] properties: A comma-delimited list of properties to retrieve.
243
270
:param int top: The maximum number of builds to return.
244
271
:param str continuation_token: A continuation token, returned by a previous call to this method, that can be used to return the next set of builds.
245
272
:param int max_builds_per_definition: The maximum number of builds to return per definition.
246
- :param QueryDeletedOption deleted_filter: Indicates whether to exclude, include, or only return deleted builds.
247
- :param BuildQueryOrder query_order: The order in which builds should be returned.
273
+ :param str deleted_filter: Indicates whether to exclude, include, or only return deleted builds.
274
+ :param str query_order: The order in which builds should be returned.
248
275
:param str branch_name: If specified, filters to builds that built branches that built this branch.
249
276
:param [int] build_ids: A comma-delimited list that specifies the IDs of builds to retrieve.
250
277
:param str repository_id: If specified, filters to builds that built from this repository.
@@ -270,11 +297,11 @@ def get_builds(self, project=None, definitions=None, queues=None, build_number=N
270
297
if requested_for is not None :
271
298
query_parameters ['requestedFor' ] = self ._serialize .query ('requested_for' , requested_for , 'str' )
272
299
if reason_filter is not None :
273
- query_parameters ['reasonFilter' ] = self ._serialize .query ('reason_filter' , reason_filter , 'BuildReason ' )
300
+ query_parameters ['reasonFilter' ] = self ._serialize .query ('reason_filter' , reason_filter , 'str ' )
274
301
if status_filter is not None :
275
- query_parameters ['statusFilter' ] = self ._serialize .query ('status_filter' , status_filter , 'BuildStatus ' )
302
+ query_parameters ['statusFilter' ] = self ._serialize .query ('status_filter' , status_filter , 'str ' )
276
303
if result_filter is not None :
277
- query_parameters ['resultFilter' ] = self ._serialize .query ('result_filter' , result_filter , 'BuildResult ' )
304
+ query_parameters ['resultFilter' ] = self ._serialize .query ('result_filter' , result_filter , 'str ' )
278
305
if tag_filters is not None :
279
306
tag_filters = "," .join (tag_filters )
280
307
query_parameters ['tagFilters' ] = self ._serialize .query ('tag_filters' , tag_filters , 'str' )
@@ -288,9 +315,9 @@ def get_builds(self, project=None, definitions=None, queues=None, build_number=N
288
315
if max_builds_per_definition is not None :
289
316
query_parameters ['maxBuildsPerDefinition' ] = self ._serialize .query ('max_builds_per_definition' , max_builds_per_definition , 'int' )
290
317
if deleted_filter is not None :
291
- query_parameters ['deletedFilter' ] = self ._serialize .query ('deleted_filter' , deleted_filter , 'QueryDeletedOption ' )
318
+ query_parameters ['deletedFilter' ] = self ._serialize .query ('deleted_filter' , deleted_filter , 'str ' )
292
319
if query_order is not None :
293
- query_parameters ['queryOrder' ] = self ._serialize .query ('query_order' , query_order , 'BuildQueryOrder ' )
320
+ query_parameters ['queryOrder' ] = self ._serialize .query ('query_order' , query_order , 'str ' )
294
321
if branch_name is not None :
295
322
query_parameters ['branchName' ] = self ._serialize .query ('branch_name' , branch_name , 'str' )
296
323
if build_ids is not None :
@@ -544,7 +571,7 @@ def get_definitions(self, project=None, name=None, repository_id=None, repositor
544
571
:param str name: If specified, filters to definitions whose names match this pattern.
545
572
:param str repository_id: A repository ID. If specified, filters to definitions that use this repository.
546
573
:param str repository_type: If specified, filters to definitions that have a repository of this type.
547
- :param DefinitionQueryOrder query_order: Indicates the order in which definitions should be returned.
574
+ :param str query_order: Indicates the order in which definitions should be returned.
548
575
:param int top: The maximum number of definitions to return.
549
576
:param str continuation_token: A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions.
550
577
:param datetime min_metrics_time: If specified, indicates the date from which metrics should be included.
@@ -568,7 +595,7 @@ def get_definitions(self, project=None, name=None, repository_id=None, repositor
568
595
if repository_type is not None :
569
596
query_parameters ['repositoryType' ] = self ._serialize .query ('repository_type' , repository_type , 'str' )
570
597
if query_order is not None :
571
- query_parameters ['queryOrder' ] = self ._serialize .query ('query_order' , query_order , 'DefinitionQueryOrder ' )
598
+ query_parameters ['queryOrder' ] = self ._serialize .query ('query_order' , query_order , 'str ' )
572
599
if top is not None :
573
600
query_parameters ['$top' ] = self ._serialize .query ('top' , top , 'int' )
574
601
if continuation_token is not None :
@@ -669,7 +696,7 @@ def get_folders(self, project, path=None, query_order=None):
669
696
[Preview API] Gets a list of build definition folders.
670
697
:param str project: Project ID or project name
671
698
:param str path: The path to start with.
672
- :param FolderQueryOrder query_order: The order in which folders should be returned.
699
+ :param str query_order: The order in which folders should be returned.
673
700
:rtype: [Folder]
674
701
"""
675
702
route_values = {}
@@ -679,7 +706,7 @@ def get_folders(self, project, path=None, query_order=None):
679
706
route_values ['path' ] = self ._serialize .url ('path' , path , 'str' )
680
707
query_parameters = {}
681
708
if query_order is not None :
682
- query_parameters ['queryOrder' ] = self ._serialize .query ('query_order' , query_order , 'FolderQueryOrder ' )
709
+ query_parameters ['queryOrder' ] = self ._serialize .query ('query_order' , query_order , 'str ' )
683
710
response = self ._send (http_method = 'GET' ,
684
711
location_id = 'a906531b-d2da-4f55-bda7-f3e676cc50d9' ,
685
712
version = '4.1-preview.1' ,
@@ -1007,6 +1034,30 @@ def get_build_report_html_content(self, project, build_id, type=None):
1007
1034
query_parameters = query_parameters )
1008
1035
return self ._deserialize ('object' , response )
1009
1036
1037
+ def list_repositories (self , project , provider_name , service_endpoint_id = None ):
1038
+ """ListRepositories.
1039
+ [Preview API] Gets a list of source code repositories.
1040
+ :param str project: Project ID or project name
1041
+ :param str provider_name: The name of the source provider.
1042
+ :param str service_endpoint_id: If specified, the ID of the service endpoint to query. Can only be omitted for providers that do use service endpoints, e.g. TFVC or TFGit.
1043
+ :rtype: [SourceRepository]
1044
+ """
1045
+ route_values = {}
1046
+ if project is not None :
1047
+ route_values ['project' ] = self ._serialize .url ('project' , project , 'str' )
1048
+ if provider_name is not None :
1049
+ route_values ['providerName' ] = self ._serialize .url ('provider_name' , provider_name , 'str' )
1050
+ query_parameters = {}
1051
+ if service_endpoint_id is not None :
1052
+ query_parameters ['serviceEndpointId' ] = self ._serialize .query ('service_endpoint_id' , service_endpoint_id , 'str' )
1053
+ response = self ._send (http_method = 'GET' ,
1054
+ location_id = 'd44d1680-f978-4834-9b93-8c6e132329c9' ,
1055
+ version = '4.1-preview.1' ,
1056
+ route_values = route_values ,
1057
+ query_parameters = query_parameters ,
1058
+ returns_collection = True )
1059
+ return self ._deserialize ('[SourceRepository]' , response )
1060
+
1010
1061
def get_resource_usage (self ):
1011
1062
"""GetResourceUsage.
1012
1063
[Preview API] Gets information about build resources in the system.
@@ -1059,6 +1110,22 @@ def update_build_settings(self, settings):
1059
1110
content = content )
1060
1111
return self ._deserialize ('BuildSettings' , response )
1061
1112
1113
+ def list_source_providers (self , project ):
1114
+ """ListSourceProviders.
1115
+ [Preview API] Get a list of source providers and their capabilities.
1116
+ :param str project: Project ID or project name
1117
+ :rtype: [SourceProviderAttributes]
1118
+ """
1119
+ route_values = {}
1120
+ if project is not None :
1121
+ route_values ['project' ] = self ._serialize .url ('project' , project , 'str' )
1122
+ response = self ._send (http_method = 'GET' ,
1123
+ location_id = '3ce81729-954f-423d-a581-9fea01d25186' ,
1124
+ version = '4.1-preview.1' ,
1125
+ route_values = route_values ,
1126
+ returns_collection = True )
1127
+ return self ._deserialize ('[SourceProviderAttributes]' , response )
1128
+
1062
1129
def add_build_tag (self , project , build_id , tag ):
1063
1130
"""AddBuildTag.
1064
1131
[Preview API] Adds a tag to a build.
0 commit comments