Skip to content

Commit 08a919d

Browse files
committed
Add ListMergeRequests api.
1 parent a0da66f commit 08a919d

10 files changed

+389
-3
lines changed

aliyun-python-sdk-codeup/ChangeLog.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2021-01-18 Version: 0.0.7
2+
- Add ListMergeRequests api.
3+
- Add protected branch api, CreateRepositoryProtectedBranch and DeleteRepositoryProtectedBranch.
4+
- Add repository deploy key api, EnableRepositoryDeployKey and CreateRepositoryDeployKey.
5+
- Add UpdateRepository api.
6+
- Update GetUserInfo, support use OrganizationId param to get user organization name.
7+
8+
19
2020-12-18 Version: 0.0.6
210
- Support ListRepositories, ListOrganizations, GetUserInfo, ListRepositoryWebhook, DeleteRepositoryWebhook api.
311
- AddWebhook api support SecretToken.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.0.6'
1+
__version__ = '0.0.7'
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RoaRequest
21+
22+
class CreateRepositoryDeployKeyRequest(RoaRequest):
23+
24+
def __init__(self):
25+
RoaRequest.__init__(self, 'codeup', '2020-04-14', 'CreateRepositoryDeployKey')
26+
self.set_uri_pattern('/api/v3/projects/[ProjectId]/keys')
27+
self.set_method('POST')
28+
29+
def get_OrganizationId(self):
30+
return self.get_query_params().get('OrganizationId')
31+
32+
def set_OrganizationId(self,OrganizationId):
33+
self.add_query_param('OrganizationId',OrganizationId)
34+
35+
def get_SubUserId(self):
36+
return self.get_query_params().get('SubUserId')
37+
38+
def set_SubUserId(self,SubUserId):
39+
self.add_query_param('SubUserId',SubUserId)
40+
41+
def get_AccessToken(self):
42+
return self.get_query_params().get('AccessToken')
43+
44+
def set_AccessToken(self,AccessToken):
45+
self.add_query_param('AccessToken',AccessToken)
46+
47+
def get_ProjectId(self):
48+
return self.get_path_params().get('ProjectId')
49+
50+
def set_ProjectId(self,ProjectId):
51+
self.add_path_param('ProjectId',ProjectId)
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RoaRequest
21+
22+
class CreateRepositoryProtectedBranchRequest(RoaRequest):
23+
24+
def __init__(self):
25+
RoaRequest.__init__(self, 'codeup', '2020-04-14', 'CreateRepositoryProtectedBranch')
26+
self.set_uri_pattern('/api/v4/projects/[ProjectId]/repository/protect_branches')
27+
self.set_method('POST')
28+
29+
def get_OrganizationId(self):
30+
return self.get_query_params().get('OrganizationId')
31+
32+
def set_OrganizationId(self,OrganizationId):
33+
self.add_query_param('OrganizationId',OrganizationId)
34+
35+
def get_AccessToken(self):
36+
return self.get_query_params().get('AccessToken')
37+
38+
def set_AccessToken(self,AccessToken):
39+
self.add_query_param('AccessToken',AccessToken)
40+
41+
def get_ProjectId(self):
42+
return self.get_path_params().get('ProjectId')
43+
44+
def set_ProjectId(self,ProjectId):
45+
self.add_path_param('ProjectId',ProjectId)
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RoaRequest
21+
22+
class DeleteRepositoryProtectedBranchRequest(RoaRequest):
23+
24+
def __init__(self):
25+
RoaRequest.__init__(self, 'codeup', '2020-04-14', 'DeleteRepositoryProtectedBranch')
26+
self.set_uri_pattern('/api/v4/projects/[ProjectId]/repository/protect_branches/[ProtectedBranchId]')
27+
self.set_method('DELETE')
28+
29+
def get_OrganizationId(self):
30+
return self.get_query_params().get('OrganizationId')
31+
32+
def set_OrganizationId(self,OrganizationId):
33+
self.add_query_param('OrganizationId',OrganizationId)
34+
35+
def get_ProtectedBranchId(self):
36+
return self.get_path_params().get('ProtectedBranchId')
37+
38+
def set_ProtectedBranchId(self,ProtectedBranchId):
39+
self.add_path_param('ProtectedBranchId',ProtectedBranchId)
40+
41+
def get_AccessToken(self):
42+
return self.get_query_params().get('AccessToken')
43+
44+
def set_AccessToken(self,AccessToken):
45+
self.add_query_param('AccessToken',AccessToken)
46+
47+
def get_ProjectId(self):
48+
return self.get_path_params().get('ProjectId')
49+
50+
def set_ProjectId(self,ProjectId):
51+
self.add_path_param('ProjectId',ProjectId)
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RoaRequest
21+
22+
class EnableRepositoryDeployKeyRequest(RoaRequest):
23+
24+
def __init__(self):
25+
RoaRequest.__init__(self, 'codeup', '2020-04-14', 'EnableRepositoryDeployKey')
26+
self.set_uri_pattern('/api/v3/projects/[ProjectId]/keys/[KeyId]/enable')
27+
self.set_method('POST')
28+
29+
def get_OrganizationId(self):
30+
return self.get_query_params().get('OrganizationId')
31+
32+
def set_OrganizationId(self,OrganizationId):
33+
self.add_query_param('OrganizationId',OrganizationId)
34+
35+
def get_SubUserId(self):
36+
return self.get_query_params().get('SubUserId')
37+
38+
def set_SubUserId(self,SubUserId):
39+
self.add_query_param('SubUserId',SubUserId)
40+
41+
def get_AccessToken(self):
42+
return self.get_query_params().get('AccessToken')
43+
44+
def set_AccessToken(self,AccessToken):
45+
self.add_query_param('AccessToken',AccessToken)
46+
47+
def get_KeyId(self):
48+
return self.get_path_params().get('KeyId')
49+
50+
def set_KeyId(self,KeyId):
51+
self.add_path_param('KeyId',KeyId)
52+
53+
def get_ProjectId(self):
54+
return self.get_path_params().get('ProjectId')
55+
56+
def set_ProjectId(self,ProjectId):
57+
self.add_path_param('ProjectId',ProjectId)

