python-cnb 1.20.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.
Files changed (63) hide show
  1. {python_cnb-1.20.13/python_cnb.egg-info → python_cnb-1.22.12}/PKG-INFO +1 -1
  2. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/activities.py +3 -3
  3. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/assets.py +4 -4
  4. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/badge.py +2 -2
  5. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/build.py +3 -3
  6. python_cnb-1.22.12/cnb/charge.py +72 -0
  7. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/event.py +1 -1
  8. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/followers.py +2 -2
  9. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/git.py +34 -34
  10. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/gitsettings.py +11 -11
  11. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/issues.py +36 -32
  12. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/knowledgebase.py +28 -5
  13. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/members.py +15 -15
  14. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/missions.py +2 -2
  15. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/models/dto.py +40 -1
  16. python_cnb-1.22.12/cnb/models/errors.py +11 -0
  17. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/organizations.py +10 -10
  18. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/pulls.py +33 -33
  19. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/rank.py +5 -5
  20. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/registries.py +20 -4
  21. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/releases.py +12 -12
  22. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/repocodeissue.py +2 -2
  23. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/repocontributor.py +1 -1
  24. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/repolabels.py +4 -4
  25. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/repositories.py +11 -11
  26. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/search.py +1 -1
  27. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/security.py +1 -1
  28. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/starring.py +3 -3
  29. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/users.py +6 -6
  30. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/workspace.py +2 -2
  31. {python_cnb-1.20.13 → python_cnb-1.22.12/python_cnb.egg-info}/PKG-INFO +1 -1
  32. {python_cnb-1.20.13 → python_cnb-1.22.12}/python_cnb.egg-info/SOURCES.txt +1 -0
  33. {python_cnb-1.20.13 → python_cnb-1.22.12}/setup.py +1 -1
  34. python_cnb-1.20.13/cnb/charge.py +0 -22
  35. {python_cnb-1.20.13 → python_cnb-1.22.12}/LICENSE +0 -0
  36. {python_cnb-1.20.13 → python_cnb-1.22.12}/MANIFEST.in +0 -0
  37. {python_cnb-1.20.13 → python_cnb-1.22.12}/README.md +0 -0
  38. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/__init__.py +0 -0
  39. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/ai.py +0 -0
  40. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/ai_ext.py +0 -0
  41. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/client.py +0 -0
  42. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/cnb.py +0 -0
  43. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/exceptions.py +0 -0
  44. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/models/__init__.py +0 -0
  45. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/models/api.py +0 -0
  46. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/models/chart.py +0 -0
  47. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/models/constant.py +0 -0
  48. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/models/convert.py +0 -0
  49. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/models/die.py +0 -0
  50. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/models/flags.py +0 -0
  51. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/models/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.py +0 -0
  52. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/models/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.py +0 -0
  53. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/models/git_woa_com_cnb_monorepo_platform_service_api_internal_models_artifactory_dto.py +0 -0
  54. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/models/member.py +0 -0
  55. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/models/models.py +0 -0
  56. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/models/openapi.py +0 -0
  57. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/models/organization.py +0 -0
  58. {python_cnb-1.20.13 → python_cnb-1.22.12}/cnb/models/web.py +0 -0
  59. {python_cnb-1.20.13 → python_cnb-1.22.12}/pyproject.toml +0 -0
  60. {python_cnb-1.20.13 → python_cnb-1.22.12}/python_cnb.egg-info/dependency_links.txt +0 -0
  61. {python_cnb-1.20.13 → python_cnb-1.22.12}/python_cnb.egg-info/requires.txt +0 -0
  62. {python_cnb-1.20.13 → python_cnb-1.22.12}/python_cnb.egg-info/top_level.txt +0 -0
  63. {python_cnb-1.20.13 → python_cnb-1.22.12}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-cnb
3
- Version: 1.20.13
3
+ Version: 1.22.12
4
4
  Summary: CNB OpenAPI的Python SDK,方便与CNB平台进行交互
5
5
  Home-page: https://cnb.cool
6
6
  Author: Tencent Cloud
@@ -7,7 +7,7 @@ class ActivitiesService:
7
7
  def __init__(self, client):
8
8
  self._client = client
9
9
 
