diff --git a/README.md b/README.md index 29d746923f5c2a97e9375df3b05794261ab07919..a5d0b8b3720d1fd121047d335a8f05eb71955697 100644 --- a/README.md +++ b/README.md @@ -295,6 +295,7 @@ Class | Method | HTTP request | Description - [ProjectMemberPermission](docs/ProjectMemberPermission.md) - [ProjectMemberPutParam](docs/ProjectMemberPutParam.md) - [PullRequest](docs/PullRequest.md) + - [PullRequestAssigneePostParam](docs/PullRequestAssigneePostParam.md) - [PullRequestCommentPostParam](docs/PullRequestCommentPostParam.md) - [PullRequestComments](docs/PullRequestComments.md) - [PullRequestCommits](docs/PullRequestCommits.md) diff --git a/api/swagger.yaml b/api/swagger.yaml index ba9e5dc33e633ab9a17303dccd626853a06ce211..bbe3f52376438a737fd608f376cd0a3634d76bb1 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -4266,13 +4266,6 @@ paths: produces: - "application/json" parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - name: "owner" in: "path" description: "仓库所属空间地址(企业、组织或个人的地址path)" @@ -4292,12 +4285,13 @@ paths: type: "integer" format: "int32" x-exportParamName: "Number" - - name: "assignees" - in: "formData" - description: "用户的个人空间地址, 以 , 分隔" + - in: "body" + name: "body" + description: "必选,标签的内容" required: true - type: "string" - x-exportParamName: "Assignees" + schema: + $ref: "#/definitions/PullRequestAssigneePostParam" + x-exportParamName: "Body" responses: 201: description: "返回格式" @@ -16141,6 +16135,23 @@ definitions: example: access_token: "access_token" permission: "push" + PullRequestAssigneePostParam: + type: "object" + properties: + access_token: + type: "string" + description: "用户授权码" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + assignees: + description: "用户的个人空间地址, 以 , 分隔" + required: true + type: "string" + x-exportParamName: "Assignees" + description: "assign pull request" + example: + access_token: "access_token" + assignees: "abc" PullRequestLabelPostParam: type: "object" properties: diff --git a/docs/PullRequestAssigneePostParam.md b/docs/PullRequestAssigneePostParam.md new file mode 100644 index 0000000000000000000000000000000000000000..ab298c922f2c0ea6b99681a43c0f23071a4e4951 --- /dev/null +++ b/docs/PullRequestAssigneePostParam.md @@ -0,0 +1,11 @@ +# PullRequestAssigneePostParam + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessToken** | **string** | 用户授权码 | [optional] [default to null] +**Assignees** | **string** | 用户的个人空间地址, 以 , 分隔 | [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/PullRequestsApi.md b/docs/PullRequestsApi.md index 398510f63ab1cf468ee5770c32e3ba9e582dad05..d7b8b35fd68f5848312f89b50b2fddecb039d185 100644 --- a/docs/PullRequestsApi.md +++ b/docs/PullRequestsApi.md @@ -80,10 +80,10 @@ No authorization required Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | - **repo** | **string**| 仓库路径(path) | - **number** | **int32**| 第几个PR,即本仓库PR的序数 | - **name** | **string**| 标签名称 | + **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | + **repo** | **string**| 仓库路径(path) | + **number** | **int32**| 第几个PR,即本仓库PR的序数 | + **name** | **string**| 标签名称 | **optional** | ***DeleteV5ReposOwnerRepoPullsLabelOpts** | optional parameters | nil if no parameters ### Optional Parameters @@ -508,9 +508,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) | - **number** | **int32**| 第几个PR,即本仓库PR的序数 | + **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | + **repo** | **string**| 仓库路径(path) | + **number** | **int32**| 第几个PR,即本仓库PR的序数 | **optional** | ***GetV5ReposOwnerRepoPullsNumberLabelsOpts** | optional parameters | nil if no parameters ### Optional Parameters @@ -728,7 +728,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **PostV5ReposOwnerRepoPullsNumberAssignees** -> PullRequest PostV5ReposOwnerRepoPullsNumberAssignees(ctx, owner, repo, number, assignees, optional) +> PullRequest PostV5ReposOwnerRepoPullsNumberAssignees(ctx, owner, repo, number, body) 指派用户审查 Pull Request 指派用户审查 Pull Request @@ -741,19 +741,7 @@ Name | Type | Description | Notes **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | **repo** | **string**| 仓库路径(path) | **number** | **int32**| 第几个PR,即本仓库PR的序数 | - **assignees** | **string**| 用户的个人空间地址, 以 , 分隔 | - **optional** | ***PostV5ReposOwnerRepoPullsNumberAssigneesOpts** | optional parameters | nil if no parameters - -### Optional Parameters -Optional parameters are passed through a pointer to a PostV5ReposOwnerRepoPullsNumberAssigneesOpts struct - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - - **accessToken** | **optional.String**| 用户授权码 | + **body** | [**PullRequestAssigneePostParam**](PullRequestAssigneePostParam.md)| 必选,标签的内容 | ### Return type @@ -812,10 +800,10 @@ No authorization required Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | - **repo** | **string**| 仓库路径(path) | - **number** | **int32**| 第几个PR,即本仓库PR的序数 | - **body** | [**PullRequestLabelPostParam**](PullRequestLabelPostParam.md)| 必选,标签的内容 | + **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | + **repo** | **string**| 仓库路径(path) | + **number** | **int32**| 第几个PR,即本仓库PR的序数 | + **body** | [**PullRequestLabelPostParam**](PullRequestLabelPostParam.md)| 必选,标签的内容 | ### Return type diff --git a/gitee/api_pull_requests.go b/gitee/api_pull_requests.go index b82260010b9f01afb98acb83c37675f727988959..01845a84328dd3ab5657f7a9e4db3dd78bbd4202 100644 --- a/gitee/api_pull_requests.go +++ b/gitee/api_pull_requests.go @@ -1807,18 +1807,11 @@ PullRequestsApiService 指派用户审查 Pull Request * @param owner 仓库所属空间地址(企业、组织或个人的地址path) * @param repo 仓库路径(path) * @param number 第几个PR,即本仓库PR的序数 - * @param assignees 用户的个人空间地址, 以 , 分隔 - * @param optional nil or *PostV5ReposOwnerRepoPullsNumberAssigneesOpts - Optional Parameters: - * @param "AccessToken" (optional.String) - 用户授权码 + * @param body 必选,标签的内容 @return PullRequest */ - -type PostV5ReposOwnerRepoPullsNumberAssigneesOpts struct { - AccessToken optional.String -} - -func (a *PullRequestsApiService) PostV5ReposOwnerRepoPullsNumberAssignees(ctx context.Context, owner string, repo string, number int32, assignees string, localVarOptionals *PostV5ReposOwnerRepoPullsNumberAssigneesOpts) (PullRequest, *http.Response, error) { +func (a *PullRequestsApiService) PostV5ReposOwnerRepoPullsNumberAssignees(ctx context.Context, owner string, repo string, number int32, body PullRequestAssigneePostParam) (PullRequest, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -1854,10 +1847,8 @@ func (a *PullRequestsApiService) PostV5ReposOwnerRepoPullsNumberAssignees(ctx co if localVarHttpHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - if localVarOptionals != nil && localVarOptionals.AccessToken.IsSet() { - localVarFormParams.Add("access_token", parameterToString(localVarOptionals.AccessToken.Value(), "")) - } - localVarFormParams.Add("assignees", parameterToString(assignees, "")) + // body params + localVarPostBody = &body r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err diff --git a/gitee/model_pull_request_assignee_post_param.go b/gitee/model_pull_request_assignee_post_param.go new file mode 100644 index 0000000000000000000000000000000000000000..95dddda1a3d5b3c5c2d5924bd44d554c3c6eaeb1 --- /dev/null +++ b/gitee/model_pull_request_assignee_post_param.go @@ -0,0 +1,18 @@ +/* + * 码云 Open API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 5.3.2 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package gitee + +// assign pull request +type PullRequestAssigneePostParam struct { + // 用户授权码 + AccessToken string `json:"access_token,omitempty"` + // 用户的个人空间地址, 以 , 分隔 + Assignees string `json:"assignees,omitempty"` +}