Documentation
¶
Index ¶
- type CheckIfMergedReq
- type CheckIfMergedResponse
- type Client
- func (c Client) CheckIfMerged(ctx context.Context, req *CheckIfMergedReq, opt ...requests.Option) (*CheckIfMergedResponse, error)
- func (c Client) Create(ctx context.Context, req *CreateReq, opt ...requests.Option) (*CreateResponse, error)
- func (c Client) CreateReplyForReviewComment(ctx context.Context, req *CreateReplyForReviewCommentReq, ...) (*CreateReplyForReviewCommentResponse, error)
- func (c Client) CreateReview(ctx context.Context, req *CreateReviewReq, opt ...requests.Option) (*CreateReviewResponse, error)
- func (c Client) CreateReviewComment(ctx context.Context, req *CreateReviewCommentReq, opt ...requests.Option) (*CreateReviewCommentResponse, error)
- func (c Client) DeletePendingReview(ctx context.Context, req *DeletePendingReviewReq, opt ...requests.Option) (*DeletePendingReviewResponse, error)
- func (c Client) DeleteReviewComment(ctx context.Context, req *DeleteReviewCommentReq, opt ...requests.Option) (*DeleteReviewCommentResponse, error)
- func (c Client) DismissReview(ctx context.Context, req *DismissReviewReq, opt ...requests.Option) (*DismissReviewResponse, error)
- func (c Client) Get(ctx context.Context, req *GetReq, opt ...requests.Option) (*GetResponse, error)
- func (c Client) GetReview(ctx context.Context, req *GetReviewReq, opt ...requests.Option) (*GetReviewResponse, error)
- func (c Client) GetReviewComment(ctx context.Context, req *GetReviewCommentReq, opt ...requests.Option) (*GetReviewCommentResponse, error)
- func (c Client) List(ctx context.Context, req *ListReq, opt ...requests.Option) (*ListResponse, error)
- func (c Client) ListCommentsForReview(ctx context.Context, req *ListCommentsForReviewReq, opt ...requests.Option) (*ListCommentsForReviewResponse, error)
- func (c Client) ListCommits(ctx context.Context, req *ListCommitsReq, opt ...requests.Option) (*ListCommitsResponse, error)
- func (c Client) ListFiles(ctx context.Context, req *ListFilesReq, opt ...requests.Option) (*ListFilesResponse, error)
- func (c Client) ListRequestedReviewers(ctx context.Context, req *ListRequestedReviewersReq, opt ...requests.Option) (*ListRequestedReviewersResponse, error)
- func (c Client) ListReviewComments(ctx context.Context, req *ListReviewCommentsReq, opt ...requests.Option) (*ListReviewCommentsResponse, error)
- func (c Client) ListReviewCommentsForRepo(ctx context.Context, req *ListReviewCommentsForRepoReq, opt ...requests.Option) (*ListReviewCommentsForRepoResponse, error)
- func (c Client) ListReviews(ctx context.Context, req *ListReviewsReq, opt ...requests.Option) (*ListReviewsResponse, error)
- func (c Client) Merge(ctx context.Context, req *MergeReq, opt ...requests.Option) (*MergeResponse, error)
- func (c Client) RemoveRequestedReviewers(ctx context.Context, req *RemoveRequestedReviewersReq, opt ...requests.Option) (*RemoveRequestedReviewersResponse, error)
- func (c Client) RequestReviewers(ctx context.Context, req *RequestReviewersReq, opt ...requests.Option) (*RequestReviewersResponse, error)
- func (c Client) SubmitReview(ctx context.Context, req *SubmitReviewReq, opt ...requests.Option) (*SubmitReviewResponse, error)
- func (c Client) Update(ctx context.Context, req *UpdateReq, opt ...requests.Option) (*UpdateResponse, error)
- func (c Client) UpdateBranch(ctx context.Context, req *UpdateBranchReq, opt ...requests.Option) (*UpdateBranchResponse, error)
- func (c Client) UpdateReview(ctx context.Context, req *UpdateReviewReq, opt ...requests.Option) (*UpdateReviewResponse, error)
- func (c Client) UpdateReviewComment(ctx context.Context, req *UpdateReviewCommentReq, opt ...requests.Option) (*UpdateReviewCommentResponse, error)
- type CreateReplyForReviewCommentReq
- type CreateReplyForReviewCommentReqBody
- type CreateReplyForReviewCommentResponse
- type CreateReq
- type CreateReqBody
- type CreateResponse
- type CreateReviewCommentReq
- type CreateReviewCommentReqBody
- type CreateReviewCommentResponse
- type CreateReviewReq
- type CreateReviewReqBody
- type CreateReviewReqBodyComments
- type CreateReviewResponse
- type DeletePendingReviewReq
- type DeletePendingReviewResponse
- type DeleteReviewCommentReq
- type DeleteReviewCommentResponse
- type DismissReviewReq
- type DismissReviewReqBody
- type DismissReviewResponse
- type GetReq
- type GetResponse
- type GetReviewCommentReq
- type GetReviewCommentResponse
- type GetReviewReq
- type GetReviewResponse
- type ListCommentsForReviewReq
- type ListCommentsForReviewResponse
- type ListCommitsReq
- type ListCommitsResponse
- type ListFilesReq
- type ListFilesResponse
- type ListReq
- type ListRequestedReviewersReq
- type ListRequestedReviewersResponse
- type ListResponse
- type ListReviewCommentsForRepoReq
- type ListReviewCommentsForRepoResponse
- type ListReviewCommentsReq
- type ListReviewCommentsResponse
- type ListReviewsReq
- type ListReviewsResponse
- type MergeReq
- type MergeReqBody
- type MergeResponse
- type RemoveRequestedReviewersReq
- type RemoveRequestedReviewersReqBody
- type RemoveRequestedReviewersResponse
- type RequestReviewersReq
- type RequestReviewersReqBody
- type RequestReviewersResponse
- type SubmitReviewReq
- type SubmitReviewReqBody
- type SubmitReviewResponse
- type UpdateBranchReq
- type UpdateBranchReqBody
- type UpdateBranchResponse
- type UpdateBranchResponseBody
- type UpdateReq
- type UpdateReqBody
- type UpdateResponse
- type UpdateReviewCommentReq
- type UpdateReviewCommentReqBody
- type UpdateReviewCommentResponse
- type UpdateReviewReq
- type UpdateReviewReqBody
- type UpdateReviewResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckIfMergedReq ¶
type CheckIfMergedReq struct { Owner string Repo string PullNumber int64 // contains filtered or unexported fields }
CheckIfMergedReq is request data for Client.CheckIfMerged
https://developer.github.com/v3/pulls/#check-if-a-pull-request-has-been-merged
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*CheckIfMergedReq) HTTPRequest ¶
func (r *CheckIfMergedReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*CheckIfMergedReq) Rel ¶
func (r *CheckIfMergedReq) Rel(link string, resp *CheckIfMergedResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type CheckIfMergedResponse ¶
type CheckIfMergedResponse struct { Data bool // contains filtered or unexported fields }
CheckIfMergedResponse is a response for CheckIfMerged
https://developer.github.com/v3/pulls/#check-if-a-pull-request-has-been-merged
func CheckIfMerged ¶
func CheckIfMerged(ctx context.Context, req *CheckIfMergedReq, opt ...requests.Option) (*CheckIfMergedResponse, error)
CheckIfMerged performs requests for "pulls/check-if-merged"
Check if a pull request has been merged.
GET /repos/{owner}/{repo}/pulls/{pull_number}/merge
https://developer.github.com/v3/pulls/#check-if-a-pull-request-has-been-merged
func (*CheckIfMergedResponse) HTTPResponse ¶
func (r *CheckIfMergedResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*CheckIfMergedResponse) ReadResponse ¶
func (r *CheckIfMergedResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type Client ¶
Client is a set of options to apply to requests
func (Client) CheckIfMerged ¶
func (c Client) CheckIfMerged(ctx context.Context, req *CheckIfMergedReq, opt ...requests.Option) (*CheckIfMergedResponse, error)
CheckIfMerged performs requests for "pulls/check-if-merged"
Check if a pull request has been merged.
GET /repos/{owner}/{repo}/pulls/{pull_number}/merge
https://developer.github.com/v3/pulls/#check-if-a-pull-request-has-been-merged
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) Create ¶
func (c Client) Create(ctx context.Context, req *CreateReq, opt ...requests.Option) (*CreateResponse, error)
Create performs requests for "pulls/create"
Create a pull request.
POST /repos/{owner}/{repo}/pulls
https://developer.github.com/v3/pulls/#create-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) CreateReplyForReviewComment ¶
func (c Client) CreateReplyForReviewComment(ctx context.Context, req *CreateReplyForReviewCommentReq, opt ...requests.Option) (*CreateReplyForReviewCommentResponse, error)
CreateReplyForReviewComment performs requests for "pulls/create-reply-for-review-comment"
Create a reply for a review comment.
POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies
https://developer.github.com/v3/pulls/comments/#create-a-reply-for-a-review-comment
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) CreateReview ¶
func (c Client) CreateReview(ctx context.Context, req *CreateReviewReq, opt ...requests.Option) (*CreateReviewResponse, error)
CreateReview performs requests for "pulls/create-review"
Create a review for a pull request.
POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews
https://developer.github.com/v3/pulls/reviews/#create-a-review-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) CreateReviewComment ¶
func (c Client) CreateReviewComment(ctx context.Context, req *CreateReviewCommentReq, opt ...requests.Option) (*CreateReviewCommentResponse, error)
CreateReviewComment performs requests for "pulls/create-review-comment"
Create a review comment for a pull request.
POST /repos/{owner}/{repo}/pulls/{pull_number}/comments
https://developer.github.com/v3/pulls/comments/#create-a-review-comment-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) DeletePendingReview ¶
func (c Client) DeletePendingReview(ctx context.Context, req *DeletePendingReviewReq, opt ...requests.Option) (*DeletePendingReviewResponse, error)
DeletePendingReview performs requests for "pulls/delete-pending-review"
Delete a pending review for a pull request.
DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}
https://developer.github.com/v3/pulls/reviews/#delete-a-pending-review-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) DeleteReviewComment ¶
func (c Client) DeleteReviewComment(ctx context.Context, req *DeleteReviewCommentReq, opt ...requests.Option) (*DeleteReviewCommentResponse, error)
DeleteReviewComment performs requests for "pulls/delete-review-comment"
Delete a review comment for a pull request.
DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}
https://developer.github.com/v3/pulls/comments/#delete-a-review-comment-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) DismissReview ¶
func (c Client) DismissReview(ctx context.Context, req *DismissReviewReq, opt ...requests.Option) (*DismissReviewResponse, error)
DismissReview performs requests for "pulls/dismiss-review"
Dismiss a review for a pull request.
PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals
https://developer.github.com/v3/pulls/reviews/#dismiss-a-review-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) Get ¶
Get performs requests for "pulls/get"
Get a pull request.
GET /repos/{owner}/{repo}/pulls/{pull_number}
https://developer.github.com/v3/pulls/#get-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) GetReview ¶
func (c Client) GetReview(ctx context.Context, req *GetReviewReq, opt ...requests.Option) (*GetReviewResponse, error)
GetReview performs requests for "pulls/get-review"
Get a review for a pull request.
GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}
https://developer.github.com/v3/pulls/reviews/#get-a-review-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) GetReviewComment ¶
func (c Client) GetReviewComment(ctx context.Context, req *GetReviewCommentReq, opt ...requests.Option) (*GetReviewCommentResponse, error)
GetReviewComment performs requests for "pulls/get-review-comment"
Get a review comment for a pull request.
GET /repos/{owner}/{repo}/pulls/comments/{comment_id}
https://developer.github.com/v3/pulls/comments/#get-a-review-comment-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) List ¶
func (c Client) List(ctx context.Context, req *ListReq, opt ...requests.Option) (*ListResponse, error)
List performs requests for "pulls/list"
List pull requests.
GET /repos/{owner}/{repo}/pulls
https://developer.github.com/v3/pulls/#list-pull-requests
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) ListCommentsForReview ¶
func (c Client) ListCommentsForReview(ctx context.Context, req *ListCommentsForReviewReq, opt ...requests.Option) (*ListCommentsForReviewResponse, error)
ListCommentsForReview performs requests for "pulls/list-comments-for-review"
List comments for a pull request review.
GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments
https://developer.github.com/v3/pulls/reviews/#list-comments-for-a-pull-request-review
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) ListCommits ¶
func (c Client) ListCommits(ctx context.Context, req *ListCommitsReq, opt ...requests.Option) (*ListCommitsResponse, error)
ListCommits performs requests for "pulls/list-commits"
List commits on a pull request.
GET /repos/{owner}/{repo}/pulls/{pull_number}/commits
https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) ListFiles ¶
func (c Client) ListFiles(ctx context.Context, req *ListFilesReq, opt ...requests.Option) (*ListFilesResponse, error)
ListFiles performs requests for "pulls/list-files"
List pull requests files.
GET /repos/{owner}/{repo}/pulls/{pull_number}/files
https://developer.github.com/v3/pulls/#list-pull-requests-files
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) ListRequestedReviewers ¶
func (c Client) ListRequestedReviewers(ctx context.Context, req *ListRequestedReviewersReq, opt ...requests.Option) (*ListRequestedReviewersResponse, error)
ListRequestedReviewers performs requests for "pulls/list-requested-reviewers"
List requested reviewers for a pull request.
GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
https://developer.github.com/v3/pulls/review_requests/#list-requested-reviewers-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) ListReviewComments ¶
func (c Client) ListReviewComments(ctx context.Context, req *ListReviewCommentsReq, opt ...requests.Option) (*ListReviewCommentsResponse, error)
ListReviewComments performs requests for "pulls/list-review-comments"
List review comments on a pull request.
GET /repos/{owner}/{repo}/pulls/{pull_number}/comments
https://developer.github.com/v3/pulls/comments/#list-review-comments-on-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) ListReviewCommentsForRepo ¶
func (c Client) ListReviewCommentsForRepo(ctx context.Context, req *ListReviewCommentsForRepoReq, opt ...requests.Option) (*ListReviewCommentsForRepoResponse, error)
ListReviewCommentsForRepo performs requests for "pulls/list-review-comments-for-repo"
List review comments in a repository.
GET /repos/{owner}/{repo}/pulls/comments
https://developer.github.com/v3/pulls/comments/#list-review-comments-in-a-repository
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) ListReviews ¶
func (c Client) ListReviews(ctx context.Context, req *ListReviewsReq, opt ...requests.Option) (*ListReviewsResponse, error)
ListReviews performs requests for "pulls/list-reviews"
List reviews for a pull request.
GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews
https://developer.github.com/v3/pulls/reviews/#list-reviews-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) Merge ¶
func (c Client) Merge(ctx context.Context, req *MergeReq, opt ...requests.Option) (*MergeResponse, error)
Merge performs requests for "pulls/merge"
Merge a pull request.
PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge
https://developer.github.com/v3/pulls/#merge-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) RemoveRequestedReviewers ¶
func (c Client) RemoveRequestedReviewers(ctx context.Context, req *RemoveRequestedReviewersReq, opt ...requests.Option) (*RemoveRequestedReviewersResponse, error)
RemoveRequestedReviewers performs requests for "pulls/remove-requested-reviewers"
Remove requested reviewers from a pull request.
DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) RequestReviewers ¶
func (c Client) RequestReviewers(ctx context.Context, req *RequestReviewersReq, opt ...requests.Option) (*RequestReviewersResponse, error)
RequestReviewers performs requests for "pulls/request-reviewers"
Request reviewers for a pull request.
POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
https://developer.github.com/v3/pulls/review_requests/#request-reviewers-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) SubmitReview ¶
func (c Client) SubmitReview(ctx context.Context, req *SubmitReviewReq, opt ...requests.Option) (*SubmitReviewResponse, error)
SubmitReview performs requests for "pulls/submit-review"
Submit a review for a pull request.
POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events
https://developer.github.com/v3/pulls/reviews/#submit-a-review-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) Update ¶
func (c Client) Update(ctx context.Context, req *UpdateReq, opt ...requests.Option) (*UpdateResponse, error)
Update performs requests for "pulls/update"
Update a pull request.
PATCH /repos/{owner}/{repo}/pulls/{pull_number}
https://developer.github.com/v3/pulls/#update-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) UpdateBranch ¶
func (c Client) UpdateBranch(ctx context.Context, req *UpdateBranchReq, opt ...requests.Option) (*UpdateBranchResponse, error)
UpdateBranch performs requests for "pulls/update-branch"
Update a pull request branch.
PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch
https://developer.github.com/v3/pulls/#update-a-pull-request-branch
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) UpdateReview ¶
func (c Client) UpdateReview(ctx context.Context, req *UpdateReviewReq, opt ...requests.Option) (*UpdateReviewResponse, error)
UpdateReview performs requests for "pulls/update-review"
Update a review for a pull request.
PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}
https://developer.github.com/v3/pulls/reviews/#update-a-review-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) UpdateReviewComment ¶
func (c Client) UpdateReviewComment(ctx context.Context, req *UpdateReviewCommentReq, opt ...requests.Option) (*UpdateReviewCommentResponse, error)
UpdateReviewComment performs requests for "pulls/update-review-comment"
Update a review comment for a pull request.
PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}
https://developer.github.com/v3/pulls/comments/#update-a-review-comment-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
type CreateReplyForReviewCommentReq ¶
type CreateReplyForReviewCommentReq struct { Owner string Repo string PullNumber int64 // comment_id parameter CommentId int64 RequestBody CreateReplyForReviewCommentReqBody // contains filtered or unexported fields }
CreateReplyForReviewCommentReq is request data for Client.CreateReplyForReviewComment
https://developer.github.com/v3/pulls/comments/#create-a-reply-for-a-review-comment
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*CreateReplyForReviewCommentReq) HTTPRequest ¶
func (r *CreateReplyForReviewCommentReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*CreateReplyForReviewCommentReq) Rel ¶
func (r *CreateReplyForReviewCommentReq) Rel(link string, resp *CreateReplyForReviewCommentResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type CreateReplyForReviewCommentReqBody ¶
type CreateReplyForReviewCommentReqBody struct { // The text of the review comment. Body *string `json:"body"` }
CreateReplyForReviewCommentReqBody is a request body for pulls/create-reply-for-review-comment
https://developer.github.com/v3/pulls/comments/#create-a-reply-for-a-review-comment
type CreateReplyForReviewCommentResponse ¶
type CreateReplyForReviewCommentResponse struct { Data components.PullRequestReviewComment // contains filtered or unexported fields }
CreateReplyForReviewCommentResponse is a response for CreateReplyForReviewComment
https://developer.github.com/v3/pulls/comments/#create-a-reply-for-a-review-comment
func CreateReplyForReviewComment ¶
func CreateReplyForReviewComment(ctx context.Context, req *CreateReplyForReviewCommentReq, opt ...requests.Option) (*CreateReplyForReviewCommentResponse, error)
CreateReplyForReviewComment performs requests for "pulls/create-reply-for-review-comment"
Create a reply for a review comment.
POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies
https://developer.github.com/v3/pulls/comments/#create-a-reply-for-a-review-comment
func (*CreateReplyForReviewCommentResponse) HTTPResponse ¶
func (r *CreateReplyForReviewCommentResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*CreateReplyForReviewCommentResponse) ReadResponse ¶
func (r *CreateReplyForReviewCommentResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type CreateReq ¶
type CreateReq struct { Owner string Repo string RequestBody CreateReqBody /* You can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in `locked` events. This feature is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-01-10-lock-reason-api-preview) for full details. To access this feature, you must set this to true. */ SailorVPreview bool // contains filtered or unexported fields }
CreateReq is request data for Client.Create
https://developer.github.com/v3/pulls/#create-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*CreateReq) HTTPRequest ¶
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
type CreateReqBody ¶
type CreateReqBody struct { /* The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ Base *string `json:"base"` // The contents of the pull request. Body *string `json:"body,omitempty"` /* Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ Draft *bool `json:"draft,omitempty"` /* The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ Head *string `json:"head"` Issue *int64 `json:"issue,omitempty"` /* Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ MaintainerCanModify *bool `json:"maintainer_can_modify,omitempty"` // The title of the new pull request. Title *string `json:"title,omitempty"` }
CreateReqBody is a request body for pulls/create
https://developer.github.com/v3/pulls/#create-a-pull-request
type CreateResponse ¶
type CreateResponse struct { Data components.PullRequest // contains filtered or unexported fields }
CreateResponse is a response for Create
https://developer.github.com/v3/pulls/#create-a-pull-request
func Create ¶
Create performs requests for "pulls/create"
Create a pull request.
POST /repos/{owner}/{repo}/pulls
https://developer.github.com/v3/pulls/#create-a-pull-request
func (*CreateResponse) HTTPResponse ¶
func (r *CreateResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*CreateResponse) ReadResponse ¶
func (r *CreateResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type CreateReviewCommentReq ¶
type CreateReviewCommentReq struct { Owner string Repo string PullNumber int64 RequestBody CreateReviewCommentReqBody /* Multi-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must set this to true. */ ComfortFadePreview bool // contains filtered or unexported fields }
CreateReviewCommentReq is request data for Client.CreateReviewComment
https://developer.github.com/v3/pulls/comments/#create-a-review-comment-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*CreateReviewCommentReq) HTTPRequest ¶
func (r *CreateReviewCommentReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*CreateReviewCommentReq) Rel ¶
func (r *CreateReviewCommentReq) Rel(link string, resp *CreateReviewCommentResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type CreateReviewCommentReqBody ¶
type CreateReviewCommentReqBody struct { // The text of the review comment. Body *string `json:"body"` /* The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ CommitId *string `json:"commit_id,omitempty"` InReplyTo *int64 `json:"in_reply_to,omitempty"` /* **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ Line *int64 `json:"line,omitempty"` // The relative path to the file that necessitates a comment. Path *string `json:"path"` /* **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. */ Position *int64 `json:"position,omitempty"` /* **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. */ Side *string `json:"side,omitempty"` /* **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ StartLine *int64 `json:"start_line,omitempty"` /* **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. */ StartSide *string `json:"start_side,omitempty"` }
CreateReviewCommentReqBody is a request body for pulls/create-review-comment
https://developer.github.com/v3/pulls/comments/#create-a-review-comment-for-a-pull-request
type CreateReviewCommentResponse ¶
type CreateReviewCommentResponse struct { Data components.PullRequestReviewComment // contains filtered or unexported fields }
CreateReviewCommentResponse is a response for CreateReviewComment
https://developer.github.com/v3/pulls/comments/#create-a-review-comment-for-a-pull-request
func CreateReviewComment ¶
func CreateReviewComment(ctx context.Context, req *CreateReviewCommentReq, opt ...requests.Option) (*CreateReviewCommentResponse, error)
CreateReviewComment performs requests for "pulls/create-review-comment"
Create a review comment for a pull request.
POST /repos/{owner}/{repo}/pulls/{pull_number}/comments
https://developer.github.com/v3/pulls/comments/#create-a-review-comment-for-a-pull-request
func (*CreateReviewCommentResponse) HTTPResponse ¶
func (r *CreateReviewCommentResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*CreateReviewCommentResponse) ReadResponse ¶
func (r *CreateReviewCommentResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type CreateReviewReq ¶
type CreateReviewReq struct { Owner string Repo string PullNumber int64 RequestBody CreateReviewReqBody // contains filtered or unexported fields }
CreateReviewReq is request data for Client.CreateReview
https://developer.github.com/v3/pulls/reviews/#create-a-review-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*CreateReviewReq) HTTPRequest ¶
func (r *CreateReviewReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*CreateReviewReq) Rel ¶
func (r *CreateReviewReq) Rel(link string, resp *CreateReviewResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type CreateReviewReqBody ¶
type CreateReviewReqBody struct { /* **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ Body *string `json:"body,omitempty"` // Use the following table to specify the location, destination, and contents of the draft review comment. Comments []CreateReviewReqBodyComments `json:"comments,omitempty"` /* The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. */ CommitId *string `json:"commit_id,omitempty"` /* The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://developer.github.com/v3/pulls/reviews/#submit-a-review-for-a-pull-request) when you are ready. */ Event *string `json:"event,omitempty"` }
CreateReviewReqBody is a request body for pulls/create-review
https://developer.github.com/v3/pulls/reviews/#create-a-review-for-a-pull-request
type CreateReviewReqBodyComments ¶
type CreateReviewReqBodyComments struct { // Text of the review comment. Body *string `json:"body"` Line *int64 `json:"line,omitempty"` // The relative path to the file that necessitates a review comment. Path *string `json:"path"` /* The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. */ Position *int64 `json:"position,omitempty"` Side *string `json:"side,omitempty"` StartLine *int64 `json:"start_line,omitempty"` StartSide *string `json:"start_side,omitempty"` }
CreateReviewReqBodyComments is a value for CreateReviewReqBody's Comments field
type CreateReviewResponse ¶
type CreateReviewResponse struct { Data components.PullRequestReview // contains filtered or unexported fields }
CreateReviewResponse is a response for CreateReview
https://developer.github.com/v3/pulls/reviews/#create-a-review-for-a-pull-request
func CreateReview ¶
func CreateReview(ctx context.Context, req *CreateReviewReq, opt ...requests.Option) (*CreateReviewResponse, error)
CreateReview performs requests for "pulls/create-review"
Create a review for a pull request.
POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews
https://developer.github.com/v3/pulls/reviews/#create-a-review-for-a-pull-request
func (*CreateReviewResponse) HTTPResponse ¶
func (r *CreateReviewResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*CreateReviewResponse) ReadResponse ¶
func (r *CreateReviewResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type DeletePendingReviewReq ¶
type DeletePendingReviewReq struct { Owner string Repo string PullNumber int64 // review_id parameter ReviewId int64 // contains filtered or unexported fields }
DeletePendingReviewReq is request data for Client.DeletePendingReview
https://developer.github.com/v3/pulls/reviews/#delete-a-pending-review-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*DeletePendingReviewReq) HTTPRequest ¶
func (r *DeletePendingReviewReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*DeletePendingReviewReq) Rel ¶
func (r *DeletePendingReviewReq) Rel(link string, resp *DeletePendingReviewResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type DeletePendingReviewResponse ¶
type DeletePendingReviewResponse struct { Data components.PullRequestReview // contains filtered or unexported fields }
DeletePendingReviewResponse is a response for DeletePendingReview
https://developer.github.com/v3/pulls/reviews/#delete-a-pending-review-for-a-pull-request
func DeletePendingReview ¶
func DeletePendingReview(ctx context.Context, req *DeletePendingReviewReq, opt ...requests.Option) (*DeletePendingReviewResponse, error)
DeletePendingReview performs requests for "pulls/delete-pending-review"
Delete a pending review for a pull request.
DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}
https://developer.github.com/v3/pulls/reviews/#delete-a-pending-review-for-a-pull-request
func (*DeletePendingReviewResponse) HTTPResponse ¶
func (r *DeletePendingReviewResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*DeletePendingReviewResponse) ReadResponse ¶
func (r *DeletePendingReviewResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type DeleteReviewCommentReq ¶
type DeleteReviewCommentReq struct { Owner string Repo string // comment_id parameter CommentId int64 // contains filtered or unexported fields }
DeleteReviewCommentReq is request data for Client.DeleteReviewComment
https://developer.github.com/v3/pulls/comments/#delete-a-review-comment-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*DeleteReviewCommentReq) HTTPRequest ¶
func (r *DeleteReviewCommentReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*DeleteReviewCommentReq) Rel ¶
func (r *DeleteReviewCommentReq) Rel(link string, resp *DeleteReviewCommentResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type DeleteReviewCommentResponse ¶
type DeleteReviewCommentResponse struct { Data bool // contains filtered or unexported fields }
DeleteReviewCommentResponse is a response for DeleteReviewComment
https://developer.github.com/v3/pulls/comments/#delete-a-review-comment-for-a-pull-request
func DeleteReviewComment ¶
func DeleteReviewComment(ctx context.Context, req *DeleteReviewCommentReq, opt ...requests.Option) (*DeleteReviewCommentResponse, error)
DeleteReviewComment performs requests for "pulls/delete-review-comment"
Delete a review comment for a pull request.
DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}
https://developer.github.com/v3/pulls/comments/#delete-a-review-comment-for-a-pull-request
func (*DeleteReviewCommentResponse) HTTPResponse ¶
func (r *DeleteReviewCommentResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*DeleteReviewCommentResponse) ReadResponse ¶
func (r *DeleteReviewCommentResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type DismissReviewReq ¶
type DismissReviewReq struct { Owner string Repo string PullNumber int64 // review_id parameter ReviewId int64 RequestBody DismissReviewReqBody // contains filtered or unexported fields }
DismissReviewReq is request data for Client.DismissReview
https://developer.github.com/v3/pulls/reviews/#dismiss-a-review-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*DismissReviewReq) HTTPRequest ¶
func (r *DismissReviewReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*DismissReviewReq) Rel ¶
func (r *DismissReviewReq) Rel(link string, resp *DismissReviewResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type DismissReviewReqBody ¶
type DismissReviewReqBody struct { Event *string `json:"event,omitempty"` // The message for the pull request review dismissal Message *string `json:"message"` }
DismissReviewReqBody is a request body for pulls/dismiss-review
https://developer.github.com/v3/pulls/reviews/#dismiss-a-review-for-a-pull-request
type DismissReviewResponse ¶
type DismissReviewResponse struct { Data components.PullRequestReview // contains filtered or unexported fields }
DismissReviewResponse is a response for DismissReview
https://developer.github.com/v3/pulls/reviews/#dismiss-a-review-for-a-pull-request
func DismissReview ¶
func DismissReview(ctx context.Context, req *DismissReviewReq, opt ...requests.Option) (*DismissReviewResponse, error)
DismissReview performs requests for "pulls/dismiss-review"
Dismiss a review for a pull request.
PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals
https://developer.github.com/v3/pulls/reviews/#dismiss-a-review-for-a-pull-request
func (*DismissReviewResponse) HTTPResponse ¶
func (r *DismissReviewResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*DismissReviewResponse) ReadResponse ¶
func (r *DismissReviewResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type GetReq ¶
type GetReq struct { Owner string Repo string PullNumber int64 /* You can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in `locked` events. This feature is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-01-10-lock-reason-api-preview) for full details. To access this feature, you must set this to true. */ SailorVPreview bool // contains filtered or unexported fields }
GetReq is request data for Client.Get
https://developer.github.com/v3/pulls/#get-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*GetReq) HTTPRequest ¶
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
type GetResponse ¶
type GetResponse struct { Data components.PullRequest // contains filtered or unexported fields }
GetResponse is a response for Get
https://developer.github.com/v3/pulls/#get-a-pull-request
func Get ¶
Get performs requests for "pulls/get"
Get a pull request.
GET /repos/{owner}/{repo}/pulls/{pull_number}
func (*GetResponse) HTTPResponse ¶
func (r *GetResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*GetResponse) ReadResponse ¶
func (r *GetResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type GetReviewCommentReq ¶
type GetReviewCommentReq struct { Owner string Repo string // comment_id parameter CommentId int64 /* Multi-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must set this to true. */ ComfortFadePreview bool /* An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API you must set this to true. */ SquirrelGirlPreview bool // contains filtered or unexported fields }
GetReviewCommentReq is request data for Client.GetReviewComment
https://developer.github.com/v3/pulls/comments/#get-a-review-comment-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*GetReviewCommentReq) HTTPRequest ¶
func (r *GetReviewCommentReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*GetReviewCommentReq) Rel ¶
func (r *GetReviewCommentReq) Rel(link string, resp *GetReviewCommentResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type GetReviewCommentResponse ¶
type GetReviewCommentResponse struct { Data components.PullRequestReviewComment // contains filtered or unexported fields }
GetReviewCommentResponse is a response for GetReviewComment
https://developer.github.com/v3/pulls/comments/#get-a-review-comment-for-a-pull-request
func GetReviewComment ¶
func GetReviewComment(ctx context.Context, req *GetReviewCommentReq, opt ...requests.Option) (*GetReviewCommentResponse, error)
GetReviewComment performs requests for "pulls/get-review-comment"
Get a review comment for a pull request.
GET /repos/{owner}/{repo}/pulls/comments/{comment_id}
https://developer.github.com/v3/pulls/comments/#get-a-review-comment-for-a-pull-request
func (*GetReviewCommentResponse) HTTPResponse ¶
func (r *GetReviewCommentResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*GetReviewCommentResponse) ReadResponse ¶
func (r *GetReviewCommentResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type GetReviewReq ¶
type GetReviewReq struct { Owner string Repo string PullNumber int64 // review_id parameter ReviewId int64 // contains filtered or unexported fields }
GetReviewReq is request data for Client.GetReview
https://developer.github.com/v3/pulls/reviews/#get-a-review-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*GetReviewReq) HTTPRequest ¶
func (r *GetReviewReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*GetReviewReq) Rel ¶
func (r *GetReviewReq) Rel(link string, resp *GetReviewResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type GetReviewResponse ¶
type GetReviewResponse struct { Data components.PullRequestReview // contains filtered or unexported fields }
GetReviewResponse is a response for GetReview
https://developer.github.com/v3/pulls/reviews/#get-a-review-for-a-pull-request
func GetReview ¶
func GetReview(ctx context.Context, req *GetReviewReq, opt ...requests.Option) (*GetReviewResponse, error)
GetReview performs requests for "pulls/get-review"
Get a review for a pull request.
GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}
https://developer.github.com/v3/pulls/reviews/#get-a-review-for-a-pull-request
func (*GetReviewResponse) HTTPResponse ¶
func (r *GetReviewResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*GetReviewResponse) ReadResponse ¶
func (r *GetReviewResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type ListCommentsForReviewReq ¶
type ListCommentsForReviewReq struct { Owner string Repo string PullNumber int64 // review_id parameter ReviewId int64 // Results per page (max 100) PerPage *int64 // Page number of the results to fetch. Page *int64 // contains filtered or unexported fields }
ListCommentsForReviewReq is request data for Client.ListCommentsForReview
https://developer.github.com/v3/pulls/reviews/#list-comments-for-a-pull-request-review
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*ListCommentsForReviewReq) HTTPRequest ¶
func (r *ListCommentsForReviewReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*ListCommentsForReviewReq) Rel ¶
func (r *ListCommentsForReviewReq) Rel(link string, resp *ListCommentsForReviewResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type ListCommentsForReviewResponse ¶
type ListCommentsForReviewResponse struct { Data []components.ReviewComment // contains filtered or unexported fields }
ListCommentsForReviewResponse is a response for ListCommentsForReview
https://developer.github.com/v3/pulls/reviews/#list-comments-for-a-pull-request-review
func ListCommentsForReview ¶
func ListCommentsForReview(ctx context.Context, req *ListCommentsForReviewReq, opt ...requests.Option) (*ListCommentsForReviewResponse, error)
ListCommentsForReview performs requests for "pulls/list-comments-for-review"
List comments for a pull request review.
GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments
https://developer.github.com/v3/pulls/reviews/#list-comments-for-a-pull-request-review
func (*ListCommentsForReviewResponse) HTTPResponse ¶
func (r *ListCommentsForReviewResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*ListCommentsForReviewResponse) ReadResponse ¶
func (r *ListCommentsForReviewResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type ListCommitsReq ¶
type ListCommitsReq struct { Owner string Repo string PullNumber int64 // Results per page (max 100) PerPage *int64 // Page number of the results to fetch. Page *int64 // contains filtered or unexported fields }
ListCommitsReq is request data for Client.ListCommits
https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*ListCommitsReq) HTTPRequest ¶
func (r *ListCommitsReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*ListCommitsReq) Rel ¶
func (r *ListCommitsReq) Rel(link string, resp *ListCommitsResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type ListCommitsResponse ¶
type ListCommitsResponse struct { Data []components.SimpleCommit // contains filtered or unexported fields }
ListCommitsResponse is a response for ListCommits
https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request
func ListCommits ¶
func ListCommits(ctx context.Context, req *ListCommitsReq, opt ...requests.Option) (*ListCommitsResponse, error)
ListCommits performs requests for "pulls/list-commits"
List commits on a pull request.
GET /repos/{owner}/{repo}/pulls/{pull_number}/commits
https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request
func (*ListCommitsResponse) HTTPResponse ¶
func (r *ListCommitsResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*ListCommitsResponse) ReadResponse ¶
func (r *ListCommitsResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type ListFilesReq ¶
type ListFilesReq struct { Owner string Repo string PullNumber int64 // Results per page (max 100) PerPage *int64 // Page number of the results to fetch. Page *int64 // contains filtered or unexported fields }
ListFilesReq is request data for Client.ListFiles
https://developer.github.com/v3/pulls/#list-pull-requests-files
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*ListFilesReq) HTTPRequest ¶
func (r *ListFilesReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*ListFilesReq) Rel ¶
func (r *ListFilesReq) Rel(link string, resp *ListFilesResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type ListFilesResponse ¶
type ListFilesResponse struct { Data []components.DiffEntry // contains filtered or unexported fields }
ListFilesResponse is a response for ListFiles
https://developer.github.com/v3/pulls/#list-pull-requests-files
func ListFiles ¶
func ListFiles(ctx context.Context, req *ListFilesReq, opt ...requests.Option) (*ListFilesResponse, error)
ListFiles performs requests for "pulls/list-files"
List pull requests files.
GET /repos/{owner}/{repo}/pulls/{pull_number}/files
https://developer.github.com/v3/pulls/#list-pull-requests-files
func (*ListFilesResponse) HTTPResponse ¶
func (r *ListFilesResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*ListFilesResponse) ReadResponse ¶
func (r *ListFilesResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type ListReq ¶
type ListReq struct { Owner string Repo string // Either `open`, `closed`, or `all` to filter by state. State *string /* Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`. */ Head *string // Filter pulls by base branch name. Example: `gh-pages`. Base *string /* What to sort results by. Can be either `created`, `updated`, `popularity` (comment count) or `long-running` (age, filtering by pulls updated in the last month). */ Sort *string /* The direction of the sort. Can be either `asc` or `desc`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ Direction *string // Results per page (max 100) PerPage *int64 // Page number of the results to fetch. Page *int64 /* You can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in `locked` events. This feature is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-01-10-lock-reason-api-preview) for full details. To access this feature, you must set this to true. */ SailorVPreview bool // contains filtered or unexported fields }
ListReq is request data for Client.List
https://developer.github.com/v3/pulls/#list-pull-requests
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*ListReq) HTTPRequest ¶
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
type ListRequestedReviewersReq ¶
type ListRequestedReviewersReq struct { Owner string Repo string PullNumber int64 // Results per page (max 100) PerPage *int64 // Page number of the results to fetch. Page *int64 // contains filtered or unexported fields }
ListRequestedReviewersReq is request data for Client.ListRequestedReviewers
https://developer.github.com/v3/pulls/review_requests/#list-requested-reviewers-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*ListRequestedReviewersReq) HTTPRequest ¶
func (r *ListRequestedReviewersReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*ListRequestedReviewersReq) Rel ¶
func (r *ListRequestedReviewersReq) Rel(link string, resp *ListRequestedReviewersResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type ListRequestedReviewersResponse ¶
type ListRequestedReviewersResponse struct { Data components.PullRequestReviewRequest // contains filtered or unexported fields }
ListRequestedReviewersResponse is a response for ListRequestedReviewers
https://developer.github.com/v3/pulls/review_requests/#list-requested-reviewers-for-a-pull-request
func ListRequestedReviewers ¶
func ListRequestedReviewers(ctx context.Context, req *ListRequestedReviewersReq, opt ...requests.Option) (*ListRequestedReviewersResponse, error)
ListRequestedReviewers performs requests for "pulls/list-requested-reviewers"
List requested reviewers for a pull request.
GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
https://developer.github.com/v3/pulls/review_requests/#list-requested-reviewers-for-a-pull-request
func (*ListRequestedReviewersResponse) HTTPResponse ¶
func (r *ListRequestedReviewersResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*ListRequestedReviewersResponse) ReadResponse ¶
func (r *ListRequestedReviewersResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type ListResponse ¶
type ListResponse struct { Data []components.PullRequestSimple // contains filtered or unexported fields }
ListResponse is a response for List
https://developer.github.com/v3/pulls/#list-pull-requests
func List ¶
List performs requests for "pulls/list"
List pull requests.
GET /repos/{owner}/{repo}/pulls
func (*ListResponse) HTTPResponse ¶
func (r *ListResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*ListResponse) ReadResponse ¶
func (r *ListResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type ListReviewCommentsForRepoReq ¶
type ListReviewCommentsForRepoReq struct { Owner string Repo string /* One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ Sort *string // Can be either `asc` or `desc`. Ignored without `sort` parameter. Direction *string /* Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ Since *string // Results per page (max 100) PerPage *int64 // Page number of the results to fetch. Page *int64 /* Multi-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must set this to true. */ ComfortFadePreview bool /* An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API you must set this to true. */ SquirrelGirlPreview bool // contains filtered or unexported fields }
ListReviewCommentsForRepoReq is request data for Client.ListReviewCommentsForRepo
https://developer.github.com/v3/pulls/comments/#list-review-comments-in-a-repository
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*ListReviewCommentsForRepoReq) HTTPRequest ¶
func (r *ListReviewCommentsForRepoReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*ListReviewCommentsForRepoReq) Rel ¶
func (r *ListReviewCommentsForRepoReq) Rel(link string, resp *ListReviewCommentsForRepoResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type ListReviewCommentsForRepoResponse ¶
type ListReviewCommentsForRepoResponse struct { Data []components.PullRequestReviewComment // contains filtered or unexported fields }
ListReviewCommentsForRepoResponse is a response for ListReviewCommentsForRepo
https://developer.github.com/v3/pulls/comments/#list-review-comments-in-a-repository
func ListReviewCommentsForRepo ¶
func ListReviewCommentsForRepo(ctx context.Context, req *ListReviewCommentsForRepoReq, opt ...requests.Option) (*ListReviewCommentsForRepoResponse, error)
ListReviewCommentsForRepo performs requests for "pulls/list-review-comments-for-repo"
List review comments in a repository.
GET /repos/{owner}/{repo}/pulls/comments
https://developer.github.com/v3/pulls/comments/#list-review-comments-in-a-repository
func (*ListReviewCommentsForRepoResponse) HTTPResponse ¶
func (r *ListReviewCommentsForRepoResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*ListReviewCommentsForRepoResponse) ReadResponse ¶
func (r *ListReviewCommentsForRepoResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type ListReviewCommentsReq ¶
type ListReviewCommentsReq struct { Owner string Repo string PullNumber int64 /* One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ Sort *string // Can be either `asc` or `desc`. Ignored without `sort` parameter. Direction *string /* Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ Since *string // Results per page (max 100) PerPage *int64 // Page number of the results to fetch. Page *int64 /* Multi-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must set this to true. */ ComfortFadePreview bool /* An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details. To access the API you must set this to true. */ SquirrelGirlPreview bool // contains filtered or unexported fields }
ListReviewCommentsReq is request data for Client.ListReviewComments
https://developer.github.com/v3/pulls/comments/#list-review-comments-on-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*ListReviewCommentsReq) HTTPRequest ¶
func (r *ListReviewCommentsReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*ListReviewCommentsReq) Rel ¶
func (r *ListReviewCommentsReq) Rel(link string, resp *ListReviewCommentsResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type ListReviewCommentsResponse ¶
type ListReviewCommentsResponse struct { Data []components.PullRequestReviewComment // contains filtered or unexported fields }
ListReviewCommentsResponse is a response for ListReviewComments
https://developer.github.com/v3/pulls/comments/#list-review-comments-on-a-pull-request
func ListReviewComments ¶
func ListReviewComments(ctx context.Context, req *ListReviewCommentsReq, opt ...requests.Option) (*ListReviewCommentsResponse, error)
ListReviewComments performs requests for "pulls/list-review-comments"
List review comments on a pull request.
GET /repos/{owner}/{repo}/pulls/{pull_number}/comments
https://developer.github.com/v3/pulls/comments/#list-review-comments-on-a-pull-request
func (*ListReviewCommentsResponse) HTTPResponse ¶
func (r *ListReviewCommentsResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*ListReviewCommentsResponse) ReadResponse ¶
func (r *ListReviewCommentsResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type ListReviewsReq ¶
type ListReviewsReq struct { Owner string Repo string PullNumber int64 // Results per page (max 100) PerPage *int64 // Page number of the results to fetch. Page *int64 // contains filtered or unexported fields }
ListReviewsReq is request data for Client.ListReviews
https://developer.github.com/v3/pulls/reviews/#list-reviews-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*ListReviewsReq) HTTPRequest ¶
func (r *ListReviewsReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*ListReviewsReq) Rel ¶
func (r *ListReviewsReq) Rel(link string, resp *ListReviewsResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type ListReviewsResponse ¶
type ListReviewsResponse struct { Data []components.PullRequestReview // contains filtered or unexported fields }
ListReviewsResponse is a response for ListReviews
https://developer.github.com/v3/pulls/reviews/#list-reviews-for-a-pull-request
func ListReviews ¶
func ListReviews(ctx context.Context, req *ListReviewsReq, opt ...requests.Option) (*ListReviewsResponse, error)
ListReviews performs requests for "pulls/list-reviews"
List reviews for a pull request.
GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews
https://developer.github.com/v3/pulls/reviews/#list-reviews-for-a-pull-request
func (*ListReviewsResponse) HTTPResponse ¶
func (r *ListReviewsResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*ListReviewsResponse) ReadResponse ¶
func (r *ListReviewsResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type MergeReq ¶
type MergeReq struct { Owner string Repo string PullNumber int64 RequestBody MergeReqBody // contains filtered or unexported fields }
MergeReq is request data for Client.Merge
https://developer.github.com/v3/pulls/#merge-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*MergeReq) HTTPRequest ¶
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
type MergeReqBody ¶
type MergeReqBody struct { // Extra detail to append to automatic commit message. CommitMessage *string `json:"commit_message,omitempty"` // Title for the automatic commit message. CommitTitle *string `json:"commit_title,omitempty"` // Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. MergeMethod *string `json:"merge_method,omitempty"` // SHA that pull request head must match to allow merge. Sha *string `json:"sha,omitempty"` }
MergeReqBody is a request body for pulls/merge
type MergeResponse ¶
type MergeResponse struct { Data components.PullRequestMergeResult // contains filtered or unexported fields }
MergeResponse is a response for Merge
https://developer.github.com/v3/pulls/#merge-a-pull-request
func Merge ¶
Merge performs requests for "pulls/merge"
Merge a pull request.
PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge
func (*MergeResponse) HTTPResponse ¶
func (r *MergeResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*MergeResponse) ReadResponse ¶
func (r *MergeResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type RemoveRequestedReviewersReq ¶
type RemoveRequestedReviewersReq struct { Owner string Repo string PullNumber int64 RequestBody RemoveRequestedReviewersReqBody // contains filtered or unexported fields }
RemoveRequestedReviewersReq is request data for Client.RemoveRequestedReviewers
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*RemoveRequestedReviewersReq) HTTPRequest ¶
func (r *RemoveRequestedReviewersReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*RemoveRequestedReviewersReq) Rel ¶
func (r *RemoveRequestedReviewersReq) Rel(link string, resp *RemoveRequestedReviewersResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type RemoveRequestedReviewersReqBody ¶
type RemoveRequestedReviewersReqBody struct { // An array of user `login`s that will be removed. Reviewers []string `json:"reviewers,omitempty"` // An array of team `slug`s that will be removed. TeamReviewers []string `json:"team_reviewers,omitempty"` }
RemoveRequestedReviewersReqBody is a request body for pulls/remove-requested-reviewers
type RemoveRequestedReviewersResponse ¶
type RemoveRequestedReviewersResponse struct {
// contains filtered or unexported fields
}
RemoveRequestedReviewersResponse is a response for RemoveRequestedReviewers
func RemoveRequestedReviewers ¶
func RemoveRequestedReviewers(ctx context.Context, req *RemoveRequestedReviewersReq, opt ...requests.Option) (*RemoveRequestedReviewersResponse, error)
RemoveRequestedReviewers performs requests for "pulls/remove-requested-reviewers"
Remove requested reviewers from a pull request.
DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
func (*RemoveRequestedReviewersResponse) HTTPResponse ¶
func (r *RemoveRequestedReviewersResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*RemoveRequestedReviewersResponse) ReadResponse ¶
func (r *RemoveRequestedReviewersResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type RequestReviewersReq ¶
type RequestReviewersReq struct { Owner string Repo string PullNumber int64 RequestBody RequestReviewersReqBody // contains filtered or unexported fields }
RequestReviewersReq is request data for Client.RequestReviewers
https://developer.github.com/v3/pulls/review_requests/#request-reviewers-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*RequestReviewersReq) HTTPRequest ¶
func (r *RequestReviewersReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*RequestReviewersReq) Rel ¶
func (r *RequestReviewersReq) Rel(link string, resp *RequestReviewersResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type RequestReviewersReqBody ¶
type RequestReviewersReqBody struct { // An array of user `login`s that will be requested. Reviewers []string `json:"reviewers,omitempty"` // An array of team `slug`s that will be requested. TeamReviewers []string `json:"team_reviewers,omitempty"` }
RequestReviewersReqBody is a request body for pulls/request-reviewers
https://developer.github.com/v3/pulls/review_requests/#request-reviewers-for-a-pull-request
type RequestReviewersResponse ¶
type RequestReviewersResponse struct { Data components.PullRequestSimple // contains filtered or unexported fields }
RequestReviewersResponse is a response for RequestReviewers
https://developer.github.com/v3/pulls/review_requests/#request-reviewers-for-a-pull-request
func RequestReviewers ¶
func RequestReviewers(ctx context.Context, req *RequestReviewersReq, opt ...requests.Option) (*RequestReviewersResponse, error)
RequestReviewers performs requests for "pulls/request-reviewers"
Request reviewers for a pull request.
POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
https://developer.github.com/v3/pulls/review_requests/#request-reviewers-for-a-pull-request
func (*RequestReviewersResponse) HTTPResponse ¶
func (r *RequestReviewersResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*RequestReviewersResponse) ReadResponse ¶
func (r *RequestReviewersResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type SubmitReviewReq ¶
type SubmitReviewReq struct { Owner string Repo string PullNumber int64 // review_id parameter ReviewId int64 RequestBody SubmitReviewReqBody // contains filtered or unexported fields }
SubmitReviewReq is request data for Client.SubmitReview
https://developer.github.com/v3/pulls/reviews/#submit-a-review-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*SubmitReviewReq) HTTPRequest ¶
func (r *SubmitReviewReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*SubmitReviewReq) Rel ¶
func (r *SubmitReviewReq) Rel(link string, resp *SubmitReviewResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type SubmitReviewReqBody ¶
type SubmitReviewReqBody struct { // The body text of the pull request review Body *string `json:"body,omitempty"` /* The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. */ Event *string `json:"event"` }
SubmitReviewReqBody is a request body for pulls/submit-review
https://developer.github.com/v3/pulls/reviews/#submit-a-review-for-a-pull-request
type SubmitReviewResponse ¶
type SubmitReviewResponse struct { Data components.PullRequestReview // contains filtered or unexported fields }
SubmitReviewResponse is a response for SubmitReview
https://developer.github.com/v3/pulls/reviews/#submit-a-review-for-a-pull-request
func SubmitReview ¶
func SubmitReview(ctx context.Context, req *SubmitReviewReq, opt ...requests.Option) (*SubmitReviewResponse, error)
SubmitReview performs requests for "pulls/submit-review"
Submit a review for a pull request.
POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events
https://developer.github.com/v3/pulls/reviews/#submit-a-review-for-a-pull-request
func (*SubmitReviewResponse) HTTPResponse ¶
func (r *SubmitReviewResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*SubmitReviewResponse) ReadResponse ¶
func (r *SubmitReviewResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type UpdateBranchReq ¶
type UpdateBranchReq struct { Owner string Repo string PullNumber int64 RequestBody UpdateBranchReqBody /* Updating the pull request branch with latest upstream changes is currently available for developers to preview. To access this new endpoint during the preview period, you must set this to true. */ LydianPreview bool // contains filtered or unexported fields }
UpdateBranchReq is request data for Client.UpdateBranch
https://developer.github.com/v3/pulls/#update-a-pull-request-branch
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*UpdateBranchReq) HTTPRequest ¶
func (r *UpdateBranchReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*UpdateBranchReq) Rel ¶
func (r *UpdateBranchReq) Rel(link string, resp *UpdateBranchResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type UpdateBranchReqBody ¶
type UpdateBranchReqBody struct { /* The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://developer.github.com/v3/repos/commits/#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ ExpectedHeadSha *string `json:"expected_head_sha,omitempty"` }
UpdateBranchReqBody is a request body for pulls/update-branch
https://developer.github.com/v3/pulls/#update-a-pull-request-branch
type UpdateBranchResponse ¶
type UpdateBranchResponse struct { Data UpdateBranchResponseBody // contains filtered or unexported fields }
UpdateBranchResponse is a response for UpdateBranch
https://developer.github.com/v3/pulls/#update-a-pull-request-branch
func UpdateBranch ¶
func UpdateBranch(ctx context.Context, req *UpdateBranchReq, opt ...requests.Option) (*UpdateBranchResponse, error)
UpdateBranch performs requests for "pulls/update-branch"
Update a pull request branch.
PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch
https://developer.github.com/v3/pulls/#update-a-pull-request-branch
func (*UpdateBranchResponse) HTTPResponse ¶
func (r *UpdateBranchResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*UpdateBranchResponse) ReadResponse ¶
func (r *UpdateBranchResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type UpdateBranchResponseBody ¶
type UpdateBranchResponseBody struct { Message string `json:"message,omitempty"` Url string `json:"url,omitempty"` }
UpdateBranchResponseBody is a response body for UpdateBranch
https://developer.github.com/v3/pulls/#update-a-pull-request-branch
type UpdateReq ¶
type UpdateReq struct { Owner string Repo string PullNumber int64 RequestBody UpdateReqBody /* You can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in `locked` events. This feature is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-01-10-lock-reason-api-preview) for full details. To access this feature, you must set this to true. */ SailorVPreview bool // contains filtered or unexported fields }
UpdateReq is request data for Client.Update
https://developer.github.com/v3/pulls/#update-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*UpdateReq) HTTPRequest ¶
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
type UpdateReqBody ¶
type UpdateReqBody struct { /* The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. */ Base *string `json:"base,omitempty"` // The contents of the pull request. Body *string `json:"body,omitempty"` /* Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ MaintainerCanModify *bool `json:"maintainer_can_modify,omitempty"` // State of this Pull Request. Either `open` or `closed`. State *string `json:"state,omitempty"` // The title of the pull request. Title *string `json:"title,omitempty"` }
UpdateReqBody is a request body for pulls/update
https://developer.github.com/v3/pulls/#update-a-pull-request
type UpdateResponse ¶
type UpdateResponse struct { Data components.PullRequest // contains filtered or unexported fields }
UpdateResponse is a response for Update
https://developer.github.com/v3/pulls/#update-a-pull-request
func Update ¶
Update performs requests for "pulls/update"
Update a pull request.
PATCH /repos/{owner}/{repo}/pulls/{pull_number}
https://developer.github.com/v3/pulls/#update-a-pull-request
func (*UpdateResponse) HTTPResponse ¶
func (r *UpdateResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*UpdateResponse) ReadResponse ¶
func (r *UpdateResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type UpdateReviewCommentReq ¶
type UpdateReviewCommentReq struct { Owner string Repo string // comment_id parameter CommentId int64 RequestBody UpdateReviewCommentReqBody /* Multi-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must set this to true. */ ComfortFadePreview bool // contains filtered or unexported fields }
UpdateReviewCommentReq is request data for Client.UpdateReviewComment
https://developer.github.com/v3/pulls/comments/#update-a-review-comment-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*UpdateReviewCommentReq) HTTPRequest ¶
func (r *UpdateReviewCommentReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*UpdateReviewCommentReq) Rel ¶
func (r *UpdateReviewCommentReq) Rel(link string, resp *UpdateReviewCommentResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type UpdateReviewCommentReqBody ¶
type UpdateReviewCommentReqBody struct { // The text of the reply to the review comment. Body *string `json:"body"` }
UpdateReviewCommentReqBody is a request body for pulls/update-review-comment
https://developer.github.com/v3/pulls/comments/#update-a-review-comment-for-a-pull-request
type UpdateReviewCommentResponse ¶
type UpdateReviewCommentResponse struct { Data components.PullRequestReviewComment // contains filtered or unexported fields }
UpdateReviewCommentResponse is a response for UpdateReviewComment
https://developer.github.com/v3/pulls/comments/#update-a-review-comment-for-a-pull-request
func UpdateReviewComment ¶
func UpdateReviewComment(ctx context.Context, req *UpdateReviewCommentReq, opt ...requests.Option) (*UpdateReviewCommentResponse, error)
UpdateReviewComment performs requests for "pulls/update-review-comment"
Update a review comment for a pull request.
PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}
https://developer.github.com/v3/pulls/comments/#update-a-review-comment-for-a-pull-request
func (*UpdateReviewCommentResponse) HTTPResponse ¶
func (r *UpdateReviewCommentResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*UpdateReviewCommentResponse) ReadResponse ¶
func (r *UpdateReviewCommentResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type UpdateReviewReq ¶
type UpdateReviewReq struct { Owner string Repo string PullNumber int64 // review_id parameter ReviewId int64 RequestBody UpdateReviewReqBody // contains filtered or unexported fields }
UpdateReviewReq is request data for Client.UpdateReview
https://developer.github.com/v3/pulls/reviews/#update-a-review-for-a-pull-request
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*UpdateReviewReq) HTTPRequest ¶
func (r *UpdateReviewReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*UpdateReviewReq) Rel ¶
func (r *UpdateReviewReq) Rel(link string, resp *UpdateReviewResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type UpdateReviewReqBody ¶
type UpdateReviewReqBody struct { // The body text of the pull request review. Body *string `json:"body"` }
UpdateReviewReqBody is a request body for pulls/update-review
https://developer.github.com/v3/pulls/reviews/#update-a-review-for-a-pull-request
type UpdateReviewResponse ¶
type UpdateReviewResponse struct { Data components.PullRequestReview // contains filtered or unexported fields }
UpdateReviewResponse is a response for UpdateReview
https://developer.github.com/v3/pulls/reviews/#update-a-review-for-a-pull-request
func UpdateReview ¶
func UpdateReview(ctx context.Context, req *UpdateReviewReq, opt ...requests.Option) (*UpdateReviewResponse, error)
UpdateReview performs requests for "pulls/update-review"
Update a review for a pull request.
PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}
https://developer.github.com/v3/pulls/reviews/#update-a-review-for-a-pull-request
func (*UpdateReviewResponse) HTTPResponse ¶
func (r *UpdateReviewResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*UpdateReviewResponse) ReadResponse ¶
func (r *UpdateReviewResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.