aliyun-python-sdk-codeup/aliyunsdkcodeup/request/v20200414/GetFileBlobsRequest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ def get_FilePath(self):
5656
def set_FilePath(self,FilePath):
5757
self.add_query_param('FilePath',FilePath)
5858

59-
def get__From(self):
59+
def get_From(self):
6060
return self.get_query_params().get('From')
6161

62-
def set__From(self,_From):
62+
def set_From(self,_From):
6363
self.add_query_param('From',_From)
6464

6565
def get_To(self):

aliyun-python-sdk-codeup/aliyunsdkcodeup/request/v20200414/GetUserInfoRequest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ def __init__(self):
2626
self.set_uri_pattern('/api/v3/user/current')
2727
self.set_method('GET')
2828

29+
def get_OrganizationId(self):
30+
return self.get_query_params().get('OrganizationId')
31+
32+
def set_OrganizationId(self,OrganizationId):
33+
self.add_query_param('OrganizationId',OrganizationId)
34+
2935
def get_AccessToken(self):
3036
return self.get_query_params().get('AccessToken')
3137

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RoaRequest
21+
22+
class ListMergeRequestsRequest(RoaRequest):
23+
24+
def __init__(self):
25+
RoaRequest.__init__(self, 'codeup', '2020-04-14', 'ListMergeRequests')
26+
self.set_uri_pattern('/api/v4/merge_requests/advanced_search')
27+
self.set_method('GET')
28+
29+
def get_BeforeDate(self):
30+
return self.get_query_params().get('BeforeDate')
31+
32+
def set_BeforeDate(self,BeforeDate):
33+
self.add_query_param('BeforeDate',BeforeDate)
34+
35+
def get_AssigneeIdList(self):
36+
return self.get_query_params().get('AssigneeIdList')
37+
38+
def set_AssigneeIdList(self,AssigneeIdList):
39+
self.add_query_param('AssigneeIdList',AssigneeIdList)
40+
41+
def get_AccessToken(self):
42+
return self.get_query_params().get('AccessToken')
43+
44+
def set_AccessToken(self,AccessToken):
45+
self.add_query_param('AccessToken',AccessToken)
46+
47+
def get_SubscriberCodeupIdList(self):
48+
return self.get_query_params().get('SubscriberCodeupIdList')
49+
50+
def set_SubscriberCodeupIdList(self,SubscriberCodeupIdList):
51+
self.add_query_param('SubscriberCodeupIdList',SubscriberCodeupIdList)
52+
53+
def get_AfterDate(self):
54+
return self.get_query_params().get('AfterDate')
55+
56+
def set_AfterDate(self,AfterDate):
57+
self.add_query_param('AfterDate',AfterDate)
58+
59+
def get_OrganizationId(self):
60+
return self.get_query_params().get('OrganizationId')
61+
62+
def set_OrganizationId(self,OrganizationId):
63+
self.add_query_param('OrganizationId',OrganizationId)
64+
65+
def get_GroupIdList(self):
66+
return self.get_query_params().get('GroupIdList')
67+
68+
def set_GroupIdList(self,GroupIdList):
69+
self.add_query_param('GroupIdList',GroupIdList)
70+
71+
def get_Search(self):
72+
return self.get_query_params().get('Search')
73+
74+
def set_Search(self,Search):
75+
self.add_query_param('Search',Search)
76+
77+
def get_AuthorCodeupIdList(self):
78+
return self.get_query_params().get('AuthorCodeupIdList')
79+
80+
def set_AuthorCodeupIdList(self,AuthorCodeupIdList):
81+
self.add_query_param('AuthorCodeupIdList',AuthorCodeupIdList)
82+
83+
def get_AuthorIdList(self):
84+
return self.get_query_params().get('AuthorIdList')
85+
86+
def set_AuthorIdList(self,AuthorIdList):
87+
self.add_query_param('AuthorIdList',AuthorIdList)
88+
89+
def get_PageSize(self):
90+
return self.get_query_params().get('PageSize')
91+
92+
def set_PageSize(self,PageSize):
93+
self.add_query_param('PageSize',PageSize)
94+
95+
def get_ProjectIdList(self):
96+
return self.get_query_params().get('ProjectIdList')
97+
98+
def set_ProjectIdList(self,ProjectIdList):
99+
self.add_query_param('ProjectIdList',ProjectIdList)
100+
101+
def get_Page(self):
102+
return self.get_query_params().get('Page')
103+
104+
def set_Page(self,Page):
105+
self.add_query_param('Page',Page)
106+
107+
def get_AssigneeCodeupIdList(self):
108+
return self.get_query_params().get('AssigneeCodeupIdList')
109+
110+
def set_AssigneeCodeupIdList(self,AssigneeCodeupIdList):
111+
self.add_query_param('AssigneeCodeupIdList',AssigneeCodeupIdList)
112+
113+
def get_State(self):
114+
return self.get_query_params().get('State')
115+
116+
def set_State(self,State):
117+
self.add_query_param('State',State)
118+
119+
def get_Order(self):
120+
return self.get_query_params().get('Order')
121+
122+
def set_Order(self,Order):
123+
self.add_query_param('Order',Order)

0 commit comments

Comments
 (0)