From ce4955d7d47f758c8b63b4cf14495d5fe68d67e9 Mon Sep 17 00:00:00 2001 From: zengchen1024 Date: Wed, 24 Mar 2021 11:24:59 +0800 Subject: [PATCH 1/2] fix doc --- README.md | 2 ++ docs/CompleteBranch.md | 2 +- docs/GitCommit.md | 14 ++++++++++++++ docs/GitUser.md | 12 ++++++++++++ docs/LabelPostParam.md | 4 +++- docs/PullRequestCommits.md | 8 ++++---- docs/PullRequestFiles.md | 2 +- docs/RepositoriesApi.md | 6 +++--- docs/RepositoryPostParam.md | 1 + 9 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 docs/GitCommit.md create mode 100644 docs/GitUser.md diff --git a/README.md b/README.md index b9fdef5..6e9107a 100644 --- a/README.md +++ b/README.md @@ -279,6 +279,8 @@ Class | Method | HTTP request | Description - [EnterpriseBasic](docs/EnterpriseBasic.md) - [EnterpriseMember](docs/EnterpriseMember.md) - [Event](docs/Event.md) + - [GitCommit](docs/GitCommit.md) + - [GitUser](docs/GitUser.md) - [Group](docs/Group.md) - [GroupDetail](docs/GroupDetail.md) - [GroupMember](docs/GroupMember.md) diff --git a/docs/CompleteBranch.md b/docs/CompleteBranch.md index 9d8e17c..e97faec 100644 --- a/docs/CompleteBranch.md +++ b/docs/CompleteBranch.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | | [optional] [default to null] -**Commit** | **string** | | [optional] [default to null] +**Commit** | [***BranchCommit**](BranchCommit.md) | | [optional] [default to null] **Links** | **string** | | [optional] [default to null] **Protected** | **string** | | [optional] [default to null] **ProtectionUrl** | **string** | | [optional] [default to null] diff --git a/docs/GitCommit.md b/docs/GitCommit.md new file mode 100644 index 0000000..c835dda --- /dev/null +++ b/docs/GitCommit.md @@ -0,0 +1,14 @@ +# GitCommit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | [optional] [default to null] +**Author** | [***GitUser**](GitUser.md) | | [optional] [default to null] +**Committer** | [***GitUser**](GitUser.md) | | [optional] [default to null] +**Message** | **string** | | [optional] [default to null] +**CommentCount** | **int32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GitUser.md b/docs/GitUser.md new file mode 100644 index 0000000..01eadd3 --- /dev/null +++ b/docs/GitUser.md @@ -0,0 +1,12 @@ +# GitUser + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] [default to null] +**Email** | **string** | | [optional] [default to null] +**Date** | [**time.Time**](time.Time.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LabelPostParam.md b/docs/LabelPostParam.md index 037284e..d1c95d8 100644 --- a/docs/LabelPostParam.md +++ b/docs/LabelPostParam.md @@ -7,4 +7,6 @@ Name | Type | Description | Notes **Name** | **string** | 标签的名称,必选。 | [optional] [default to null] **Color** | **string** | 标签的颜色,为6位的数字,如: 000000,必选。 | [optional] [default to null] -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) \ No newline at end of file +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PullRequestCommits.md b/docs/PullRequestCommits.md index 7730f77..d7b723b 100644 --- a/docs/PullRequestCommits.md +++ b/docs/PullRequestCommits.md @@ -7,10 +7,10 @@ Name | Type | Description | Notes **Sha** | **string** | | [optional] [default to null] **HtmlUrl** | **string** | | [optional] [default to null] **CommentsUrl** | **string** | | [optional] [default to null] -**Commit** | **string** | | [optional] [default to null] -**Author** | **string** | | [optional] [default to null] -**Committer** | **string** | | [optional] [default to null] -**Parents** | **string** | | [optional] [default to null] +**Commit** | [***GitCommit**](GitCommit.md) | | [optional] [default to null] +**Author** | [***UserBasic**](UserBasic.md) | | [optional] [default to null] +**Committer** | [***UserBasic**](UserBasic.md) | | [optional] [default to null] +**Parents** | [***CommitTree**](CommitTree.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PullRequestFiles.md b/docs/PullRequestFiles.md index 45628c6..dc8494e 100644 --- a/docs/PullRequestFiles.md +++ b/docs/PullRequestFiles.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **Deletions** | **string** | | [optional] [default to null] **BlobUrl** | **string** | | [optional] [default to null] **RawUrl** | **string** | | [optional] [default to null] -**Patch** | **string** | | [optional] [default to null] +**Patch** | [***PullRequestFilePath**](PullRequestFilePath.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepositoriesApi.md b/docs/RepositoriesApi.md index 65657a9..dbac098 100644 --- a/docs/RepositoriesApi.md +++ b/docs/RepositoriesApi.md @@ -2311,9 +2311,9 @@ No authorization required Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | - **repo** | **string**| 仓库路径(path) | - **body** | [**SetRepoReviewer**](SetRepoReviewer.md)| 修改代码审查的信息 | + **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | + **repo** | **string**| 仓库路径(path) | + **body** | [**SetRepoReviewer**](SetRepoReviewer.md)| 修改代码审查的信息 | ### Return type diff --git a/docs/RepositoryPostParam.md b/docs/RepositoryPostParam.md index ad85ca2..a3acb26 100644 --- a/docs/RepositoryPostParam.md +++ b/docs/RepositoryPostParam.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **Homepage** | **string** | 主页(eg: https://gitee.com) | [optional] [default to null] **HasIssues** | **bool** | 允许提Issue与否。默认: 允许(true) | [optional] [default to null] **HasWiki** | **bool** | 提供Wiki与否。默认: 提供(true) | [optional] [default to null] +**CanComment** | **bool** | 允许用户对仓库进行评论。默认: 允许(true) | [optional] [default to null] **Public** | **int32** | 仓库开源类型。0(私有), 1(外部开源), 2(内部开源),注:与private互斥,以public为主。 | [optional] [default to null] **Private** | **bool** | 仓库公开或私有。默认: 公开(false),注:与public互斥,以public为主。 | [optional] [default to null] **AutoInit** | **bool** | 值为true时则会用README初始化仓库。默认: 不初始化(false) | [optional] [default to null] -- Gitee From b92628ede0fe569c5a80c23cc9bb78bba427a8c2 Mon Sep 17 00:00:00 2001 From: zengchen1024 Date: Wed, 24 Mar 2021 11:46:59 +0800 Subject: [PATCH 2/2] fix api's parameter for update pr and get pr --- api/swagger.yaml | 18 ++++++++++++++++++ docs/PullRequest.md | 2 ++ docs/PullRequestUpdateParam.md | 2 ++ gitee/model_pull_request.go | 2 ++ gitee/model_pull_request_update_param.go | 6 ++++++ 5 files changed, 30 insertions(+) diff --git a/api/swagger.yaml b/api/swagger.yaml index 4b5ebff..d816b40 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -14438,6 +14438,12 @@ definitions: type: "string" statuses_url: type: "string" + assignees_number: + type: "integer" + format: "int32" + testers_number: + type: "integer" + format: "int32" number: type: "integer" format: "int32" @@ -15836,6 +15842,18 @@ definitions: description: "用逗号分开的标签,名称要求长度在 2-20 之间且非特殊字符。如: bug,performance" x-exportParamName: "Labels" x-optionalDataType: "String" + assignees_number: + type: "integer" + format: "int32" + description: "最少审查人数" + x-exportParamName: "AssigneesNumber" + x-optionalDataType: "Int32" + testers_number: + type: "integer" + format: "int32" + description: "最少测试人员" + x-exportParamName: "TestersNumber" + x-optionalDataType: "Int32" description: "update pull request information" example: access_token: "access_token" diff --git a/docs/PullRequest.md b/docs/PullRequest.md index 7e51888..3ebc107 100644 --- a/docs/PullRequest.md +++ b/docs/PullRequest.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **ReviewCommentUrl** | **string** | | [optional] [default to null] **CommentsUrl** | **string** | | [optional] [default to null] **StatusesUrl** | **string** | | [optional] [default to null] +**AssigneesNumber** | **int32** | | [optional] [default to null] +**TestersNumber** | **int32** | | [optional] [default to null] **Number** | **int32** | | [optional] [default to null] **State** | **string** | | [optional] [default to null] **Title** | **string** | | [optional] [default to null] diff --git a/docs/PullRequestUpdateParam.md b/docs/PullRequestUpdateParam.md index a3e58de..ecadffc 100644 --- a/docs/PullRequestUpdateParam.md +++ b/docs/PullRequestUpdateParam.md @@ -9,6 +9,8 @@ Name | Type | Description | Notes **State** | **string** | 可选。Pull Request 状态 | [optional] [default to null] **MilestoneNumber** | **int32** | 可选。里程碑序号(id) | [optional] [default to null] **Labels** | **string** | 用逗号分开的标签,名称要求长度在 2-20 之间且非特殊字符。如: bug,performance | [optional] [default to null] +**AssigneesNumber** | **int32** | 最少审查人数 | [optional] [default to null] +**TestersNumber** | **int32** | 最少测试人员 | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/gitee/model_pull_request.go b/gitee/model_pull_request.go index efb97e2..b832622 100644 --- a/gitee/model_pull_request.go +++ b/gitee/model_pull_request.go @@ -22,6 +22,8 @@ type PullRequest struct { ReviewCommentUrl string `json:"review_comment_url,omitempty"` CommentsUrl string `json:"comments_url,omitempty"` StatusesUrl string `json:"statuses_url,omitempty"` + AssigneesNumber int32 `json:"assignees_number,omitempty"` + TestersNumber int32 `json:"testers_number,omitempty"` Number int32 `json:"number,omitempty"` State string `json:"state,omitempty"` Title string `json:"title,omitempty"` diff --git a/gitee/model_pull_request_update_param.go b/gitee/model_pull_request_update_param.go index c6e06e3..6111827 100644 --- a/gitee/model_pull_request_update_param.go +++ b/gitee/model_pull_request_update_param.go @@ -23,4 +23,10 @@ type PullRequestUpdateParam struct { MilestoneNumber int32 `json:"milestone_number,omitempty"` // 用逗号分开的标签,名称要求长度在 2-20 之间且非特殊字符。如: bug,performance Labels string `json:"labels,omitempty"` + // 最少审查人数 + // change the int32 to *int32 manually, in order to pass 0 + AssigneesNumber *int32 `json:"assignees_number,omitempty"` + // 最少测试人员 + // change the int32 to *int32 manually, in order to pass 0 + TestersNumber *int32 `json:"testers_number,omitempty"` } -- Gitee