10
- # 获取个人动态活跃详情汇总。Get user activities by date.
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
- # 个人仓库动态详情列表。List of personal repository activity details.
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
- # 通过 asset 记录 id 删除一个 asset
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
- # 获取 issue 文件或合并请求文件的请求,返回文件二进制内容。Request to retrieve file of issues and pull requests, returns binary content.
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
- # 获取 issue 图片或合并请求图片的请求,返回图片二进制内容。Request to retrieve image of issues and pull requests, returns binary content.
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
- # 仓库的 asset 记录列表
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
- # 获取徽章列表数据。List badge data
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
- # 同步仓库分支下的定时任务。 Synchronize the content under the repository branch.
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,
@@ -0,0 +1,72 @@
1
+ # Code generated by cnb.cool/cnb/sdk/cnb-sdk-generator. DO NOT EDIT.
2
+ # source: https://api.cnb-dev.woa.com/swagger.json
3
+
4
+ from typing import Optional
5
+ from .models import dto
6
+ class ChargeService:
7
+ def __init__(self, client):
8
+ self._client = client
9
+
10
+ # 获取组织月度额度。Get organization monthly quotas.
11
+ def get_quota(self,
12
+ slug: str,
13
+ ) -> dto.VolumeQuotaResp:
14
+ u = "/%s/-/charge/quota" % (slug, )
15
+
16
+ data = self._client.request(
17
+ method="GET",
18
+ endpoint=u,
19
+ )
20
+ return dto.VolumeQuotaResp.safe_parse(data)
21
+
22
+ # 获取组织仓库用量。Get organization repository usage.
23
+ def get_repos_volume(self,
24
+ slug: str,
25
+ type: Optional[str] = None,
26
+ page: Optional[int] = None,
27
+ page_size: Optional[int] = None,
28
+ ) -> list[dto.RepoVolume]:
29
+ u = "/%s/-/charge/repos-volume" % (slug, )
30
+
31
+ query_params = {
32
+ "type": type,
33
+ "page": page,
34
+ "page_size": page_size,
35
+ }
36
+ data = self._client.request(
37
+ method="GET",
38
+ endpoint=u,
39
+ params=query_params,
40
+ )
41
+ return [dto.RepoVolume.safe_parse(item) for item in data]
42
+
43
+ # 查看特权额度。View privilege quotas.
44
+ def get_special_amount(self,
45
+ slug: str,
46
+ ) -> dto.SpecialAmount:
47
+ u = "/%s/-/charge/special-amount" % (slug, )
48
+
49
+ data = self._client.request(
50
+ method="GET",
51
+ endpoint=u,
52
+ )
53
+ return dto.SpecialAmount.safe_parse(data)
54
+
55
+ # 获取组织资源用量。Get organization resource usage.
56
+ def get_volume(self,
57
+ slug: str,
58
+ month: Optional[str] = None,
59
+ ) -> dto.VolumeUsedResp:
60
+ u = "/%s/-/charge/volume" % (slug, )
61
+
62
+ query_params = {
63
+ "month": month,
64
+ }
65
+ data = self._client.request(
66
+ method="GET",
67
+ endpoint=u,
68
+ params=query_params,
69
+ )
70
+ return dto.VolumeUsedResp.safe_parse(data)
71
+
72
+
@@ -6,7 +6,7 @@ class EventService:
6
6
  def __init__(self, client):
7
7
  self._client = client
8
8
 
9
- # 获取仓库动态预签名地址,并返回内容。Get events pre-signed URL and return content.
9
+ # 获取仓库动态内容。Get repository events content.
10
10
  def get_events(self,
11
11
  repo: str,
12
12
  date: str,
@@ -7,7 +7,7 @@ class FollowersService:
7
7
  def __init__(self, client):
8
8
  self._client = client
9
9
 
10
- # 获取指定用户的粉丝列表。Get the followers list of specified user.
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
- # 获取指定用户的关注人列表。Get the list of users that the specified user is following.
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
- # 创建一个 blob。Create a blob.
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
- # 创建新分支。Create a new branch based on a start point.
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
- # 创建一个 tag。Create a tag.
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
- # 删除指定分支。Delete the specified branch.
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
- # 删除指定 commit 的元数据。Delete commit annotation.
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
- # 删除指定 commit 的附件。Delete commit asset.
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
- # 删除指定 tag。Delete the specified tag.
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
- # 删除指定 tag 的元数据。Delete the metadata of the specified tag.
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
- # 打包下载 commit 变更文件。Download archive of changed files for a commit.
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
- # 打包下载两次 ref 之间的变更文件。Download archive of changed files for a compare.
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
- # 查询指定分支。Get a branch.
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
- # 查询指定 commit。Get a commit.
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
- # 查询指定 commit 的元数据。Get commit annotations.
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
- # 查询指定 commit 的元数据。Get commit annotations in batch.
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
- # 发起一个获取 commits 附件的请求, 302到有一定效期的下载地址。Get a request to fetch a commit assets and returns 302 redirect to the assets URL with specific valid time.
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
- # 查询指定 commit 的附件。List commit assets.
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
- # 查询指定 commit 的提交状态。List commit check statuses.
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
- # 比较两个提交、分支或标签之间差异的接口。Compare two commits, branches, or tags.
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
- # 查询仓库文件列表或文件。List repository files or file.
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
- # 查询仓库文件和目录内容。List repository files and directories.
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
- # 获取仓库默认分支。Get the default branch of the repository.
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
- # 获取 git lfs 文件下载链接
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
- # 查询指定 tag。Get a tag.
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
- # 查询指定 tag 的元数据。Query the metadata of the specified tag.
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
- # 查询 commit 列表。List commits.
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
- # 查询 tag 列表。List tags.
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
- # 确认 commit 附件上传完成。Confirm commit asset upload.
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
- # 新增一个 commit 附件。Create a commit asset.
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
- # 设定指定 commit 的元数据。Put commit annotations.
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
- # 设定指定 tag 的元数据。Set the metadata of the specified tag.
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
- # 删除仓库保护分支规则。 Delete branch protection rule.
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
- # 查询仓库保护分支规则。Get branch protection rule.
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
- # 查询仓库云原生构建设置。List pipeline settings.
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
- # 查询仓库合并请求设置。List pull request settings.
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
- # 查询仓库推送设置。List push limit settings.
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
- # 查询仓库保护分支规则列表。List branch protection rules.
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
- # 更新仓库保护分支规则。Update branch protection rule.
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
- # 新增仓库保护分支规则。Create branch protection rule.
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
- # 更新仓库云原生构建设置。Update pipeline settings.
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
- # 更新仓库合并请求设置。Set pull request settings.
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
- # 设置仓库推送设置。Set push limit settings.
141
+ # 设置推送限制。Set push limit.
142
142
  def put_push_limit_settings(self,
143
143
  repo: str,
144
144
  body_params: api.PushLimitSettings,