Update dependencies
This change updates all dependencies. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
e3833e5e48
commit
d42160cab2
253 changed files with 1092 additions and 1146 deletions
267
vendor/github.com/google/go-github/v71/github/actions_required_workflows.go
generated
vendored
267
vendor/github.com/google/go-github/v71/github/actions_required_workflows.go
generated
vendored
|
|
@ -1,267 +0,0 @@
|
|||
// Copyright 2023 The go-github AUTHORS. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package github
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// OrgRequiredWorkflow represents a required workflow object at the org level.
|
||||
type OrgRequiredWorkflow struct {
|
||||
ID *int64 `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Path *string `json:"path,omitempty"`
|
||||
Scope *string `json:"scope,omitempty"`
|
||||
Ref *string `json:"ref,omitempty"`
|
||||
State *string `json:"state,omitempty"`
|
||||
SelectedRepositoriesURL *string `json:"selected_repositories_url,omitempty"`
|
||||
CreatedAt *Timestamp `json:"created_at,omitempty"`
|
||||
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
|
||||
Repository *Repository `json:"repository,omitempty"`
|
||||
}
|
||||
|
||||
// OrgRequiredWorkflows represents the required workflows for the org.
|
||||
type OrgRequiredWorkflows struct {
|
||||
TotalCount *int `json:"total_count,omitempty"`
|
||||
RequiredWorkflows []*OrgRequiredWorkflow `json:"required_workflows,omitempty"`
|
||||
}
|
||||
|
||||
// CreateUpdateRequiredWorkflowOptions represents the input object used to create or update required workflows.
|
||||
type CreateUpdateRequiredWorkflowOptions struct {
|
||||
WorkflowFilePath *string `json:"workflow_file_path,omitempty"`
|
||||
RepositoryID *int64 `json:"repository_id,omitempty"`
|
||||
Scope *string `json:"scope,omitempty"`
|
||||
SelectedRepositoryIDs *SelectedRepoIDs `json:"selected_repository_ids,omitempty"`
|
||||
}
|
||||
|
||||
// RequiredWorkflowSelectedRepos represents the repos that a required workflow is applied to.
|
||||
type RequiredWorkflowSelectedRepos struct {
|
||||
TotalCount *int `json:"total_count,omitempty"`
|
||||
Repositories []*Repository `json:"repositories,omitempty"`
|
||||
}
|
||||
|
||||
// RepoRequiredWorkflow represents a required workflow object at the repo level.
|
||||
type RepoRequiredWorkflow struct {
|
||||
ID *int64 `json:"id,omitempty"`
|
||||
NodeID *string `json:"node_id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Path *string `json:"path,omitempty"`
|
||||
State *string `json:"state,omitempty"`
|
||||
URL *string `json:"url,omitempty"`
|
||||
HTMLURL *string `json:"html_url,omitempty"`
|
||||
BadgeURL *string `json:"badge_url,omitempty"`
|
||||
CreatedAt *Timestamp `json:"created_at,omitempty"`
|
||||
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
|
||||
SourceRepository *Repository `json:"source_repository,omitempty"`
|
||||
}
|
||||
|
||||
// RepoRequiredWorkflows represents the required workflows for a repo.
|
||||
type RepoRequiredWorkflows struct {
|
||||
TotalCount *int `json:"total_count,omitempty"`
|
||||
RequiredWorkflows []*RepoRequiredWorkflow `json:"required_workflows,omitempty"`
|
||||
}
|
||||
|
||||
// ListOrgRequiredWorkflows lists the RequiredWorkflows for an org.
|
||||
//
|
||||
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
|
||||
//
|
||||
//meta:operation GET /orgs/{org}/actions/required_workflows
|
||||
func (s *ActionsService) ListOrgRequiredWorkflows(ctx context.Context, org string, opts *ListOptions) (*OrgRequiredWorkflows, *Response, error) {
|
||||
url := fmt.Sprintf("orgs/%v/actions/required_workflows", org)
|
||||
u, err := addOptions(url, opts)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
req, err := s.client.NewRequest("GET", u, nil)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
requiredWorkflows := new(OrgRequiredWorkflows)
|
||||
resp, err := s.client.Do(ctx, req, &requiredWorkflows)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
|
||||
return requiredWorkflows, resp, nil
|
||||
}
|
||||
|
||||
// CreateRequiredWorkflow creates the required workflow in an org.
|
||||
//
|
||||
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
|
||||
//
|
||||
//meta:operation POST /orgs/{org}/actions/required_workflows
|
||||
func (s *ActionsService) CreateRequiredWorkflow(ctx context.Context, org string, createRequiredWorkflowOptions *CreateUpdateRequiredWorkflowOptions) (*OrgRequiredWorkflow, *Response, error) {
|
||||
url := fmt.Sprintf("orgs/%v/actions/required_workflows", org)
|
||||
req, err := s.client.NewRequest("POST", url, createRequiredWorkflowOptions)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
orgRequiredWorkflow := new(OrgRequiredWorkflow)
|
||||
resp, err := s.client.Do(ctx, req, orgRequiredWorkflow)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
|
||||
return orgRequiredWorkflow, resp, nil
|
||||
}
|
||||
|
||||
// GetRequiredWorkflowByID get the RequiredWorkflows for an org by its ID.
|
||||
//
|
||||
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
|
||||
//
|
||||
//meta:operation GET /orgs/{org}/actions/required_workflows/{workflow_id}
|
||||
func (s *ActionsService) GetRequiredWorkflowByID(ctx context.Context, owner string, requiredWorkflowID int64) (*OrgRequiredWorkflow, *Response, error) {
|
||||
u := fmt.Sprintf("orgs/%v/actions/required_workflows/%v", owner, requiredWorkflowID)
|
||||
|
||||
req, err := s.client.NewRequest("GET", u, nil)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
requiredWorkflow := new(OrgRequiredWorkflow)
|
||||
resp, err := s.client.Do(ctx, req, &requiredWorkflow)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
|
||||
return requiredWorkflow, resp, nil
|
||||
}
|
||||
|
||||
// UpdateRequiredWorkflow updates a required workflow in an org.
|
||||
//
|
||||
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
|
||||
//
|
||||
//meta:operation PATCH /orgs/{org}/actions/required_workflows/{workflow_id}
|
||||
func (s *ActionsService) UpdateRequiredWorkflow(ctx context.Context, org string, requiredWorkflowID int64, updateRequiredWorkflowOptions *CreateUpdateRequiredWorkflowOptions) (*OrgRequiredWorkflow, *Response, error) {
|
||||
url := fmt.Sprintf("orgs/%v/actions/required_workflows/%v", org, requiredWorkflowID)
|
||||
req, err := s.client.NewRequest("PATCH", url, updateRequiredWorkflowOptions)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
orgRequiredWorkflow := new(OrgRequiredWorkflow)
|
||||
resp, err := s.client.Do(ctx, req, orgRequiredWorkflow)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
|
||||
return orgRequiredWorkflow, resp, nil
|
||||
}
|
||||
|
||||
// DeleteRequiredWorkflow deletes a required workflow in an org.
|
||||
//
|
||||
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
|
||||
//
|
||||
//meta:operation DELETE /orgs/{org}/actions/required_workflows/{workflow_id}
|
||||
func (s *ActionsService) DeleteRequiredWorkflow(ctx context.Context, org string, requiredWorkflowID int64) (*Response, error) {
|
||||
url := fmt.Sprintf("orgs/%v/actions/required_workflows/%v", org, requiredWorkflowID)
|
||||
req, err := s.client.NewRequest("DELETE", url, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return s.client.Do(ctx, req, nil)
|
||||
}
|
||||
|
||||
// ListRequiredWorkflowSelectedRepos lists the Repositories selected for a workflow.
|
||||
//
|
||||
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
|
||||
//
|
||||
//meta:operation GET /orgs/{org}/actions/required_workflows/{workflow_id}/repositories
|
||||
func (s *ActionsService) ListRequiredWorkflowSelectedRepos(ctx context.Context, org string, requiredWorkflowID int64, opts *ListOptions) (*RequiredWorkflowSelectedRepos, *Response, error) {
|
||||
url := fmt.Sprintf("orgs/%v/actions/required_workflows/%v/repositories", org, requiredWorkflowID)
|
||||
u, err := addOptions(url, opts)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
req, err := s.client.NewRequest("GET", u, nil)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
requiredWorkflowRepos := new(RequiredWorkflowSelectedRepos)
|
||||
resp, err := s.client.Do(ctx, req, &requiredWorkflowRepos)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
|
||||
return requiredWorkflowRepos, resp, nil
|
||||
}
|
||||
|
||||
// SetRequiredWorkflowSelectedRepos sets the Repositories selected for a workflow.
|
||||
//
|
||||
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
|
||||
//
|
||||
//meta:operation PUT /orgs/{org}/actions/required_workflows/{workflow_id}/repositories
|
||||
func (s *ActionsService) SetRequiredWorkflowSelectedRepos(ctx context.Context, org string, requiredWorkflowID int64, ids SelectedRepoIDs) (*Response, error) {
|
||||
type repoIDs struct {
|
||||
SelectedIDs SelectedRepoIDs `json:"selected_repository_ids"`
|
||||
}
|
||||
url := fmt.Sprintf("orgs/%v/actions/required_workflows/%v/repositories", org, requiredWorkflowID)
|
||||
req, err := s.client.NewRequest("PUT", url, repoIDs{SelectedIDs: ids})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return s.client.Do(ctx, req, nil)
|
||||
}
|
||||
|
||||
// AddRepoToRequiredWorkflow adds the Repository to a required workflow.
|
||||
//
|
||||
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
|
||||
//
|
||||
//meta:operation PUT /orgs/{org}/actions/required_workflows/{workflow_id}/repositories/{repository_id}
|
||||
func (s *ActionsService) AddRepoToRequiredWorkflow(ctx context.Context, org string, requiredWorkflowID, repoID int64) (*Response, error) {
|
||||
url := fmt.Sprintf("orgs/%v/actions/required_workflows/%v/repositories/%v", org, requiredWorkflowID, repoID)
|
||||
req, err := s.client.NewRequest("PUT", url, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return s.client.Do(ctx, req, nil)
|
||||
}
|
||||
|
||||
// RemoveRepoFromRequiredWorkflow removes the Repository from a required workflow.
|
||||
//
|
||||
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
|
||||
//
|
||||
//meta:operation DELETE /orgs/{org}/actions/required_workflows/{workflow_id}/repositories/{repository_id}
|
||||
func (s *ActionsService) RemoveRepoFromRequiredWorkflow(ctx context.Context, org string, requiredWorkflowID, repoID int64) (*Response, error) {
|
||||
url := fmt.Sprintf("orgs/%v/actions/required_workflows/%v/repositories/%v", org, requiredWorkflowID, repoID)
|
||||
req, err := s.client.NewRequest("DELETE", url, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return s.client.Do(ctx, req, nil)
|
||||
}
|
||||
|
||||
// ListRepoRequiredWorkflows lists the RequiredWorkflows for a repo.
|
||||
//
|
||||
// GitHub API docs: https://docs.github.com/actions/using-workflows/required-workflows
|
||||
//
|
||||
//meta:operation GET /repos/{owner}/{repo}/actions/required_workflows
|
||||
func (s *ActionsService) ListRepoRequiredWorkflows(ctx context.Context, owner, repo string, opts *ListOptions) (*RepoRequiredWorkflows, *Response, error) {
|
||||
url := fmt.Sprintf("repos/%v/%v/actions/required_workflows", owner, repo)
|
||||
u, err := addOptions(url, opts)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
req, err := s.client.NewRequest("GET", u, nil)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
requiredWorkflows := new(RepoRequiredWorkflows)
|
||||
resp, err := s.client.Do(ctx, req, &requiredWorkflows)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
|
||||
return requiredWorkflows, resp, nil
|
||||
}
|
||||
|
|
@ -29,6 +29,15 @@ type AdvisoryCWEs struct {
|
|||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// AdvisoryEPSS represents the advisory pertaining to the Exploit Prediction Scoring System.
|
||||
//
|
||||
// For more information, see:
|
||||
// https://github.blog/changelog/2024-10-10-epss-scores-in-the-github-advisory-database/
|
||||
type AdvisoryEPSS struct {
|
||||
Percentage float64 `json:"percentage"`
|
||||
Percentile float64 `json:"percentile"`
|
||||
}
|
||||
|
||||
// DependabotSecurityAdvisory represents the GitHub Security Advisory.
|
||||
type DependabotSecurityAdvisory struct {
|
||||
GHSAID *string `json:"ghsa_id,omitempty"`
|
||||
|
|
@ -39,6 +48,7 @@ type DependabotSecurityAdvisory struct {
|
|||
Severity *string `json:"severity,omitempty"`
|
||||
CVSS *AdvisoryCVSS `json:"cvss,omitempty"`
|
||||
CWEs []*AdvisoryCWEs `json:"cwes,omitempty"`
|
||||
EPSS *AdvisoryEPSS `json:"epss,omitempty"`
|
||||
Identifiers []*AdvisoryIdentifier `json:"identifiers,omitempty"`
|
||||
References []*AdvisoryReference `json:"references,omitempty"`
|
||||
PublishedAt *Timestamp `json:"published_at,omitempty"`
|
||||
|
|
@ -8,7 +8,7 @@ Package github provides a client for using the GitHub API.
|
|||
|
||||
Usage:
|
||||
|
||||
import "github.com/google/go-github/v71/github" // with go modules enabled (GO111MODULE=on or outside GOPATH)
|
||||
import "github.com/google/go-github/v72/github" // with go modules enabled (GO111MODULE=on or outside GOPATH)
|
||||
import "github.com/google/go-github/github" // with go modules disabled
|
||||
|
||||
Construct a new GitHub client, then use the various services on the client to
|
||||
|
|
@ -1446,6 +1446,26 @@ type PushEventRepoOwner struct {
|
|||
Email *string `json:"email,omitempty"`
|
||||
}
|
||||
|
||||
// RegistryPackageEvent represents activity related to GitHub Packages.
|
||||
// The Webhook event name is "registry_package".
|
||||
//
|
||||
// This event is triggered when a GitHub Package is published or updated.
|
||||
//
|
||||
// GitHub API docs: https://docs.github.com/en/webhooks/webhook-events-and-payloads#registry_package
|
||||
type RegistryPackageEvent struct {
|
||||
// Action is the action that was performed.
|
||||
// Can be "published" or "updated".
|
||||
Action *string `json:"action,omitempty"`
|
||||
RegistryPackage *Package `json:"registry_package,omitempty"`
|
||||
Repository *Repository `json:"repository,omitempty"`
|
||||
Organization *Organization `json:"organization,omitempty"`
|
||||
Enterprise *Enterprise `json:"enterprise,omitempty"`
|
||||
Sender *User `json:"sender,omitempty"`
|
||||
|
||||
// The following fields are only populated by Webhook events.
|
||||
Installation *Installation `json:"installation,omitempty"`
|
||||
}
|
||||
|
||||
// ReleaseEvent is triggered when a release is published, unpublished, created,
|
||||
// edited, deleted, or prereleased.
|
||||
// The Webhook event name is "release".
|
||||
|
|
@ -6022,38 +6022,6 @@ func (c *CreateUpdateEnvironment) GetWaitTimer() int {
|
|||
return *c.WaitTimer
|
||||
}
|
||||
|
||||
// GetRepositoryID returns the RepositoryID field if it's non-nil, zero value otherwise.
|
||||
func (c *CreateUpdateRequiredWorkflowOptions) GetRepositoryID() int64 {
|
||||
if c == nil || c.RepositoryID == nil {
|
||||
return 0
|
||||
}
|
||||
return *c.RepositoryID
|
||||
}
|
||||
|
||||
// GetScope returns the Scope field if it's non-nil, zero value otherwise.
|
||||
func (c *CreateUpdateRequiredWorkflowOptions) GetScope() string {
|
||||
if c == nil || c.Scope == nil {
|
||||
return ""
|
||||
}
|
||||
return *c.Scope
|
||||
}
|
||||
|
||||
// GetSelectedRepositoryIDs returns the SelectedRepositoryIDs field.
|
||||
func (c *CreateUpdateRequiredWorkflowOptions) GetSelectedRepositoryIDs() *SelectedRepoIDs {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.SelectedRepositoryIDs
|
||||
}
|
||||
|
||||
// GetWorkflowFilePath returns the WorkflowFilePath field if it's non-nil, zero value otherwise.
|
||||
func (c *CreateUpdateRequiredWorkflowOptions) GetWorkflowFilePath() string {
|
||||
if c == nil || c.WorkflowFilePath == nil {
|
||||
return ""
|
||||
}
|
||||
return *c.WorkflowFilePath
|
||||
}
|
||||
|
||||
// GetEmail returns the Email field if it's non-nil, zero value otherwise.
|
||||
func (c *CreateUserRequest) GetEmail() string {
|
||||
if c == nil || c.Email == nil {
|
||||
|
|
@ -6886,6 +6854,14 @@ func (d *DependabotSecurityAdvisory) GetDescription() string {
|
|||
return *d.Description
|
||||
}
|
||||
|
||||
// GetEPSS returns the EPSS field.
|
||||
func (d *DependabotSecurityAdvisory) GetEPSS() *AdvisoryEPSS {
|
||||
if d == nil {
|
||||
return nil
|
||||
}
|
||||
return d.EPSS
|
||||
}
|
||||
|
||||
// GetGHSAID returns the GHSAID field if it's non-nil, zero value otherwise.
|
||||
func (d *DependabotSecurityAdvisory) GetGHSAID() string {
|
||||
if d == nil || d.GHSAID == nil {
|
||||
|
|
@ -12430,6 +12406,14 @@ func (i *IssueRequest) GetTitle() string {
|
|||
return *i.Title
|
||||
}
|
||||
|
||||
// GetType returns the Type field if it's non-nil, zero value otherwise.
|
||||
func (i *IssueRequest) GetType() string {
|
||||
if i == nil || i.Type == nil {
|
||||
return ""
|
||||
}
|
||||
return *i.Type
|
||||
}
|
||||
|
||||
// GetAction returns the Action field if it's non-nil, zero value otherwise.
|
||||
func (i *IssuesEvent) GetAction() string {
|
||||
if i == nil || i.Action == nil {
|
||||
|
|
@ -15694,94 +15678,6 @@ func (o *OrgBlockEvent) GetSender() *User {
|
|||
return o.Sender
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
|
||||
func (o *OrgRequiredWorkflow) GetCreatedAt() Timestamp {
|
||||
if o == nil || o.CreatedAt == nil {
|
||||
return Timestamp{}
|
||||
}
|
||||
return *o.CreatedAt
|
||||
}
|
||||
|
||||
// GetID returns the ID field if it's non-nil, zero value otherwise.
|
||||
func (o *OrgRequiredWorkflow) GetID() int64 {
|
||||
if o == nil || o.ID == nil {
|
||||
return 0
|
||||
}
|
||||
return *o.ID
|
||||
}
|
||||
|
||||
// GetName returns the Name field if it's non-nil, zero value otherwise.
|
||||
func (o *OrgRequiredWorkflow) GetName() string {
|
||||
if o == nil || o.Name == nil {
|
||||
return ""
|
||||
}
|
||||
return *o.Name
|
||||
}
|
||||
|
||||
// GetPath returns the Path field if it's non-nil, zero value otherwise.
|
||||
func (o *OrgRequiredWorkflow) GetPath() string {
|
||||
if o == nil || o.Path == nil {
|
||||
return ""
|
||||
}
|
||||
return *o.Path
|
||||
}
|
||||
|
||||
// GetRef returns the Ref field if it's non-nil, zero value otherwise.
|
||||
func (o *OrgRequiredWorkflow) GetRef() string {
|
||||
if o == nil || o.Ref == nil {
|
||||
return ""
|
||||
}
|
||||
return *o.Ref
|
||||
}
|
||||
|
||||
// GetRepository returns the Repository field.
|
||||
func (o *OrgRequiredWorkflow) GetRepository() *Repository {
|
||||
if o == nil {
|
||||
return nil
|
||||
}
|
||||
return o.Repository
|
||||
}
|
||||
|
||||
// GetScope returns the Scope field if it's non-nil, zero value otherwise.
|
||||
func (o *OrgRequiredWorkflow) GetScope() string {
|
||||
if o == nil || o.Scope == nil {
|
||||
return ""
|
||||
}
|
||||
return *o.Scope
|
||||
}
|
||||
|
||||
// GetSelectedRepositoriesURL returns the SelectedRepositoriesURL field if it's non-nil, zero value otherwise.
|
||||
func (o *OrgRequiredWorkflow) GetSelectedRepositoriesURL() string {
|
||||
if o == nil || o.SelectedRepositoriesURL == nil {
|
||||
return ""
|
||||
}
|
||||
return *o.SelectedRepositoriesURL
|
||||
}
|
||||
|
||||
// GetState returns the State field if it's non-nil, zero value otherwise.
|
||||
func (o *OrgRequiredWorkflow) GetState() string {
|
||||
if o == nil || o.State == nil {
|
||||
return ""
|
||||
}
|
||||
return *o.State
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
|
||||
func (o *OrgRequiredWorkflow) GetUpdatedAt() Timestamp {
|
||||
if o == nil || o.UpdatedAt == nil {
|
||||
return Timestamp{}
|
||||
}
|
||||
return *o.UpdatedAt
|
||||
}
|
||||
|
||||
// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise.
|
||||
func (o *OrgRequiredWorkflows) GetTotalCount() int {
|
||||
if o == nil || o.TotalCount == nil {
|
||||
return 0
|
||||
}
|
||||
return *o.TotalCount
|
||||
}
|
||||
|
||||
// GetDisabledOrgs returns the DisabledOrgs field if it's non-nil, zero value otherwise.
|
||||
func (o *OrgStats) GetDisabledOrgs() int {
|
||||
if o == nil || o.DisabledOrgs == nil {
|
||||
|
|
@ -20982,6 +20878,62 @@ func (r *RegistrationToken) GetToken() string {
|
|||
return *r.Token
|
||||
}
|
||||
|
||||
// GetAction returns the Action field if it's non-nil, zero value otherwise.
|
||||
func (r *RegistryPackageEvent) GetAction() string {
|
||||
if r == nil || r.Action == nil {
|
||||
return ""
|
||||
}
|
||||
return *r.Action
|
||||
}
|
||||
|
||||
// GetEnterprise returns the Enterprise field.
|
||||
func (r *RegistryPackageEvent) GetEnterprise() *Enterprise {
|
||||
if r == nil {
|
||||
return nil
|
||||
}
|
||||
return r.Enterprise
|
||||
}
|
||||
|
||||
// GetInstallation returns the Installation field.
|
||||
func (r *RegistryPackageEvent) GetInstallation() *Installation {
|
||||
if r == nil {
|
||||
return nil
|
||||
}
|
||||
return r.Installation
|
||||
}
|
||||
|
||||
// GetOrganization returns the Organization field.
|
||||
func (r *RegistryPackageEvent) GetOrganization() *Organization {
|
||||
if r == nil {
|
||||
return nil
|
||||
}
|
||||
return r.Organization
|
||||
}
|
||||
|
||||
// GetRegistryPackage returns the RegistryPackage field.
|
||||
func (r *RegistryPackageEvent) GetRegistryPackage() *Package {
|
||||
if r == nil {
|
||||
return nil
|
||||
}
|
||||
return r.RegistryPackage
|
||||
}
|
||||
|
||||
// GetRepository returns the Repository field.
|
||||
func (r *RegistryPackageEvent) GetRepository() *Repository {
|
||||
if r == nil {
|
||||
return nil
|
||||
}
|
||||
return r.Repository
|
||||
}
|
||||
|
||||
// GetSender returns the Sender field.
|
||||
func (r *RegistryPackageEvent) GetSender() *User {
|
||||
if r == nil {
|
||||
return nil
|
||||
}
|
||||
return r.Sender
|
||||
}
|
||||
|
||||
// GetBrowserDownloadURL returns the BrowserDownloadURL field if it's non-nil, zero value otherwise.
|
||||
func (r *ReleaseAsset) GetBrowserDownloadURL() string {
|
||||
if r == nil || r.BrowserDownloadURL == nil {
|
||||
|
|
@ -21350,102 +21302,6 @@ func (r *RepoName) GetFrom() string {
|
|||
return *r.From
|
||||
}
|
||||
|
||||
// GetBadgeURL returns the BadgeURL field if it's non-nil, zero value otherwise.
|
||||
func (r *RepoRequiredWorkflow) GetBadgeURL() string {
|
||||
if r == nil || r.BadgeURL == nil {
|
||||
return ""
|
||||
}
|
||||
return *r.BadgeURL
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
|
||||
func (r *RepoRequiredWorkflow) GetCreatedAt() Timestamp {
|
||||
if r == nil || r.CreatedAt == nil {
|
||||
return Timestamp{}
|
||||
}
|
||||
return *r.CreatedAt
|
||||
}
|
||||
|
||||
// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise.
|
||||
func (r *RepoRequiredWorkflow) GetHTMLURL() string {
|
||||
if r == nil || r.HTMLURL == nil {
|
||||
return ""
|
||||
}
|
||||
return *r.HTMLURL
|
||||
}
|
||||
|
||||
// GetID returns the ID field if it's non-nil, zero value otherwise.
|
||||
func (r *RepoRequiredWorkflow) GetID() int64 {
|
||||
if r == nil || r.ID == nil {
|
||||
return 0
|
||||
}
|
||||
return *r.ID
|
||||
}
|
||||
|
||||
// GetName returns the Name field if it's non-nil, zero value otherwise.
|
||||
func (r *RepoRequiredWorkflow) GetName() string {
|
||||
if r == nil || r.Name == nil {
|
||||
return ""
|
||||
}
|
||||
return *r.Name
|
||||
}
|
||||
|
||||
// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise.
|
||||
func (r *RepoRequiredWorkflow) GetNodeID() string {
|
||||
if r == nil || r.NodeID == nil {
|
||||
return ""
|
||||
}
|
||||
return *r.NodeID
|
||||
}
|
||||
|
||||
// GetPath returns the Path field if it's non-nil, zero value otherwise.
|
||||
func (r *RepoRequiredWorkflow) GetPath() string {
|
||||
if r == nil || r.Path == nil {
|
||||
return ""
|
||||
}
|
||||
return *r.Path
|
||||
}
|
||||
|
||||
// GetSourceRepository returns the SourceRepository field.
|
||||
func (r *RepoRequiredWorkflow) GetSourceRepository() *Repository {
|
||||
if r == nil {
|
||||
return nil
|
||||
}
|
||||
return r.SourceRepository
|
||||
}
|
||||
|
||||
// GetState returns the State field if it's non-nil, zero value otherwise.
|
||||
func (r *RepoRequiredWorkflow) GetState() string {
|
||||
if r == nil || r.State == nil {
|
||||
return ""
|
||||
}
|
||||
return *r.State
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
|
||||
func (r *RepoRequiredWorkflow) GetUpdatedAt() Timestamp {
|
||||
if r == nil || r.UpdatedAt == nil {
|
||||
return Timestamp{}
|
||||
}
|
||||
return *r.UpdatedAt
|
||||
}
|
||||
|
||||
// GetURL returns the URL field if it's non-nil, zero value otherwise.
|
||||
func (r *RepoRequiredWorkflow) GetURL() string {
|
||||
if r == nil || r.URL == nil {
|
||||
return ""
|
||||
}
|
||||
return *r.URL
|
||||
}
|
||||
|
||||
// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise.
|
||||
func (r *RepoRequiredWorkflows) GetTotalCount() int {
|
||||
if r == nil || r.TotalCount == nil {
|
||||
return 0
|
||||
}
|
||||
return *r.TotalCount
|
||||
}
|
||||
|
||||
// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise.
|
||||
func (r *RepositoriesSearchResult) GetIncompleteResults() bool {
|
||||
if r == nil || r.IncompleteResults == nil {
|
||||
|
|
@ -22934,6 +22790,14 @@ func (r *RepositoryLicense) GetURL() string {
|
|||
return *r.URL
|
||||
}
|
||||
|
||||
// GetIncludesParents returns the IncludesParents field if it's non-nil, zero value otherwise.
|
||||
func (r *RepositoryListRulesetsOptions) GetIncludesParents() bool {
|
||||
if r == nil || r.IncludesParents == nil {
|
||||
return false
|
||||
}
|
||||
return *r.IncludesParents
|
||||
}
|
||||
|
||||
// GetBase returns the Base field if it's non-nil, zero value otherwise.
|
||||
func (r *RepositoryMergeRequest) GetBase() string {
|
||||
if r == nil || r.Base == nil {
|
||||
|
|
@ -24078,14 +23942,6 @@ func (r *RequiredStatusChecksRuleParameters) GetDoNotEnforceOnCreate() bool {
|
|||
return *r.DoNotEnforceOnCreate
|
||||
}
|
||||
|
||||
// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise.
|
||||
func (r *RequiredWorkflowSelectedRepos) GetTotalCount() int {
|
||||
if r == nil || r.TotalCount == nil {
|
||||
return 0
|
||||
}
|
||||
return *r.TotalCount
|
||||
}
|
||||
|
||||
// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise.
|
||||
func (r *ReviewersRequest) GetNodeID() string {
|
||||
if r == nil || r.NodeID == nil {
|
||||
|
|
@ -24846,6 +24702,14 @@ func (s *SecretScanningAlert) GetHTMLURL() string {
|
|||
return *s.HTMLURL
|
||||
}
|
||||
|
||||
// GetIsBase64Encoded returns the IsBase64Encoded field if it's non-nil, zero value otherwise.
|
||||
func (s *SecretScanningAlert) GetIsBase64Encoded() bool {
|
||||
if s == nil || s.IsBase64Encoded == nil {
|
||||
return false
|
||||
}
|
||||
return *s.IsBase64Encoded
|
||||
}
|
||||
|
||||
// GetLocationsURL returns the LocationsURL field if it's non-nil, zero value otherwise.
|
||||
func (s *SecretScanningAlert) GetLocationsURL() string {
|
||||
if s == nil || s.LocationsURL == nil {
|
||||
|
|
@ -24854,6 +24718,14 @@ func (s *SecretScanningAlert) GetLocationsURL() string {
|
|||
return *s.LocationsURL
|
||||
}
|
||||
|
||||
// GetMultiRepo returns the MultiRepo field if it's non-nil, zero value otherwise.
|
||||
func (s *SecretScanningAlert) GetMultiRepo() bool {
|
||||
if s == nil || s.MultiRepo == nil {
|
||||
return false
|
||||
}
|
||||
return *s.MultiRepo
|
||||
}
|
||||
|
||||
// GetNumber returns the Number field if it's non-nil, zero value otherwise.
|
||||
func (s *SecretScanningAlert) GetNumber() int {
|
||||
if s == nil || s.Number == nil {
|
||||
|
|
@ -24862,6 +24734,14 @@ func (s *SecretScanningAlert) GetNumber() int {
|
|||
return *s.Number
|
||||
}
|
||||
|
||||
// GetPubliclyLeaked returns the PubliclyLeaked field if it's non-nil, zero value otherwise.
|
||||
func (s *SecretScanningAlert) GetPubliclyLeaked() bool {
|
||||
if s == nil || s.PubliclyLeaked == nil {
|
||||
return false
|
||||
}
|
||||
return *s.PubliclyLeaked
|
||||
}
|
||||
|
||||
// GetPushProtectionBypassed returns the PushProtectionBypassed field if it's non-nil, zero value otherwise.
|
||||
func (s *SecretScanningAlert) GetPushProtectionBypassed() bool {
|
||||
if s == nil || s.PushProtectionBypassed == nil {
|
||||
|
|
@ -24886,6 +24766,38 @@ func (s *SecretScanningAlert) GetPushProtectionBypassedBy() *User {
|
|||
return s.PushProtectionBypassedBy
|
||||
}
|
||||
|
||||
// GetPushProtectionBypassRequestComment returns the PushProtectionBypassRequestComment field if it's non-nil, zero value otherwise.
|
||||
func (s *SecretScanningAlert) GetPushProtectionBypassRequestComment() string {
|
||||
if s == nil || s.PushProtectionBypassRequestComment == nil {
|
||||
return ""
|
||||
}
|
||||
return *s.PushProtectionBypassRequestComment
|
||||
}
|
||||
|
||||
// GetPushProtectionBypassRequestHTMLURL returns the PushProtectionBypassRequestHTMLURL field if it's non-nil, zero value otherwise.
|
||||
func (s *SecretScanningAlert) GetPushProtectionBypassRequestHTMLURL() string {
|
||||
if s == nil || s.PushProtectionBypassRequestHTMLURL == nil {
|
||||
return ""
|
||||
}
|
||||
return *s.PushProtectionBypassRequestHTMLURL
|
||||
}
|
||||
|
||||
// GetPushProtectionBypassRequestReviewer returns the PushProtectionBypassRequestReviewer field.
|
||||
func (s *SecretScanningAlert) GetPushProtectionBypassRequestReviewer() *User {
|
||||
if s == nil {
|
||||
return nil
|
||||
}
|
||||
return s.PushProtectionBypassRequestReviewer
|
||||
}
|
||||
|
||||
// GetPushProtectionBypassRequestReviewerComment returns the PushProtectionBypassRequestReviewerComment field if it's non-nil, zero value otherwise.
|
||||
func (s *SecretScanningAlert) GetPushProtectionBypassRequestReviewerComment() string {
|
||||
if s == nil || s.PushProtectionBypassRequestReviewerComment == nil {
|
||||
return ""
|
||||
}
|
||||
return *s.PushProtectionBypassRequestReviewerComment
|
||||
}
|
||||
|
||||
// GetRepository returns the Repository field.
|
||||
func (s *SecretScanningAlert) GetRepository() *Repository {
|
||||
if s == nil {
|
||||
|
|
@ -24974,6 +24886,14 @@ func (s *SecretScanningAlert) GetURL() string {
|
|||
return *s.URL
|
||||
}
|
||||
|
||||
// GetValidity returns the Validity field if it's non-nil, zero value otherwise.
|
||||
func (s *SecretScanningAlert) GetValidity() string {
|
||||
if s == nil || s.Validity == nil {
|
||||
return ""
|
||||
}
|
||||
return *s.Validity
|
||||
}
|
||||
|
||||
// GetAction returns the Action field if it's non-nil, zero value otherwise.
|
||||
func (s *SecretScanningAlertEvent) GetAction() string {
|
||||
if s == nil || s.Action == nil {
|
||||
|
|
@ -29,7 +29,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
Version = "v71.0.0"
|
||||
Version = "v72.0.0"
|
||||
|
||||
defaultAPIVersion = "2022-11-28"
|
||||
defaultBaseURL = "https://api.github.com/"
|
||||
|
|
@ -90,6 +90,7 @@ type IssueRequest struct {
|
|||
StateReason *string `json:"state_reason,omitempty"`
|
||||
Milestone *int `json:"milestone,omitempty"`
|
||||
Assignees *[]string `json:"assignees,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// IssueListOptions specifies the optional parameters to the IssuesService.List
|
||||
|
|
@ -117,6 +118,10 @@ type IssueListOptions struct {
|
|||
// Since filters issues by time.
|
||||
Since time.Time `url:"since,omitempty"`
|
||||
|
||||
ListCursorOptions
|
||||
|
||||
// Add ListOptions so offset pagination with integer type "page" query parameter is accepted
|
||||
// since ListCursorOptions accepts "page" as string only.
|
||||
ListOptions
|
||||
}
|
||||
|
||||
|
|
@ -233,6 +238,10 @@ type IssueListByRepoOptions struct {
|
|||
// Since filters issues by time.
|
||||
Since time.Time `url:"since,omitempty"`
|
||||
|
||||
ListCursorOptions
|
||||
|
||||
// Add ListOptions so offset pagination with integer type "page" query parameter is accepted
|
||||
// since ListCursorOptions accepts "page" as string only.
|
||||
ListOptions
|
||||
}
|
||||
|
||||
|
|
@ -95,6 +95,7 @@ var (
|
|||
"pull_request_review_thread": &PullRequestReviewThreadEvent{},
|
||||
"pull_request_target": &PullRequestTargetEvent{},
|
||||
"push": &PushEvent{},
|
||||
"registry_package": &RegistryPackageEvent{},
|
||||
"repository": &RepositoryEvent{},
|
||||
"repository_dispatch": &RepositoryDispatchEvent{},
|
||||
"repository_import": &RepositoryImportEvent{},
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue