python-cnb 1.21.13__tar.gz → 1.22.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_cnb-1.21.13/python_cnb.egg-info → python_cnb-1.22.12}/PKG-INFO +1 -1
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/activities.py +3 -3
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/assets.py +4 -4
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/badge.py +2 -2
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/build.py +3 -3
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/charge.py +4 -4
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/event.py +1 -1
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/followers.py +2 -2
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/git.py +34 -34
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/gitsettings.py +11 -11
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/issues.py +32 -32
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/knowledgebase.py +6 -6
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/members.py +15 -15
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/missions.py +2 -2
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/models/dto.py +7 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/organizations.py +10 -10
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/pulls.py +33 -33
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/rank.py +5 -5
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/registries.py +4 -4
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/releases.py +12 -12
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/repocodeissue.py +2 -2
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/repocontributor.py +1 -1
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/repolabels.py +4 -4
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/repositories.py +11 -11
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/search.py +1 -1
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/security.py +1 -1
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/starring.py +3 -3
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/users.py +6 -6
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/workspace.py +2 -2
- {python_cnb-1.21.13 → python_cnb-1.22.12/python_cnb.egg-info}/PKG-INFO +1 -1
- {python_cnb-1.21.13 → python_cnb-1.22.12}/setup.py +1 -1
- {python_cnb-1.21.13 → python_cnb-1.22.12}/LICENSE +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/MANIFEST.in +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/README.md +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/__init__.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/ai.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/ai_ext.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/client.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/cnb.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/exceptions.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/models/__init__.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/models/api.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/models/chart.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/models/constant.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/models/convert.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/models/die.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/models/errors.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/models/flags.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/models/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/models/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/models/git_woa_com_cnb_monorepo_platform_service_api_internal_models_artifactory_dto.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/models/member.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/models/models.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/models/openapi.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/models/organization.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/cnb/models/web.py +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/pyproject.toml +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/python_cnb.egg-info/SOURCES.txt +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/python_cnb.egg-info/dependency_links.txt +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/python_cnb.egg-info/requires.txt +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/python_cnb.egg-info/top_level.txt +0 -0
- {python_cnb-1.21.13 → python_cnb-1.22.12}/setup.cfg +0 -0
|
@@ -7,7 +7,7 @@ class ActivitiesService:
|
|
|
7
7
|
def __init__(self, client):
|
|
8
8
|
self._client = client
|
|
9
9
|
|
|
10
|
-
#
|
|
10
|
+
# 获取动态活跃详情。Get user activities.
|
|
11
11
|
def get_user_activities_by_date(self,
|
|
12
12
|
username: str,
|
|
13
13
|
date: Optional[str] = None,
|
|
@@ -24,7 +24,7 @@ class ActivitiesService:
|
|
|
24
24
|
)
|
|
25
25
|
return dto.ActivityDate.safe_parse(data)
|
|
26
26
|
|
|
27
|
-
#
|
|
27
|
+
# 获取仓库动态详情。Get repository activity details.
|
|
28
28
|
def get_user_repo_activity_details(self,
|
|
29
29
|
username: str,
|
|
30
30
|
activityType: str,
|
|
@@ -44,7 +44,7 @@ class ActivitiesService:
|
|
|
44
44
|
)
|
|
45
45
|
return data
|
|
46
46
|
|
|
47
|
-
# 获取仓库 top 活跃用户。List the top active users
|
|
47
|
+
# 获取仓库 top 活跃用户。List the top active users.
|
|
48
48
|
def top_contributors(self,
|
|
49
49
|
repo: str,
|
|
50
50
|
top: Optional[int] = None,
|
|
@@ -7,7 +7,7 @@ class AssetsService:
|
|
|
7
7
|
def __init__(self, client):
|
|
8
8
|
self._client = client
|
|
9
9
|
|
|
10
|
-
#
|
|
10
|
+
# 删除 asset 记录。Delete an asset record by ID.
|
|
11
11
|
def delete_asset(self,
|
|
12
12
|
repo: str,
|
|
13
13
|
assetID: str,
|
|
@@ -20,7 +20,7 @@ class AssetsService:
|
|
|
20
20
|
)
|
|
21
21
|
return
|
|
22
22
|
|
|
23
|
-
# 获取
|
|
23
|
+
# 获取 Issue/PR 文件。Get issue/PR files.
|
|
24
24
|
def get_files(self,
|
|
25
25
|
repo: str,
|
|
26
26
|
filePath: str,
|
|
@@ -33,7 +33,7 @@ class AssetsService:
|
|
|
33
33
|
)
|
|
34
34
|
return
|
|
35
35
|
|
|
36
|
-
# 获取
|
|
36
|
+
# 获取 Issue/PR 图片。Get issue/PR images.
|
|
37
37
|
def get_imgs(self,
|
|
38
38
|
repo: str,
|
|
39
39
|
imgPath: str,
|
|
@@ -46,7 +46,7 @@ class AssetsService:
|
|
|
46
46
|
)
|
|
47
47
|
return
|
|
48
48
|
|
|
49
|
-
#
|
|
49
|
+
# 获取仓库 asset 记录列表。Get repository asset records.
|
|
50
50
|
def list_assets(self,
|
|
51
51
|
slug: str,
|
|
52
52
|
page: Optional[int] = None,
|
|
@@ -23,7 +23,7 @@ class BadgeService:
|
|
|
23
23
|
)
|
|
24
24
|
return dto.GetBadgeResult.safe_parse(data)
|
|
25
25
|
|
|
26
|
-
#
|
|
26
|
+
# 获取徽章列表。Get badge list.
|
|
27
27
|
def list_badge(self,
|
|
28
28
|
repo: str,
|
|
29
29
|
body_params: dto.ListBadgeReq,
|
|
@@ -37,7 +37,7 @@ class BadgeService:
|
|
|
37
37
|
)
|
|
38
38
|
return dto.ListBadgeResult.safe_parse(data)
|
|
39
39
|
|
|
40
|
-
# 上传徽章数据。Upload badge data
|
|
40
|
+
# 上传徽章数据。Upload badge data.
|
|
41
41
|
def upload_badge(self,
|
|
42
42
|
repo: str,
|
|
43
43
|
body_params: dto.UploadBadgeReq,
|
|
@@ -7,7 +7,7 @@ class BuildService:
|
|
|
7
7
|
def __init__(self, client):
|
|
8
8
|
self._client = client
|
|
9
9
|
|
|
10
|
-
#
|
|
10
|
+
# 同步分支定时任务。Sync branch crontab tasks.
|
|
11
11
|
def build_crontab_sync(self,
|
|
12
12
|
repo: str,
|
|
13
13
|
branch: str,
|
|
@@ -33,7 +33,7 @@ class BuildService:
|
|
|
33
33
|
)
|
|
34
34
|
return dto.BuildCommonResult.safe_parse(data)
|
|
35
35
|
|
|
36
|
-
# 流水线runner日志下载。Pipeline runner log download.
|
|
36
|
+
# 流水线runner 日志下载。Pipeline runner log download.
|
|
37
37
|
def build_runner_download_log(self,
|
|
38
38
|
repo: str,
|
|
39
39
|
pipelineId: str,
|
|
@@ -85,7 +85,7 @@ class BuildService:
|
|
|
85
85
|
)
|
|
86
86
|
return dto.BuildLogsResult.safe_parse(data)
|
|
87
87
|
|
|
88
|
-
# 查询流水线Stage详情。Get pipeline build stage detail.
|
|
88
|
+
# 查询流水线Stage 详情。Get pipeline build stage detail.
|
|
89
89
|
def get_build_stage(self,
|
|
90
90
|
repo: str,
|
|
91
91
|
sn: str,
|
|
@@ -7,7 +7,7 @@ class ChargeService:
|
|
|
7
7
|
def __init__(self, client):
|
|
8
8
|
self._client = client
|
|
9
9
|
|
|
10
|
-
#
|
|
10
|
+
# 获取组织月度额度。Get organization monthly quotas.
|
|
11
11
|
def get_quota(self,
|
|
12
12
|
slug: str,
|
|
13
13
|
) -> dto.VolumeQuotaResp:
|
|
@@ -19,7 +19,7 @@ class ChargeService:
|
|
|
19
19
|
)
|
|
20
20
|
return dto.VolumeQuotaResp.safe_parse(data)
|
|
21
21
|
|
|
22
|
-
#
|
|
22
|
+
# 获取组织仓库用量。Get organization repository usage.
|
|
23
23
|
def get_repos_volume(self,
|
|
24
24
|
slug: str,
|
|
25
25
|
type: Optional[str] = None,
|
|
@@ -40,7 +40,7 @@ class ChargeService:
|
|
|
40
40
|
)
|
|
41
41
|
return [dto.RepoVolume.safe_parse(item) for item in data]
|
|
42
42
|
|
|
43
|
-
#
|
|
43
|
+
# 查看特权额度。View privilege quotas.
|
|
44
44
|
def get_special_amount(self,
|
|
45
45
|
slug: str,
|
|
46
46
|
) -> dto.SpecialAmount:
|
|
@@ -52,7 +52,7 @@ class ChargeService:
|
|
|
52
52
|
)
|
|
53
53
|
return dto.SpecialAmount.safe_parse(data)
|
|
54
54
|
|
|
55
|
-
#
|
|
55
|
+
# 获取组织资源用量。Get organization resource usage.
|
|
56
56
|
def get_volume(self,
|
|
57
57
|
slug: str,
|
|
58
58
|
month: Optional[str] = None,
|
|
@@ -7,7 +7,7 @@ class FollowersService:
|
|
|
7
7
|
def __init__(self, client):
|
|
8
8
|
self._client = client
|
|
9
9
|
|
|
10
|
-
#
|
|
10
|
+
# 获取粉丝列表。Get followers list.
|
|
11
11
|
def get_followers_by_user_id(self,
|
|
12
12
|
username: str,
|
|
13
13
|
page: Optional[int] = None,
|
|
@@ -26,7 +26,7 @@ class FollowersService:
|
|
|
26
26
|
)
|
|
27
27
|
return [dto.UserFollowResult.safe_parse(item) for item in data]
|
|
28
28
|
|
|
29
|
-
#
|
|
29
|
+
# 获取关注人列表。Get following list.
|
|
30
30
|
def get_following_by_user_id(self,
|
|
31
31
|
username: str,
|
|
32
32
|
page: Optional[int] = None,
|
|
@@ -10,7 +10,7 @@ class GitService:
|
|
|
10
10
|
def __init__(self, client):
|
|
11
11
|
self._client = client
|
|
12
12
|
|
|
13
|
-
#
|
|
13
|
+
# 创建 Blob 对象。Create blob object.
|
|
14
14
|
def create_blob(self,
|
|
15
15
|
repo: str,
|
|
16
16
|
body_params: api.PostBlobForm,
|
|
@@ -24,7 +24,7 @@ class GitService:
|
|
|
24
24
|
)
|
|
25
25
|
return api.Blob.safe_parse(data)
|
|
26
26
|
|
|
27
|
-
#
|
|
27
|
+
# 创建分支。Create branch.
|
|
28
28
|
def create_branch(self,
|
|
29
29
|
repo: str,
|
|
30
30
|
body_params: openapi.CreateBranchForm,
|
|
@@ -38,7 +38,7 @@ class GitService:
|
|
|
38
38
|
)
|
|
39
39
|
return
|
|
40
40
|
|
|
41
|
-
#
|
|
41
|
+
# 锁定分支。Lock branch.
|
|
42
42
|
def create_branch_lock(self,
|
|
43
43
|
repo: str,
|
|
44
44
|
branch: str,
|
|
@@ -51,7 +51,7 @@ class GitService:
|
|
|
51
51
|
)
|
|
52
52
|
return
|
|
53
53
|
|
|
54
|
-
#
|
|
54
|
+
# 创建标签。Create tag.
|
|
55
55
|
def create_tag(self,
|
|
56
56
|
repo: str,
|
|
57
57
|
body_params: api.PostTagFrom,
|
|
@@ -65,7 +65,7 @@ class GitService:
|
|
|
65
65
|
)
|
|
66
66
|
return api.Tag.safe_parse(data)
|
|
67
67
|
|
|
68
|
-
#
|
|
68
|
+
# 删除分支。Delete branch.
|
|
69
69
|
def delete_branch(self,
|
|
70
70
|
repo: str,
|
|
71
71
|
branch: str,
|
|
@@ -78,7 +78,7 @@ class GitService:
|
|
|
78
78
|
)
|
|
79
79
|
return
|
|
80
80
|
|
|
81
|
-
#
|
|
81
|
+
# 解锁分支。Unlock branch.
|
|
82
82
|
def delete_branch_lock(self,
|
|
83
83
|
repo: str,
|
|
84
84
|
branch: str,
|
|
@@ -91,7 +91,7 @@ class GitService:
|
|
|
91
91
|
)
|
|
92
92
|
return
|
|
93
93
|
|
|
94
|
-
#
|
|
94
|
+
# 删除提交元数据。Delete commit annotations.
|
|
95
95
|
def delete_commit_annotation(self,
|
|
96
96
|
repo: str,
|
|
97
97
|
sha: str,
|
|
@@ -105,7 +105,7 @@ class GitService:
|
|
|
105
105
|
)
|
|
106
106
|
return
|
|
107
107
|
|
|
108
|
-
#
|
|
108
|
+
# 删除提交附件。Delete commit asset.
|
|
109
109
|
def delete_commit_asset(self,
|
|
110
110
|
repo: str,
|
|
111
111
|
sha1: str,
|
|
@@ -119,7 +119,7 @@ class GitService:
|
|
|
119
119
|
)
|
|
120
120
|
return
|
|
121
121
|
|
|
122
|
-
#
|
|
122
|
+
# 删除标签。Delete tag.
|
|
123
123
|
def delete_tag(self,
|
|
124
124
|
repo: str,
|
|
125
125
|
tag: str,
|
|
@@ -132,7 +132,7 @@ class GitService:
|
|
|
132
132
|
)
|
|
133
133
|
return
|
|
134
134
|
|
|
135
|
-
#
|
|
135
|
+
# 删除标签元数据。Delete tag annotations.
|
|
136
136
|
def delete_tag_annotation(self,
|
|
137
137
|
repo: str,
|
|
138
138
|
tag_with_key: str,
|
|
@@ -145,7 +145,7 @@ class GitService:
|
|
|
145
145
|
)
|
|
146
146
|
return
|
|
147
147
|
|
|
148
|
-
#
|
|
148
|
+
# 下载仓库归档。Download repository archive.
|
|
149
149
|
def get_archive(self,
|
|
150
150
|
repo: str,
|
|
151
151
|
ref_with_path: str,
|
|
@@ -158,7 +158,7 @@ class GitService:
|
|
|
158
158
|
)
|
|
159
159
|
return
|
|
160
160
|
|
|
161
|
-
#
|
|
161
|
+
# 下载提交变更文件。Download commit changed files archive.
|
|
162
162
|
def get_archive_commit_changed_files(self,
|
|
163
163
|
repo: str,
|
|
164
164
|
sha1: str,
|
|
@@ -171,7 +171,7 @@ class GitService:
|
|
|
171
171
|
)
|
|
172
172
|
return
|
|
173
173
|
|
|
174
|
-
#
|
|
174
|
+
# 下载比较变更文件。Download compared changed files.
|
|
175
175
|
def get_archive_compare_changed_files(self,
|
|
176
176
|
repo: str,
|
|
177
177
|
base_head: str,
|
|
@@ -184,7 +184,7 @@ class GitService:
|
|
|
184
184
|
)
|
|
185
185
|
return
|
|
186
186
|
|
|
187
|
-
#
|
|
187
|
+
# 获取分支。Get branch.
|
|
188
188
|
def get_branch(self,
|
|
189
189
|
repo: str,
|
|
190
190
|
branch: str,
|
|
@@ -197,7 +197,7 @@ class GitService:
|
|
|
197
197
|
)
|
|
198
198
|
return api.BranchDetail.safe_parse(data)
|
|
199
199
|
|
|
200
|
-
#
|
|
200
|
+
# 获取提交。Get commit.
|
|
201
201
|
def get_commit(self,
|
|
202
202
|
repo: str,
|
|
203
203
|
ref: str,
|
|
@@ -210,7 +210,7 @@ class GitService:
|
|
|
210
210
|
)
|
|
211
211
|
return api.Commit.safe_parse(data)
|
|
212
212
|
|
|
213
|
-
#
|
|
213
|
+
# 查询提交元数据。Get commit annotations.
|
|
214
214
|
def get_commit_annotations(self,
|
|
215
215
|
repo: str,
|
|
216
216
|
sha: str,
|
|
@@ -223,7 +223,7 @@ class GitService:
|
|
|
223
223
|
)
|
|
224
224
|
return [web.CommitAnnotation.safe_parse(item) for item in data]
|
|
225
225
|
|
|
226
|
-
#
|
|
226
|
+
# 批量查询提交元数据。Batch get commit annotations.
|
|
227
227
|
def get_commit_annotations_in_batch(self,
|
|
228
228
|
repo: str,
|
|
229
229
|
body_params: web.GetCommitAnnotationsInBatchForm,
|
|
@@ -237,7 +237,7 @@ class GitService:
|
|
|
237
237
|
)
|
|
238
238
|
return [web.CommitAnnotationInBatch.safe_parse(item) for item in data]
|
|
239
239
|
|
|
240
|
-
#
|
|
240
|
+
# 下载 Commit 附件。Download commit attachments.
|
|
241
241
|
def get_commit_assets(self,
|
|
242
242
|
repo: str,
|
|
243
243
|
commit_id: str,
|
|
@@ -256,7 +256,7 @@ class GitService:
|
|
|
256
256
|
)
|
|
257
257
|
return
|
|
258
258
|
|
|
259
|
-
#
|
|
259
|
+
# 查询提交附件列表。List commit assets.
|
|
260
260
|
def get_commit_assets_by_sha(self,
|
|
261
261
|
repo: str,
|
|
262
262
|
sha1: str,
|
|
@@ -269,7 +269,7 @@ class GitService:
|
|
|
269
269
|
)
|
|
270
270
|
return [api.CommitAsset.safe_parse(item) for item in data]
|
|
271
271
|
|
|
272
|
-
#
|
|
272
|
+
# 查询提交状态检查。Get commit statuses.
|
|
273
273
|
def get_commit_statuses(self,
|
|
274
274
|
repo: str,
|
|
275
275
|
commitish: str,
|
|
@@ -282,7 +282,7 @@ class GitService:
|
|
|
282
282
|
)
|
|
283
283
|
return [git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.CommitStatus.safe_parse(item) for item in data]
|
|
284
284
|
|
|
285
|
-
#
|
|
285
|
+
# 比较提交差异。Compare commits.
|
|
286
286
|
def get_compare_commits(self,
|
|
287
287
|
repo: str,
|
|
288
288
|
base_head: str,
|
|
@@ -295,7 +295,7 @@ class GitService:
|
|
|
295
295
|
)
|
|
296
296
|
return api.CompareResponse.safe_parse(data)
|
|
297
297
|
|
|
298
|
-
#
|
|
298
|
+
# 查询仓库文件内容。Get repository file content.
|
|
299
299
|
def get_content(self,
|
|
300
300
|
repo: str,
|
|
301
301
|
file_path: str,
|
|
@@ -313,7 +313,7 @@ class GitService:
|
|
|
313
313
|
)
|
|
314
314
|
return api.Content.safe_parse(data)
|
|
315
315
|
|
|
316
|
-
#
|
|
316
|
+
# 查询仓库根目录内容。Get repository root contents.
|
|
317
317
|
def get_content_without_path(self,
|
|
318
318
|
repo: str,
|
|
319
319
|
ref: Optional[str] = None,
|
|
@@ -330,7 +330,7 @@ class GitService:
|
|
|
330
330
|
)
|
|
331
331
|
return api.Content.safe_parse(data)
|
|
332
332
|
|
|
333
|
-
#
|
|
333
|
+
# 获取默认分支。Get default branch.
|
|
334
334
|
def get_head(self,
|
|
335
335
|
repo: str,
|
|
336
336
|
) -> openapi.HeadRef:
|
|
@@ -342,7 +342,7 @@ class GitService:
|
|
|
342
342
|
)
|
|
343
343
|
return openapi.HeadRef.safe_parse(data)
|
|
344
344
|
|
|
345
|
-
# 获取
|
|
345
|
+
# 获取 LFS 文件下载链接。Get LFS file download URL.
|
|
346
346
|
def get_presigned_lfsdownload_link(self,
|
|
347
347
|
slug: str,
|
|
348
348
|
oid: str,
|
|
@@ -360,7 +360,7 @@ class GitService:
|
|
|
360
360
|
)
|
|
361
361
|
return
|
|
362
362
|
|
|
363
|
-
#
|
|
363
|
+
# 获取文件原始内容。Get raw file content.
|
|
364
364
|
def get_raw(self,
|
|
365
365
|
repo: str,
|
|
366
366
|
ref_with_path: str,
|
|
@@ -378,7 +378,7 @@ class GitService:
|
|
|
378
378
|
)
|
|
379
379
|
return str.safe_parse(data)
|
|
380
380
|
|
|
381
|
-
#
|
|
381
|
+
# 获取标签。Get tag.
|
|
382
382
|
def get_tag(self,
|
|
383
383
|
repo: str,
|
|
384
384
|
tag: str,
|
|
@@ -391,7 +391,7 @@ class GitService:
|
|
|
391
391
|
)
|
|
392
392
|
return api.Tag.safe_parse(data)
|
|
393
393
|
|
|
394
|
-
#
|
|
394
|
+
# 查询标签元数据。Get tag annotations.
|
|
395
395
|
def get_tag_annotations(self,
|
|
396
396
|
repo: str,
|
|
397
397
|
tag: str,
|
|
@@ -423,7 +423,7 @@ class GitService:
|
|
|
423
423
|
)
|
|
424
424
|
return [api.Branch.safe_parse(item) for item in data]
|
|
425
425
|
|
|
426
|
-
#
|
|
426
|
+
# 查询提交列表。List commits.
|
|
427
427
|
def list_commits(self,
|
|
428
428
|
repo: str,
|
|
429
429
|
sha: Optional[str] = None,
|
|
@@ -452,7 +452,7 @@ class GitService:
|
|
|
452
452
|
)
|
|
453
453
|
return [api.Commit.safe_parse(item) for item in data]
|
|
454
454
|
|
|
455
|
-
#
|
|
455
|
+
# 查询标签列表。List tags.
|
|
456
456
|
def list_tags(self,
|
|
457
457
|
repo: str,
|
|
458
458
|
page: Optional[int] = None,
|
|
@@ -471,7 +471,7 @@ class GitService:
|
|
|
471
471
|
)
|
|
472
472
|
return [api.Tag.safe_parse(item) for item in data]
|
|
473
473
|
|
|
474
|
-
#
|
|
474
|
+
# 确认提交附件上传。Confirm commit asset upload.
|
|
475
475
|
def post_commit_asset_upload_confirmation(self,
|
|
476
476
|
repo: str,
|
|
477
477
|
sha1: str,
|
|
@@ -491,7 +491,7 @@ class GitService:
|
|
|
491
491
|
)
|
|
492
492
|
return
|
|
493
493
|
|
|
494
|
-
#
|
|
494
|
+
# 获取提交附件上传地址。Get commit asset upload URL.
|
|
495
495
|
def post_commit_asset_upload_url(self,
|
|
496
496
|
repo: str,
|
|
497
497
|
sha1: str,
|
|
@@ -506,7 +506,7 @@ class GitService:
|
|
|
506
506
|
)
|
|
507
507
|
return openapi.CommitAssetUploadURL.safe_parse(data)
|
|
508
508
|
|
|
509
|
-
#
|
|
509
|
+
# 设置提交元数据。Set commit annotations.
|
|
510
510
|
def put_commit_annotations(self,
|
|
511
511
|
repo: str,
|
|
512
512
|
sha: str,
|
|
@@ -521,7 +521,7 @@ class GitService:
|
|
|
521
521
|
)
|
|
522
522
|
return
|
|
523
523
|
|
|
524
|
-
#
|
|
524
|
+
# 设置标签元数据。Set tag annotations.
|
|
525
525
|
def put_tag_annotations(self,
|
|
526
526
|
repo: str,
|
|
527
527
|
tag: str,
|
|
@@ -7,7 +7,7 @@ class GitsettingsService:
|
|
|
7
7
|
def __init__(self, client):
|
|
8
8
|
self._client = client
|
|
9
9
|
|
|
10
|
-
#
|
|
10
|
+
# 删除保护分支规则。Delete branch protection rule.
|
|
11
11
|
def delete_branch_protection(self,
|
|
12
12
|
repo: str,
|
|
13
13
|
id: str,
|
|
@@ -20,7 +20,7 @@ class GitsettingsService:
|
|
|
20
20
|
)
|
|
21
21
|
return
|
|
22
22
|
|
|
23
|
-
#
|
|
23
|
+
# 获取保护分支规则。Get branch protection rule.
|
|
24
24
|
def get_branch_protection(self,
|
|
25
25
|
repo: str,
|
|
26
26
|
id: str,
|
|
@@ -33,7 +33,7 @@ class GitsettingsService:
|
|
|
33
33
|
)
|
|
34
34
|
return api.BranchProtection.safe_parse(data)
|
|
35
35
|
|
|
36
|
-
#
|
|
36
|
+
# 查询云原生构建设置。Get cloud-native build settings.
|
|
37
37
|
def get_pipeline_settings(self,
|
|
38
38
|
repo: str,
|
|
39
39
|
) -> api.PipelineSettings:
|
|
@@ -45,7 +45,7 @@ class GitsettingsService:
|
|
|
45
45
|
)
|
|
46
46
|
return api.PipelineSettings.safe_parse(data)
|
|
47
47
|
|
|
48
|
-
#
|
|
48
|
+
# 查询合并请求设置。Get pull request settings.
|
|
49
49
|
def get_pull_request_settings(self,
|
|
50
50
|
repo: str,
|
|
51
51
|
) -> api.PullRequestSettings:
|
|
@@ -57,7 +57,7 @@ class GitsettingsService:
|
|
|
57
57
|
)
|
|
58
58
|
return api.PullRequestSettings.safe_parse(data)
|
|
59
59
|
|
|
60
|
-
#
|
|
60
|
+
# 查询推送限制设置。Get push limit settings.
|
|
61
61
|
def get_push_limit_settings(self,
|
|
62
62
|
repo: str,
|
|
63
63
|
) -> api.PushLimitSettings:
|
|
@@ -69,7 +69,7 @@ class GitsettingsService:
|
|
|
69
69
|
)
|
|
70
70
|
return api.PushLimitSettings.safe_parse(data)
|
|
71
71
|
|
|
72
|
-
#
|
|
72
|
+
# 查询保护分支规则列表。List branch protection rules.
|
|
73
73
|
def list_branch_protections(self,
|
|
74
74
|
repo: str,
|
|
75
75
|
) -> list[api.BranchProtection]:
|
|
@@ -81,7 +81,7 @@ class GitsettingsService:
|
|
|
81
81
|
)
|
|
82
82
|
return [api.BranchProtection.safe_parse(item) for item in data]
|
|
83
83
|
|
|
84
|
-
#
|
|
84
|
+
# 更新保护分支规则。Update branch protection rule.
|
|
85
85
|
def patch_branch_protection(self,
|
|
86
86
|
repo: str,
|
|
87
87
|
id: str,
|
|
@@ -96,7 +96,7 @@ class GitsettingsService:
|
|
|
96
96
|
)
|
|
97
97
|
return
|
|
98
98
|
|
|
99
|
-
#
|
|
99
|
+
# 创建保护分支规则。Create branch protection rule.
|
|
100
100
|
def post_branch_protection(self,
|
|
101
101
|
repo: str,
|
|
102
102
|
body_params: api.BranchProtection,
|
|
@@ -110,7 +110,7 @@ class GitsettingsService:
|
|
|
110
110
|
)
|
|
111
111
|
return
|
|
112
112
|
|
|
113
|
-
#
|
|
113
|
+
# 更新云原生构建设置。Update cloud-native build settings.
|
|
114
114
|
def put_pipeline_settings(self,
|
|
115
115
|
repo: str,
|
|
116
116
|
body_params: api.PipelineSettings,
|
|
@@ -124,7 +124,7 @@ class GitsettingsService:
|
|
|
124
124
|
)
|
|
125
125
|
return
|
|
126
126
|
|
|
127
|
-
#
|
|
127
|
+
# 更新合并请求设置。Update pull request settings.
|
|
128
128
|
def put_pull_request_settings(self,
|
|
129
129
|
repo: str,
|
|
130
130
|
body_params: api.PullRequestSettings,
|
|
@@ -138,7 +138,7 @@ class GitsettingsService:
|
|
|
138
138
|
)
|
|
139
139
|
return
|
|
140
140
|
|
|
141
|
-
#
|
|
141
|
+
# 设置推送限制。Set push limit.
|
|
142
142
|
def put_push_limit_settings(self,
|
|
143
143
|
repo: str,
|
|
144
144
|
body_params: api.PushLimitSettings,
|