1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-20 21:59:42 +02:00

Moved from Dep to Go Modules

We have finally dropped go dep and moved over to go mod !

During the move, some dependencies have been bumped.
This commit is contained in:
HarveyKandola 2019-09-06 11:06:28 +01:00
parent 2c164a135a
commit b826852137
164 changed files with 18268 additions and 10658 deletions

View file

@ -9,6 +9,7 @@ import (
"bytes"
"context"
"fmt"
"strings"
"time"
)
@ -29,6 +30,7 @@ type PullRequest struct {
UpdatedAt *time.Time `json:"updated_at,omitempty"`
ClosedAt *time.Time `json:"closed_at,omitempty"`
MergedAt *time.Time `json:"merged_at,omitempty"`
Labels []*Label `json:"labels,omitempty"`
User *User `json:"user,omitempty"`
Merged *bool `json:"merged,omitempty"`
Mergeable *bool `json:"mergeable,omitempty"`
@ -46,6 +48,8 @@ type PullRequest struct {
StatusesURL *string `json:"statuses_url,omitempty"`
DiffURL *string `json:"diff_url,omitempty"`
PatchURL *string `json:"patch_url,omitempty"`
CommitsURL *string `json:"commits_url,omitempty"`
CommentsURL *string `json:"comments_url,omitempty"`
ReviewCommentsURL *string `json:"review_comments_url,omitempty"`
ReviewCommentURL *string `json:"review_comment_url,omitempty"`
Assignee *User `json:"assignee,omitempty"`
@ -54,9 +58,14 @@ type PullRequest struct {
MaintainerCanModify *bool `json:"maintainer_can_modify,omitempty"`
AuthorAssociation *string `json:"author_association,omitempty"`
NodeID *string `json:"node_id,omitempty"`
RequestedReviewers []*User `json:"requested_reviewers,omitempty"`
Head *PullRequestBranch `json:"head,omitempty"`
Base *PullRequestBranch `json:"base,omitempty"`
// ActiveLockReason is populated only when LockReason is provided while locking the pull request.
// Possible values are: "off-topic", "too heated", "resolved", and "spam".
ActiveLockReason *string `json:"active_lock_reason,omitempty"`
}
func (p PullRequest) String() string {
@ -114,7 +123,8 @@ func (s *PullRequestsService) List(ctx context.Context, owner string, repo strin
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeGraphQLNodeIDPreview)
acceptHeaders := []string{mediaTypeLabelDescriptionSearchPreview, mediaTypeLockReasonPreview}
req.Header.Set("Accept", strings.Join(acceptHeaders, ", "))
var pulls []*PullRequest
resp, err := s.client.Do(ctx, req, &pulls)
@ -136,7 +146,8 @@ func (s *PullRequestsService) Get(ctx context.Context, owner string, repo string
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeGraphQLNodeIDPreview)
acceptHeaders := []string{mediaTypeLabelDescriptionSearchPreview, mediaTypeLockReasonPreview}
req.Header.Set("Accept", strings.Join(acceptHeaders, ", "))
pull := new(PullRequest)
resp, err := s.client.Do(ctx, req, pull)
@ -194,7 +205,7 @@ func (s *PullRequestsService) Create(ctx context.Context, owner string, repo str
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeGraphQLNodeIDPreview)
req.Header.Set("Accept", mediaTypeLabelDescriptionSearchPreview)
p := new(PullRequest)
resp, err := s.client.Do(ctx, req, p)
@ -243,7 +254,8 @@ func (s *PullRequestsService) Edit(ctx context.Context, owner string, repo strin
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeGraphQLNodeIDPreview)
acceptHeaders := []string{mediaTypeLabelDescriptionSearchPreview, mediaTypeLockReasonPreview}
req.Header.Set("Accept", strings.Join(acceptHeaders, ", "))
p := new(PullRequest)
resp, err := s.client.Do(ctx, req, p)