@@ -781,13 +781,15 @@ def get_pull_request_iteration_commits(self, repository_id, pull_request_id, ite
781
781
query_parameters = query_parameters )
782
782
return self ._deserialize ('[GitCommitRef]' , self ._unwrap_collection (response ))
783
783
784
- def get_pull_request_commits (self , repository_id , pull_request_id , project = None ):
784
+ def get_pull_request_commits (self , repository_id , pull_request_id , project = None , top = None , continuation_token = None ):
785
785
"""GetPullRequestCommits.
786
786
Get the commits for the specified pull request.
787
787
:param str repository_id: ID or name of the repository.
788
788
:param int pull_request_id: ID of the pull request.
789
789
:param str project: Project ID or project name
790
- :rtype: [GitCommitRef]
790
+ :param int top: Maximum number of commits to return.
791
+ :param str continuation_token: The continuation token used for pagination.
792
+ :rtype: :class:`<GetPullRequestCommitsResponseValue>`
791
793
"""
792
794
route_values = {}
793
795
if project is not None :
@@ -796,11 +798,32 @@ def get_pull_request_commits(self, repository_id, pull_request_id, project=None)
796
798
route_values ['repositoryId' ] = self ._serialize .url ('repository_id' , repository_id , 'str' )
797
799
if pull_request_id is not None :
798
800
route_values ['pullRequestId' ] = self ._serialize .url ('pull_request_id' , pull_request_id , 'int' )
801
+ query_parameters = {}
802
+ if top is not None :
803
+ query_parameters ['$top' ] = self ._serialize .query ('top' , top , 'int' )
804
+ if continuation_token is not None :
805
+ query_parameters ['continuationToken' ] = self ._serialize .query ('continuation_token' , continuation_token , 'str' )
799
806
response = self ._send (http_method = 'GET' ,
800
807
location_id = '52823034-34a8-4576-922c-8d8b77e9e4c4' ,
801
808
version = '5.1' ,
802
- route_values = route_values )
803
- return self ._deserialize ('[GitCommitRef]' , self ._unwrap_collection (response ))
809
+ route_values = route_values ,
810
+ query_parameters = query_parameters )
811
+ response_value = self ._deserialize ('[GitCommitRef]' , self ._unwrap_collection (response ))
812
+ continuation_token = self ._get_continuation_token (response )
813
+ return self .GetPullRequestCommitsResponseValue (response_value , continuation_token )
814
+
815
+ class GetPullRequestCommitsResponseValue (object ):
816
+ def __init__ (self , value , continuation_token ):
817
+ """
818
+ Response for the get_pull_request_commits method
819
+
820
+ :param value:
821
+ :type value: :class:`<[GitCommitRef]> <azure.devops.v5_1.git.models.[GitCommitRef]>`
822
+ :param continuation_token: The continuation token to be used to get the next page of results.
823
+ :type continuation_token: str
824
+ """
825
+ self .value = value
826
+ self .continuation_token = continuation_token
804
827
805
828
def get_pull_request_iteration_changes (self , repository_id , pull_request_id , iteration_id , project = None , top = None , skip = None , compare_to = None ):
806
829
"""GetPullRequestIterationChanges.
@@ -1601,7 +1624,7 @@ def get_pushes(self, repository_id, project=None, skip=None, top=None, search_cr
1601
1624
query_parameters = query_parameters )
1602
1625
return self ._deserialize ('[GitPush]' , self ._unwrap_collection (response ))
1603
1626
1604
- def get_refs (self , repository_id , project = None , filter = None , include_links = None , include_statuses = None , include_my_branches = None , latest_statuses_only = None , peel_tags = None , filter_contains = None ):
1627
+ def get_refs (self , repository_id , project = None , filter = None , include_links = None , include_statuses = None , include_my_branches = None , latest_statuses_only = None , peel_tags = None , filter_contains = None , top = None , continuation_token = None ):
1605
1628
"""GetRefs.
1606
1629
Queries the provided repository for its refs and returns them.
1607
1630
:param str repository_id: The name or ID of the repository.
@@ -1613,7 +1636,9 @@ def get_refs(self, repository_id, project=None, filter=None, include_links=None,
1613
1636
:param bool latest_statuses_only: [optional] True to include only the tip commit status for each ref. This option requires `includeStatuses` to be true. The default value is false.
1614
1637
:param bool peel_tags: [optional] Annotated tags will populate the PeeledObjectId property. default is false.
1615
1638
:param str filter_contains: [optional] A filter to apply to the refs (contains).
1616
- :rtype: [GitRef]
1639
+ :param int top: [optional] Maximum number of refs to return. It cannot be bigger than 1000. If it is not provided but continuationToken is, top will default to 100.
1640
+ :param str continuation_token: The continuation token used for pagination.
1641
+ :rtype: :class:`<GetRefsResponseValue>`
1617
1642
"""
1618
1643
route_values = {}
1619
1644
if project is not None :
@@ -1635,12 +1660,31 @@ def get_refs(self, repository_id, project=None, filter=None, include_links=None,
1635
1660
query_parameters ['peelTags' ] = self ._serialize .query ('peel_tags' , peel_tags , 'bool' )
1636
1661
if filter_contains is not None :
1637
1662
query_parameters ['filterContains' ] = self ._serialize .query ('filter_contains' , filter_contains , 'str' )
1663
+ if top is not None :
1664
+ query_parameters ['$top' ] = self ._serialize .query ('top' , top , 'int' )
1665
+ if continuation_token is not None :
1666
+ query_parameters ['continuationToken' ] = self ._serialize .query ('continuation_token' , continuation_token , 'str' )
1638
1667
response = self ._send (http_method = 'GET' ,
1639
1668
location_id = '2d874a60-a811-4f62-9c9f-963a6ea0a55b' ,
1640
1669
version = '5.1' ,
1641
1670
route_values = route_values ,
1642
1671
query_parameters = query_parameters )
1643
- return self ._deserialize ('[GitRef]' , self ._unwrap_collection (response ))
1672
+ response_value = self ._deserialize ('[GitRef]' , self ._unwrap_collection (response ))
1673
+ continuation_token = self ._get_continuation_token (response )
1674
+ return self .GetRefsResponseValue (response_value , continuation_token )
1675
+
1676
+ class GetRefsResponseValue (object ):
1677
+ def __init__ (self , value , continuation_token ):
1678
+ """
1679
+ Response for the get_refs method
1680
+
1681
+ :param value:
1682
+ :type value: :class:`<[GitRef]> <azure.devops.v5_1.git.models.[GitRef]>`
1683
+ :param continuation_token: The continuation token to be used to get the next page of results.
1684
+ :type continuation_token: str
1685
+ """
1686
+ self .value = value
1687
+ self .continuation_token = continuation_token
1644
1688
1645
1689
def update_ref (self , new_ref_info , repository_id , filter , project = None , project_id = None ):
1646
1690
"""UpdateRef.
0 commit comments