1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-20 05:39: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,7 +9,6 @@ import (
"context"
"encoding/json"
"fmt"
"strings"
)
// Deployment represents a deployment in a repo
@ -76,9 +75,6 @@ func (s *RepositoriesService) ListDeployments(ctx context.Context, owner, repo s
return nil, nil, err
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeGraphQLNodeIDPreview)
var deployments []*Deployment
resp, err := s.client.Do(ctx, req, &deployments)
if err != nil {
@ -99,9 +95,6 @@ func (s *RepositoriesService) GetDeployment(ctx context.Context, owner, repo str
return nil, nil, err
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeGraphQLNodeIDPreview)
deployment := new(Deployment)
resp, err := s.client.Do(ctx, req, deployment)
if err != nil {
@ -123,8 +116,7 @@ func (s *RepositoriesService) CreateDeployment(ctx context.Context, owner, repo
}
// TODO: remove custom Accept headers when APIs fully launch.
acceptHeaders := []string{mediaTypeDeploymentStatusPreview, mediaTypeGraphQLNodeIDPreview}
req.Header.Set("Accept", strings.Join(acceptHeaders, ", "))
req.Header.Set("Accept", mediaTypeDeploymentStatusPreview)
d := new(Deployment)
resp, err := s.client.Do(ctx, req, d)
@ -176,9 +168,6 @@ func (s *RepositoriesService) ListDeploymentStatuses(ctx context.Context, owner,
return nil, nil, err
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeGraphQLNodeIDPreview)
var statuses []*DeploymentStatus
resp, err := s.client.Do(ctx, req, &statuses)
if err != nil {
@ -200,8 +189,7 @@ func (s *RepositoriesService) GetDeploymentStatus(ctx context.Context, owner, re
}
// TODO: remove custom Accept headers when APIs fully launch.
acceptHeaders := []string{mediaTypeDeploymentStatusPreview, mediaTypeGraphQLNodeIDPreview}
req.Header.Set("Accept", strings.Join(acceptHeaders, ", "))
req.Header.Set("Accept", mediaTypeDeploymentStatusPreview)
d := new(DeploymentStatus)
resp, err := s.client.Do(ctx, req, d)
@ -224,8 +212,7 @@ func (s *RepositoriesService) CreateDeploymentStatus(ctx context.Context, owner,
}
// TODO: remove custom Accept headers when APIs fully launch.
acceptHeaders := []string{mediaTypeDeploymentStatusPreview, mediaTypeGraphQLNodeIDPreview}
req.Header.Set("Accept", strings.Join(acceptHeaders, ", "))
req.Header.Set("Accept", mediaTypeDeploymentStatusPreview)
d := new(DeploymentStatus)
resp, err := s.client.Do(ctx, req, d)