mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Update dependencies
This commit is contained in:
32
vendor/github.com/google/go-github/github/github-accessors.go
generated
vendored
32
vendor/github.com/google/go-github/github/github-accessors.go
generated
vendored
@@ -1292,6 +1292,14 @@ func (c *CommitFile) GetPatch() string {
|
||||
return *c.Patch
|
||||
}
|
||||
|
||||
// GetPreviousFilename returns the PreviousFilename field if it's non-nil, zero value otherwise.
|
||||
func (c *CommitFile) GetPreviousFilename() string {
|
||||
if c == nil || c.PreviousFilename == nil {
|
||||
return ""
|
||||
}
|
||||
return *c.PreviousFilename
|
||||
}
|
||||
|
||||
// GetRawURL returns the RawURL field if it's non-nil, zero value otherwise.
|
||||
func (c *CommitFile) GetRawURL() string {
|
||||
if c == nil || c.RawURL == nil {
|
||||
@@ -2292,6 +2300,14 @@ func (d *DeploymentStatusRequest) GetDescription() string {
|
||||
return *d.Description
|
||||
}
|
||||
|
||||
// GetEnvironment returns the Environment field if it's non-nil, zero value otherwise.
|
||||
func (d *DeploymentStatusRequest) GetEnvironment() string {
|
||||
if d == nil || d.Environment == nil {
|
||||
return ""
|
||||
}
|
||||
return *d.Environment
|
||||
}
|
||||
|
||||
// GetEnvironmentURL returns the EnvironmentURL field if it's non-nil, zero value otherwise.
|
||||
func (d *DeploymentStatusRequest) GetEnvironmentURL() string {
|
||||
if d == nil || d.EnvironmentURL == nil {
|
||||
@@ -10100,6 +10116,22 @@ func (s *ServiceHook) GetName() string {
|
||||
return *s.Name
|
||||
}
|
||||
|
||||
// GetEnabled returns the Enabled field if it's non-nil, zero value otherwise.
|
||||
func (s *SignaturesProtectedBranch) GetEnabled() bool {
|
||||
if s == nil || s.Enabled == nil {
|
||||
return false
|
||||
}
|
||||
return *s.Enabled
|
||||
}
|
||||
|
||||
// GetURL returns the URL field if it's non-nil, zero value otherwise.
|
||||
func (s *SignaturesProtectedBranch) GetURL() string {
|
||||
if s == nil || s.URL == nil {
|
||||
return ""
|
||||
}
|
||||
return *s.URL
|
||||
}
|
||||
|
||||
// GetPayload returns the Payload field if it's non-nil, zero value otherwise.
|
||||
func (s *SignatureVerification) GetPayload() string {
|
||||
if s == nil || s.Payload == nil {
|
||||
|
||||
6
vendor/github.com/google/go-github/github/github.go
generated
vendored
6
vendor/github.com/google/go-github/github/github.go
generated
vendored
@@ -54,6 +54,9 @@ const (
|
||||
// https://developer.github.com/changes/2016-04-06-deployment-and-deployment-status-enhancements/
|
||||
mediaTypeDeploymentStatusPreview = "application/vnd.github.ant-man-preview+json"
|
||||
|
||||
// https://developer.github.com/changes/2018-10-16-deployments-environments-states-and-auto-inactive-updates/
|
||||
mediaTypeExpandDeploymentStatusPreview = "application/vnd.github.flash-preview+json"
|
||||
|
||||
// https://developer.github.com/changes/2016-02-19-source-import-preview-api/
|
||||
mediaTypeImportPreview = "application/vnd.github.barred-rock-preview"
|
||||
|
||||
@@ -122,6 +125,9 @@ const (
|
||||
|
||||
// https://developer.github.com/enterprise/2.13/v3/repos/pre_receive_hooks/
|
||||
mediaTypePreReceiveHooksPreview = "application/vnd.github.eye-scream-preview"
|
||||
|
||||
// https://developer.github.com/changes/2018-02-22-protected-branches-required-signatures/
|
||||
mediaTypeSignaturePreview = "application/vnd.github.zzzax-preview+json"
|
||||
)
|
||||
|
||||
// A Client manages communication with the GitHub API.
|
||||
|
||||
2
vendor/github.com/google/go-github/github/pulls.go
generated
vendored
2
vendor/github.com/google/go-github/github/pulls.go
generated
vendored
@@ -107,7 +107,7 @@ type PullRequestBranch struct {
|
||||
// PullRequestsService.List method.
|
||||
type PullRequestListOptions struct {
|
||||
// State filters pull requests based on their state. Possible values are:
|
||||
// open, closed. Default is "open".
|
||||
// open, closed, all. Default is "open".
|
||||
State string `url:"state,omitempty"`
|
||||
|
||||
// Head filters pull requests by head user and branch name in the format of:
|
||||
|
||||
68
vendor/github.com/google/go-github/github/repos.go
generated
vendored
68
vendor/github.com/google/go-github/github/repos.go
generated
vendored
@@ -698,6 +698,13 @@ type DismissalRestrictionsRequest struct {
|
||||
Teams *[]string `json:"teams,omitempty"`
|
||||
}
|
||||
|
||||
// SignaturesProtectedBranch represents the protection status of an individual branch.
|
||||
type SignaturesProtectedBranch struct {
|
||||
URL *string `json:"url,omitempty"`
|
||||
// Commits pushed to matching branches must have verified signatures.
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
}
|
||||
|
||||
// ListBranches lists branches for the specified repository.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/repos/#list-branches
|
||||
@@ -850,6 +857,67 @@ func (s *RepositoriesService) RemoveBranchProtection(ctx context.Context, owner,
|
||||
return s.client.Do(ctx, req, nil)
|
||||
}
|
||||
|
||||
// GetSignaturesProtectedBranch gets required signatures of protected branch.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/repos/branches/#get-required-signatures-of-protected-branch
|
||||
func (s *RepositoriesService) GetSignaturesProtectedBranch(ctx context.Context, owner, repo, branch string) (*SignaturesProtectedBranch, *Response, error) {
|
||||
u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/required_signatures", owner, repo, branch)
|
||||
req, err := s.client.NewRequest("GET", u, nil)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
// TODO: remove custom Accept header when this API fully launches
|
||||
req.Header.Set("Accept", mediaTypeSignaturePreview)
|
||||
|
||||
p := new(SignaturesProtectedBranch)
|
||||
resp, err := s.client.Do(ctx, req, p)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
|
||||
return p, resp, nil
|
||||
}
|
||||
|
||||
// RequireSignaturesOnProtectedBranch makes signed commits required on a protected branch.
|
||||
// It requires admin access and branch protection to be enabled.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/repos/branches/#add-required-signatures-of-protected-branch
|
||||
func (s *RepositoriesService) RequireSignaturesOnProtectedBranch(ctx context.Context, owner, repo, branch string) (*SignaturesProtectedBranch, *Response, error) {
|
||||
u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/required_signatures", owner, repo, branch)
|
||||
req, err := s.client.NewRequest("POST", u, nil)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
// TODO: remove custom Accept header when this API fully launches
|
||||
req.Header.Set("Accept", mediaTypeSignaturePreview)
|
||||
|
||||
r := new(SignaturesProtectedBranch)
|
||||
resp, err := s.client.Do(ctx, req, r)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
|
||||
return r, resp, err
|
||||
}
|
||||
|
||||
// OptionalSignaturesOnProtectedBranch removes required signed commits on a given branch.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/repos/branches/#remove-required-signatures-of-protected-branch
|
||||
func (s *RepositoriesService) OptionalSignaturesOnProtectedBranch(ctx context.Context, owner, repo, branch string) (*Response, error) {
|
||||
u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/required_signatures", owner, repo, branch)
|
||||
req, err := s.client.NewRequest("DELETE", u, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// TODO: remove custom Accept header when this API fully launches
|
||||
req.Header.Set("Accept", mediaTypeSignaturePreview)
|
||||
|
||||
return s.client.Do(ctx, req, nil)
|
||||
}
|
||||
|
||||
// UpdateRequiredStatusChecks updates the required status checks for a given protected branch.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/repos/branches/#update-required-status-checks-of-protected-branch
|
||||
|
||||
21
vendor/github.com/google/go-github/github/repos_commits.go
generated
vendored
21
vendor/github.com/google/go-github/github/repos_commits.go
generated
vendored
@@ -48,16 +48,17 @@ func (c CommitStats) String() string {
|
||||
|
||||
// CommitFile represents a file modified in a commit.
|
||||
type CommitFile struct {
|
||||
SHA *string `json:"sha,omitempty"`
|
||||
Filename *string `json:"filename,omitempty"`
|
||||
Additions *int `json:"additions,omitempty"`
|
||||
Deletions *int `json:"deletions,omitempty"`
|
||||
Changes *int `json:"changes,omitempty"`
|
||||
Status *string `json:"status,omitempty"`
|
||||
Patch *string `json:"patch,omitempty"`
|
||||
BlobURL *string `json:"blob_url,omitempty"`
|
||||
RawURL *string `json:"raw_url,omitempty"`
|
||||
ContentsURL *string `json:"contents_url,omitempty"`
|
||||
SHA *string `json:"sha,omitempty"`
|
||||
Filename *string `json:"filename,omitempty"`
|
||||
Additions *int `json:"additions,omitempty"`
|
||||
Deletions *int `json:"deletions,omitempty"`
|
||||
Changes *int `json:"changes,omitempty"`
|
||||
Status *string `json:"status,omitempty"`
|
||||
Patch *string `json:"patch,omitempty"`
|
||||
BlobURL *string `json:"blob_url,omitempty"`
|
||||
RawURL *string `json:"raw_url,omitempty"`
|
||||
ContentsURL *string `json:"contents_url,omitempty"`
|
||||
PreviousFilename *string `json:"previous_filename,omitempty"`
|
||||
}
|
||||
|
||||
func (c CommitFile) String() string {
|
||||
|
||||
11
vendor/github.com/google/go-github/github/repos_deployments.go
generated
vendored
11
vendor/github.com/google/go-github/github/repos_deployments.go
generated
vendored
@@ -9,6 +9,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Deployment represents a deployment in a repo
|
||||
@@ -116,7 +117,8 @@ func (s *RepositoriesService) CreateDeployment(ctx context.Context, owner, repo
|
||||
}
|
||||
|
||||
// TODO: remove custom Accept headers when APIs fully launch.
|
||||
req.Header.Set("Accept", mediaTypeDeploymentStatusPreview)
|
||||
acceptHeaders := []string{mediaTypeDeploymentStatusPreview, mediaTypeExpandDeploymentStatusPreview}
|
||||
req.Header.Set("Accept", strings.Join(acceptHeaders, ", "))
|
||||
|
||||
d := new(Deployment)
|
||||
resp, err := s.client.Do(ctx, req, d)
|
||||
@@ -149,6 +151,7 @@ type DeploymentStatusRequest struct {
|
||||
State *string `json:"state,omitempty"`
|
||||
LogURL *string `json:"log_url,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
Environment *string `json:"environment,omitempty"`
|
||||
EnvironmentURL *string `json:"environment_url,omitempty"`
|
||||
AutoInactive *bool `json:"auto_inactive,omitempty"`
|
||||
}
|
||||
@@ -189,7 +192,8 @@ func (s *RepositoriesService) GetDeploymentStatus(ctx context.Context, owner, re
|
||||
}
|
||||
|
||||
// TODO: remove custom Accept headers when APIs fully launch.
|
||||
req.Header.Set("Accept", mediaTypeDeploymentStatusPreview)
|
||||
acceptHeaders := []string{mediaTypeDeploymentStatusPreview, mediaTypeExpandDeploymentStatusPreview}
|
||||
req.Header.Set("Accept", strings.Join(acceptHeaders, ", "))
|
||||
|
||||
d := new(DeploymentStatus)
|
||||
resp, err := s.client.Do(ctx, req, d)
|
||||
@@ -212,7 +216,8 @@ func (s *RepositoriesService) CreateDeploymentStatus(ctx context.Context, owner,
|
||||
}
|
||||
|
||||
// TODO: remove custom Accept headers when APIs fully launch.
|
||||
req.Header.Set("Accept", mediaTypeDeploymentStatusPreview)
|
||||
acceptHeaders := []string{mediaTypeDeploymentStatusPreview, mediaTypeExpandDeploymentStatusPreview}
|
||||
req.Header.Set("Accept", strings.Join(acceptHeaders, ", "))
|
||||
|
||||
d := new(DeploymentStatus)
|
||||
resp, err := s.client.Do(ctx, req, d)
|
||||
|
||||
Reference in New Issue
Block a user