提交 b983a507 编写于 作者: Z zengchen1024

fix assign pull request

上级 b5c14af2
......@@ -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)
......
......@@ -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:
......
# 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)
......@@ -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
......
......@@ -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
......
/*
* 码云 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"`
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册