diff --git a/go.mod b/go.mod index 745a51a0..e2ca6abf 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/BurntSushi/toml v0.4.1 github.com/go-resty/resty/v2 v2.7.0 github.com/golang-jwt/jwt v3.2.2+incompatible - github.com/google/go-github/v47 v47.1.0 + github.com/google/go-github/v48 v48.0.0 github.com/google/uuid v1.3.0 github.com/gorilla/handlers v1.5.1 github.com/gorilla/mux v1.8.0 @@ -71,5 +71,3 @@ require ( gopkg.in/macaroon-bakery.v2 v2.3.0 // indirect gopkg.in/macaroon.v2 v2.1.0 // indirect ) - -replace github.com/google/go-github/v47 => github.com/gabriel-samfira/go-github/v47 v47.1.1-0.20221013145953-21e3b4d7b0c1 diff --git a/go.sum b/go.sum index 09a99715..5813b8f0 100644 --- a/go.sum +++ b/go.sum @@ -64,8 +64,6 @@ github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03D github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= -github.com/gabriel-samfira/go-github/v47 v47.1.1-0.20221013145953-21e3b4d7b0c1 h1:CNZ1asZM2ABO6DLFPS86CkGMEp5nFSQnpAECOOhYBGo= -github.com/gabriel-samfira/go-github/v47 v47.1.1-0.20221013145953-21e3b4d7b0c1/go.mod h1:VPZBXNbFSJGjyjFRUKo9vZGawTajnWzC/YjGw/oFKi0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -119,6 +117,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-github/v48 v48.0.0 h1:9H5fWVXFK6ZsRriyPbjtnFAkJnoj0WKFtTYfpCRrTm8= +github.com/google/go-github/v48 v48.0.0/go.mod h1:dDlehKBDo850ZPvCTK0sEqTCVWcrGl2LcDiajkYi89Y= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= diff --git a/params/params.go b/params/params.go index ed0f3105..b2807db0 100644 --- a/params/params.go +++ b/params/params.go @@ -19,7 +19,7 @@ import ( "garm/runner/providers/common" "time" - "github.com/google/go-github/v47/github" + "github.com/google/go-github/v48/github" uuid "github.com/satori/go.uuid" ) diff --git a/runner/common/mocks/GithubClient.go b/runner/common/mocks/GithubClient.go index 4f1ae8dc..b8db134a 100644 --- a/runner/common/mocks/GithubClient.go +++ b/runner/common/mocks/GithubClient.go @@ -5,7 +5,7 @@ package mocks import ( context "context" - github "github.com/google/go-github/v47/github" + github "github.com/google/go-github/v48/github" mock "github.com/stretchr/testify/mock" ) diff --git a/runner/common/mocks/GithubEnterpriseClient.go b/runner/common/mocks/GithubEnterpriseClient.go index c7cea9c4..741d139c 100644 --- a/runner/common/mocks/GithubEnterpriseClient.go +++ b/runner/common/mocks/GithubEnterpriseClient.go @@ -5,7 +5,7 @@ package mocks import ( context "context" - github "github.com/google/go-github/v47/github" + github "github.com/google/go-github/v48/github" mock "github.com/stretchr/testify/mock" ) diff --git a/runner/common/util.go b/runner/common/util.go index 16ee2133..554da767 100644 --- a/runner/common/util.go +++ b/runner/common/util.go @@ -3,7 +3,7 @@ package common import ( "context" - "github.com/google/go-github/v47/github" + "github.com/google/go-github/v48/github" ) // GithubClient that describes the minimum list of functions we need to interact with github. diff --git a/runner/pool/enterprise.go b/runner/pool/enterprise.go index 8fe57b4d..c2de3cd8 100644 --- a/runner/pool/enterprise.go +++ b/runner/pool/enterprise.go @@ -12,7 +12,7 @@ import ( "garm/runner/common" "garm/util" - "github.com/google/go-github/v47/github" + "github.com/google/go-github/v48/github" "github.com/pkg/errors" ) diff --git a/runner/pool/interfaces.go b/runner/pool/interfaces.go index 7e5a87ee..4ccece01 100644 --- a/runner/pool/interfaces.go +++ b/runner/pool/interfaces.go @@ -17,7 +17,7 @@ package pool import ( "garm/params" - "github.com/google/go-github/v47/github" + "github.com/google/go-github/v48/github" ) type poolHelper interface { diff --git a/runner/pool/organization.go b/runner/pool/organization.go index 25b5d692..3ab36c62 100644 --- a/runner/pool/organization.go +++ b/runner/pool/organization.go @@ -26,7 +26,7 @@ import ( "garm/runner/common" "garm/util" - "github.com/google/go-github/v47/github" + "github.com/google/go-github/v48/github" "github.com/pkg/errors" ) diff --git a/runner/pool/pool.go b/runner/pool/pool.go index 9a39f28f..8898d51d 100644 --- a/runner/pool/pool.go +++ b/runner/pool/pool.go @@ -30,7 +30,7 @@ import ( "garm/runner/common" providerCommon "garm/runner/providers/common" - "github.com/google/go-github/v47/github" + "github.com/google/go-github/v48/github" "github.com/google/uuid" "github.com/pkg/errors" ) diff --git a/runner/pool/repository.go b/runner/pool/repository.go index 8fd9b8e6..864bcab3 100644 --- a/runner/pool/repository.go +++ b/runner/pool/repository.go @@ -26,7 +26,7 @@ import ( "garm/runner/common" "garm/util" - "github.com/google/go-github/v47/github" + "github.com/google/go-github/v48/github" "github.com/pkg/errors" ) diff --git a/runner/providers/lxd/lxd.go b/runner/providers/lxd/lxd.go index 6d19cb3f..32bf794a 100644 --- a/runner/providers/lxd/lxd.go +++ b/runner/providers/lxd/lxd.go @@ -25,7 +25,7 @@ import ( "garm/runner/common" "garm/util" - "github.com/google/go-github/v47/github" + "github.com/google/go-github/v48/github" lxd "github.com/lxc/lxd/client" "github.com/lxc/lxd/shared/api" "github.com/pkg/errors" diff --git a/util/util.go b/util/util.go index 3d7065c7..8658f6a5 100644 --- a/util/util.go +++ b/util/util.go @@ -38,7 +38,7 @@ import ( "garm/params" "garm/runner/common" - "github.com/google/go-github/v47/github" + "github.com/google/go-github/v48/github" "github.com/pkg/errors" "golang.org/x/crypto/bcrypt" "golang.org/x/oauth2" diff --git a/vendor/github.com/google/go-github/v47/github/orgs_custom_roles.go b/vendor/github.com/google/go-github/v47/github/orgs_custom_roles.go deleted file mode 100644 index 9904685b..00000000 --- a/vendor/github.com/google/go-github/v47/github/orgs_custom_roles.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 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" -) - -// OrganizationCustomRepoRoles represents custom repository roles available in specified organization. -type OrganizationCustomRepoRoles struct { - TotalCount *int `json:"total_count,omitempty"` - CustomRepoRoles []*CustomRepoRoles `json:"custom_roles,omitempty"` -} - -// CustomRepoRoles represents custom repository roles for an organization. -// See https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization -// for more information. -type CustomRepoRoles struct { - ID *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// ListCustomRepoRoles lists the custom repository roles available in this organization. -// In order to see custom repository roles in an organization, the authenticated user must be an organization owner. -// -// GitHub API docs: https://docs.github.com/en/rest/orgs/custom-roles#list-custom-repository-roles-in-an-organization -func (s *OrganizationsService) ListCustomRepoRoles(ctx context.Context, org string) (*OrganizationCustomRepoRoles, *Response, error) { - u := fmt.Sprintf("orgs/%v/custom_roles", org) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - customRepoRoles := new(OrganizationCustomRepoRoles) - resp, err := s.client.Do(ctx, req, customRepoRoles) - if err != nil { - return nil, resp, err - } - - return customRepoRoles, resp, nil -} diff --git a/vendor/github.com/google/go-github/v47/AUTHORS b/vendor/github.com/google/go-github/v48/AUTHORS similarity index 99% rename from vendor/github.com/google/go-github/v47/AUTHORS rename to vendor/github.com/google/go-github/v48/AUTHORS index 80bd26dd..1ee400fe 100644 --- a/vendor/github.com/google/go-github/v47/AUTHORS +++ b/vendor/github.com/google/go-github/v48/AUTHORS @@ -59,6 +59,7 @@ Beyang Liu Billy Keyes Billy Lynch Björn Häuser +Bjorn Neergaard boljen Brad Harris Brad Moylan diff --git a/vendor/github.com/google/go-github/v47/LICENSE b/vendor/github.com/google/go-github/v48/LICENSE similarity index 100% rename from vendor/github.com/google/go-github/v47/LICENSE rename to vendor/github.com/google/go-github/v48/LICENSE diff --git a/vendor/github.com/google/go-github/v47/github/actions.go b/vendor/github.com/google/go-github/v48/github/actions.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/actions.go rename to vendor/github.com/google/go-github/v48/github/actions.go diff --git a/vendor/github.com/google/go-github/v47/github/actions_artifacts.go b/vendor/github.com/google/go-github/v48/github/actions_artifacts.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/actions_artifacts.go rename to vendor/github.com/google/go-github/v48/github/actions_artifacts.go diff --git a/vendor/github.com/google/go-github/v47/github/actions_runner_groups.go b/vendor/github.com/google/go-github/v48/github/actions_runner_groups.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/actions_runner_groups.go rename to vendor/github.com/google/go-github/v48/github/actions_runner_groups.go diff --git a/vendor/github.com/google/go-github/v47/github/actions_runners.go b/vendor/github.com/google/go-github/v48/github/actions_runners.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/actions_runners.go rename to vendor/github.com/google/go-github/v48/github/actions_runners.go diff --git a/vendor/github.com/google/go-github/v47/github/actions_secrets.go b/vendor/github.com/google/go-github/v48/github/actions_secrets.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/actions_secrets.go rename to vendor/github.com/google/go-github/v48/github/actions_secrets.go diff --git a/vendor/github.com/google/go-github/v47/github/actions_workflow_jobs.go b/vendor/github.com/google/go-github/v48/github/actions_workflow_jobs.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/actions_workflow_jobs.go rename to vendor/github.com/google/go-github/v48/github/actions_workflow_jobs.go diff --git a/vendor/github.com/google/go-github/v47/github/actions_workflow_runs.go b/vendor/github.com/google/go-github/v48/github/actions_workflow_runs.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/actions_workflow_runs.go rename to vendor/github.com/google/go-github/v48/github/actions_workflow_runs.go diff --git a/vendor/github.com/google/go-github/v47/github/actions_workflows.go b/vendor/github.com/google/go-github/v48/github/actions_workflows.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/actions_workflows.go rename to vendor/github.com/google/go-github/v48/github/actions_workflows.go diff --git a/vendor/github.com/google/go-github/v47/github/activity.go b/vendor/github.com/google/go-github/v48/github/activity.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/activity.go rename to vendor/github.com/google/go-github/v48/github/activity.go diff --git a/vendor/github.com/google/go-github/v47/github/activity_events.go b/vendor/github.com/google/go-github/v48/github/activity_events.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/activity_events.go rename to vendor/github.com/google/go-github/v48/github/activity_events.go diff --git a/vendor/github.com/google/go-github/v47/github/activity_notifications.go b/vendor/github.com/google/go-github/v48/github/activity_notifications.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/activity_notifications.go rename to vendor/github.com/google/go-github/v48/github/activity_notifications.go diff --git a/vendor/github.com/google/go-github/v47/github/activity_star.go b/vendor/github.com/google/go-github/v48/github/activity_star.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/activity_star.go rename to vendor/github.com/google/go-github/v48/github/activity_star.go diff --git a/vendor/github.com/google/go-github/v47/github/activity_watching.go b/vendor/github.com/google/go-github/v48/github/activity_watching.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/activity_watching.go rename to vendor/github.com/google/go-github/v48/github/activity_watching.go diff --git a/vendor/github.com/google/go-github/v47/github/admin.go b/vendor/github.com/google/go-github/v48/github/admin.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/admin.go rename to vendor/github.com/google/go-github/v48/github/admin.go diff --git a/vendor/github.com/google/go-github/v47/github/admin_orgs.go b/vendor/github.com/google/go-github/v48/github/admin_orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/admin_orgs.go rename to vendor/github.com/google/go-github/v48/github/admin_orgs.go diff --git a/vendor/github.com/google/go-github/v47/github/admin_stats.go b/vendor/github.com/google/go-github/v48/github/admin_stats.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/admin_stats.go rename to vendor/github.com/google/go-github/v48/github/admin_stats.go diff --git a/vendor/github.com/google/go-github/v47/github/admin_users.go b/vendor/github.com/google/go-github/v48/github/admin_users.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/admin_users.go rename to vendor/github.com/google/go-github/v48/github/admin_users.go diff --git a/vendor/github.com/google/go-github/v47/github/apps.go b/vendor/github.com/google/go-github/v48/github/apps.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/apps.go rename to vendor/github.com/google/go-github/v48/github/apps.go diff --git a/vendor/github.com/google/go-github/v47/github/apps_hooks.go b/vendor/github.com/google/go-github/v48/github/apps_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/apps_hooks.go rename to vendor/github.com/google/go-github/v48/github/apps_hooks.go diff --git a/vendor/github.com/google/go-github/v47/github/apps_hooks_deliveries.go b/vendor/github.com/google/go-github/v48/github/apps_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/apps_hooks_deliveries.go rename to vendor/github.com/google/go-github/v48/github/apps_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v47/github/apps_installation.go b/vendor/github.com/google/go-github/v48/github/apps_installation.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/apps_installation.go rename to vendor/github.com/google/go-github/v48/github/apps_installation.go diff --git a/vendor/github.com/google/go-github/v47/github/apps_manifest.go b/vendor/github.com/google/go-github/v48/github/apps_manifest.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/apps_manifest.go rename to vendor/github.com/google/go-github/v48/github/apps_manifest.go diff --git a/vendor/github.com/google/go-github/v47/github/apps_marketplace.go b/vendor/github.com/google/go-github/v48/github/apps_marketplace.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/apps_marketplace.go rename to vendor/github.com/google/go-github/v48/github/apps_marketplace.go diff --git a/vendor/github.com/google/go-github/v47/github/authorizations.go b/vendor/github.com/google/go-github/v48/github/authorizations.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/authorizations.go rename to vendor/github.com/google/go-github/v48/github/authorizations.go diff --git a/vendor/github.com/google/go-github/v47/github/billing.go b/vendor/github.com/google/go-github/v48/github/billing.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/billing.go rename to vendor/github.com/google/go-github/v48/github/billing.go diff --git a/vendor/github.com/google/go-github/v47/github/checks.go b/vendor/github.com/google/go-github/v48/github/checks.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/checks.go rename to vendor/github.com/google/go-github/v48/github/checks.go diff --git a/vendor/github.com/google/go-github/v47/github/code-scanning.go b/vendor/github.com/google/go-github/v48/github/code-scanning.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/code-scanning.go rename to vendor/github.com/google/go-github/v48/github/code-scanning.go diff --git a/vendor/github.com/google/go-github/v47/github/dependabot.go b/vendor/github.com/google/go-github/v48/github/dependabot.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/dependabot.go rename to vendor/github.com/google/go-github/v48/github/dependabot.go diff --git a/vendor/github.com/google/go-github/v47/github/dependabot_secrets.go b/vendor/github.com/google/go-github/v48/github/dependabot_secrets.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/dependabot_secrets.go rename to vendor/github.com/google/go-github/v48/github/dependabot_secrets.go diff --git a/vendor/github.com/google/go-github/v47/github/doc.go b/vendor/github.com/google/go-github/v48/github/doc.go similarity index 99% rename from vendor/github.com/google/go-github/v47/github/doc.go rename to vendor/github.com/google/go-github/v48/github/doc.go index 9ab7f558..0c4afaa3 100644 --- a/vendor/github.com/google/go-github/v47/github/doc.go +++ b/vendor/github.com/google/go-github/v48/github/doc.go @@ -8,7 +8,7 @@ Package github provides a client for using the GitHub API. Usage: - import "github.com/google/go-github/v47/github" // with go modules enabled (GO111MODULE=on or outside GOPATH) + import "github.com/google/go-github/v48/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 diff --git a/vendor/github.com/google/go-github/v47/github/enterprise.go b/vendor/github.com/google/go-github/v48/github/enterprise.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/enterprise.go rename to vendor/github.com/google/go-github/v48/github/enterprise.go diff --git a/vendor/github.com/google/go-github/v47/github/enterprise_actions_runners.go b/vendor/github.com/google/go-github/v48/github/enterprise_actions_runners.go similarity index 97% rename from vendor/github.com/google/go-github/v47/github/enterprise_actions_runners.go rename to vendor/github.com/google/go-github/v48/github/enterprise_actions_runners.go index 935f1897..daafc5e6 100644 --- a/vendor/github.com/google/go-github/v47/github/enterprise_actions_runners.go +++ b/vendor/github.com/google/go-github/v48/github/enterprise_actions_runners.go @@ -12,7 +12,7 @@ import ( // ListRunnerApplicationDownloads lists self-hosted runner application binaries that can be downloaded and run. // -// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runners#list-runner-applications-for-a-repository +// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runners#list-runner-applications-for-an-enterprise func (s *EnterpriseService) ListRunnerApplicationDownloads(ctx context.Context, enterprise string) ([]*RunnerApplicationDownload, *Response, error) { u := fmt.Sprintf("enterprises/%v/actions/runners/downloads", enterprise) req, err := s.client.NewRequest("GET", u, nil) diff --git a/vendor/github.com/google/go-github/v47/github/enterprise_audit_log.go b/vendor/github.com/google/go-github/v48/github/enterprise_audit_log.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/enterprise_audit_log.go rename to vendor/github.com/google/go-github/v48/github/enterprise_audit_log.go diff --git a/vendor/github.com/google/go-github/v47/github/event.go b/vendor/github.com/google/go-github/v48/github/event.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/event.go rename to vendor/github.com/google/go-github/v48/github/event.go diff --git a/vendor/github.com/google/go-github/v47/github/event_types.go b/vendor/github.com/google/go-github/v48/github/event_types.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/event_types.go rename to vendor/github.com/google/go-github/v48/github/event_types.go diff --git a/vendor/github.com/google/go-github/v47/github/gists.go b/vendor/github.com/google/go-github/v48/github/gists.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/gists.go rename to vendor/github.com/google/go-github/v48/github/gists.go diff --git a/vendor/github.com/google/go-github/v47/github/gists_comments.go b/vendor/github.com/google/go-github/v48/github/gists_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/gists_comments.go rename to vendor/github.com/google/go-github/v48/github/gists_comments.go diff --git a/vendor/github.com/google/go-github/v47/github/git.go b/vendor/github.com/google/go-github/v48/github/git.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/git.go rename to vendor/github.com/google/go-github/v48/github/git.go diff --git a/vendor/github.com/google/go-github/v47/github/git_blobs.go b/vendor/github.com/google/go-github/v48/github/git_blobs.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/git_blobs.go rename to vendor/github.com/google/go-github/v48/github/git_blobs.go diff --git a/vendor/github.com/google/go-github/v47/github/git_commits.go b/vendor/github.com/google/go-github/v48/github/git_commits.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/git_commits.go rename to vendor/github.com/google/go-github/v48/github/git_commits.go diff --git a/vendor/github.com/google/go-github/v47/github/git_refs.go b/vendor/github.com/google/go-github/v48/github/git_refs.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/git_refs.go rename to vendor/github.com/google/go-github/v48/github/git_refs.go diff --git a/vendor/github.com/google/go-github/v47/github/git_tags.go b/vendor/github.com/google/go-github/v48/github/git_tags.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/git_tags.go rename to vendor/github.com/google/go-github/v48/github/git_tags.go diff --git a/vendor/github.com/google/go-github/v47/github/git_trees.go b/vendor/github.com/google/go-github/v48/github/git_trees.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/git_trees.go rename to vendor/github.com/google/go-github/v48/github/git_trees.go diff --git a/vendor/github.com/google/go-github/v47/github/github-accessors.go b/vendor/github.com/google/go-github/v48/github/github-accessors.go similarity index 98% rename from vendor/github.com/google/go-github/v47/github/github-accessors.go rename to vendor/github.com/google/go-github/v48/github/github-accessors.go index 398ed7a3..42b1abc8 100644 --- a/vendor/github.com/google/go-github/v47/github/github-accessors.go +++ b/vendor/github.com/google/go-github/v48/github/github-accessors.go @@ -86,6 +86,14 @@ func (a *ActionsPermissionsRepository) GetSelectedActionsURL() string { return *a.SelectedActionsURL } +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (a *AdminEnforcedChanges) GetFrom() bool { + if a == nil || a.From == nil { + return false + } + return *a.From +} + // GetURL returns the URL field if it's non-nil, zero value otherwise. func (a *AdminEnforcement) GetURL() string { if a == nil || a.URL == nil { @@ -414,6 +422,14 @@ func (a *Alert) GetURL() string { return *a.URL } +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (a *AllowDeletionsEnforcementLevelChanges) GetFrom() string { + if a == nil || a.From == nil { + return "" + } + return *a.From +} + // GetRef returns the Ref field if it's non-nil, zero value otherwise. func (a *AnalysesListOptions) GetRef() string { if a == nil || a.Ref == nil { @@ -1366,6 +1382,14 @@ func (a *AuthorizedActorsOnly) GetFrom() bool { return *a.From } +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (a *AuthorizedDismissalActorsOnlyChanges) GetFrom() bool { + if a == nil || a.From == nil { + return false + } + return *a.From +} + // GetID returns the ID field if it's non-nil, zero value otherwise. func (a *Autolink) GetID() int64 { if a == nil || a.ID == nil { @@ -3542,6 +3566,38 @@ func (c *CreateOrgInvitationOptions) GetRole() string { return *c.Role } +// GetBaseRole returns the BaseRole field if it's non-nil, zero value otherwise. +func (c *CreateOrUpdateCustomRoleOptions) GetBaseRole() string { + if c == nil || c.BaseRole == nil { + return "" + } + return *c.BaseRole +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (c *CreateOrUpdateCustomRoleOptions) GetDescription() string { + if c == nil || c.Description == nil { + return "" + } + return *c.Description +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (c *CreateOrUpdateCustomRoleOptions) GetName() string { + if c == nil || c.Name == nil { + return "" + } + return *c.Name +} + +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (c *CreateProtectedChanges) GetFrom() bool { + if c == nil || c.From == nil { + return false + } + return *c.From +} + // GetAllowsPublicRepositories returns the AllowsPublicRepositories field if it's non-nil, zero value otherwise. func (c *CreateRunnerGroupRequest) GetAllowsPublicRepositories() bool { if c == nil || c.AllowsPublicRepositories == nil { @@ -3590,6 +3646,22 @@ func (c *CreateUserProjectOptions) GetBody() string { return *c.Body } +// GetBaseRole returns the BaseRole field if it's non-nil, zero value otherwise. +func (c *CustomRepoRoles) GetBaseRole() string { + if c == nil || c.BaseRole == nil { + return "" + } + return *c.BaseRole +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (c *CustomRepoRoles) GetDescription() string { + if c == nil || c.Description == nil { + return "" + } + return *c.Description +} + // GetID returns the ID field if it's non-nil, zero value otherwise. func (c *CustomRepoRoles) GetID() int64 { if c == nil || c.ID == nil { @@ -4534,6 +4606,14 @@ func (d *DismissedReview) GetState() string { return *d.State } +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (d *DismissStaleReviewsOnPushChanges) GetFrom() bool { + if d == nil || d.From == nil { + return false + } + return *d.From +} + // GetClientPayload returns the ClientPayload field if it's non-nil, zero value otherwise. func (d *DispatchRequestOptions) GetClientPayload() json.RawMessage { if d == nil || d.ClientPayload == nil { @@ -8174,6 +8254,14 @@ func (l *License) GetURL() string { return *l.URL } +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (l *LinearHistoryRequirementEnforcementLevelChanges) GetFrom() string { + if l == nil || l.From == nil { + return "" + } + return *l.From +} + // GetAppID returns the AppID field if it's non-nil, zero value otherwise. func (l *ListCheckRunsOptions) GetAppID() int64 { if l == nil || l.AppID == nil { @@ -11806,6 +11894,22 @@ func (p *Protection) GetRestrictions() *BranchRestrictions { return p.Restrictions } +// GetAdminEnforced returns the AdminEnforced field. +func (p *ProtectionChanges) GetAdminEnforced() *AdminEnforcedChanges { + if p == nil { + return nil + } + return p.AdminEnforced +} + +// GetAllowDeletionsEnforcementLevel returns the AllowDeletionsEnforcementLevel field. +func (p *ProtectionChanges) GetAllowDeletionsEnforcementLevel() *AllowDeletionsEnforcementLevelChanges { + if p == nil { + return nil + } + return p.AllowDeletionsEnforcementLevel +} + // GetAuthorizedActorNames returns the AuthorizedActorNames field. func (p *ProtectionChanges) GetAuthorizedActorNames() *AuthorizedActorNames { if p == nil { @@ -11822,6 +11926,94 @@ func (p *ProtectionChanges) GetAuthorizedActorsOnly() *AuthorizedActorsOnly { return p.AuthorizedActorsOnly } +// GetAuthorizedDismissalActorsOnly returns the AuthorizedDismissalActorsOnly field. +func (p *ProtectionChanges) GetAuthorizedDismissalActorsOnly() *AuthorizedDismissalActorsOnlyChanges { + if p == nil { + return nil + } + return p.AuthorizedDismissalActorsOnly +} + +// GetCreateProtected returns the CreateProtected field. +func (p *ProtectionChanges) GetCreateProtected() *CreateProtectedChanges { + if p == nil { + return nil + } + return p.CreateProtected +} + +// GetDismissStaleReviewsOnPush returns the DismissStaleReviewsOnPush field. +func (p *ProtectionChanges) GetDismissStaleReviewsOnPush() *DismissStaleReviewsOnPushChanges { + if p == nil { + return nil + } + return p.DismissStaleReviewsOnPush +} + +// GetLinearHistoryRequirementEnforcementLevel returns the LinearHistoryRequirementEnforcementLevel field. +func (p *ProtectionChanges) GetLinearHistoryRequirementEnforcementLevel() *LinearHistoryRequirementEnforcementLevelChanges { + if p == nil { + return nil + } + return p.LinearHistoryRequirementEnforcementLevel +} + +// GetPullRequestReviewsEnforcementLevel returns the PullRequestReviewsEnforcementLevel field. +func (p *ProtectionChanges) GetPullRequestReviewsEnforcementLevel() *PullRequestReviewsEnforcementLevelChanges { + if p == nil { + return nil + } + return p.PullRequestReviewsEnforcementLevel +} + +// GetRequireCodeOwnerReview returns the RequireCodeOwnerReview field. +func (p *ProtectionChanges) GetRequireCodeOwnerReview() *RequireCodeOwnerReviewChanges { + if p == nil { + return nil + } + return p.RequireCodeOwnerReview +} + +// GetRequiredConversationResolutionLevel returns the RequiredConversationResolutionLevel field. +func (p *ProtectionChanges) GetRequiredConversationResolutionLevel() *RequiredConversationResolutionLevelChanges { + if p == nil { + return nil + } + return p.RequiredConversationResolutionLevel +} + +// GetRequiredDeploymentsEnforcementLevel returns the RequiredDeploymentsEnforcementLevel field. +func (p *ProtectionChanges) GetRequiredDeploymentsEnforcementLevel() *RequiredDeploymentsEnforcementLevelChanges { + if p == nil { + return nil + } + return p.RequiredDeploymentsEnforcementLevel +} + +// GetRequiredStatusChecks returns the RequiredStatusChecks field. +func (p *ProtectionChanges) GetRequiredStatusChecks() *RequiredStatusChecksChanges { + if p == nil { + return nil + } + return p.RequiredStatusChecks +} + +// GetRequiredStatusChecksEnforcementLevel returns the RequiredStatusChecksEnforcementLevel field. +func (p *ProtectionChanges) GetRequiredStatusChecksEnforcementLevel() *RequiredStatusChecksEnforcementLevelChanges { + if p == nil { + return nil + } + return p.RequiredStatusChecksEnforcementLevel +} + +// GetSignatureRequirementEnforcementLevel returns the SignatureRequirementEnforcementLevel field. +func (p *ProtectionChanges) GetSignatureRequirementEnforcementLevel() *SignatureRequirementEnforcementLevelChanges { + if p == nil { + return nil + } + return p.SignatureRequirementEnforcementLevel +} + // GetAllowDeletions returns the AllowDeletions field if it's non-nil, zero value otherwise. func (p *ProtectionRequest) GetAllowDeletions() bool { if p == nil || p.AllowDeletions == nil { @@ -13014,6 +13206,14 @@ func (p *PullRequestReviewsEnforcement) GetDismissalRestrictions() *DismissalRes return p.DismissalRestrictions } +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (p *PullRequestReviewsEnforcementLevelChanges) GetFrom() string { + if p == nil || p.From == nil { + return "" + } + return *p.From +} + // GetBypassPullRequestAllowancesRequest returns the BypassPullRequestAllowancesRequest field. func (p *PullRequestReviewsEnforcementRequest) GetBypassPullRequestAllowancesRequest() *BypassPullRequestAllowancesRequest { if p == nil { @@ -16134,6 +16334,30 @@ func (r *RepoStatus) GetURL() string { return *r.URL } +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (r *RequireCodeOwnerReviewChanges) GetFrom() bool { + if r == nil || r.From == nil { + return false + } + return *r.From +} + +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (r *RequiredConversationResolutionLevelChanges) GetFrom() string { + if r == nil || r.From == nil { + return "" + } + return *r.From +} + +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (r *RequiredDeploymentsEnforcementLevelChanges) GetFrom() string { + if r == nil || r.From == nil { + return "" + } + return *r.From +} + // GetType returns the Type field if it's non-nil, zero value otherwise. func (r *RequiredReviewer) GetType() string { if r == nil || r.Type == nil { @@ -16150,6 +16374,14 @@ func (r *RequiredStatusCheck) GetAppID() int64 { return *r.AppID } +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (r *RequiredStatusChecksEnforcementLevelChanges) GetFrom() string { + if r == nil || r.From == nil { + return "" + } + return *r.From +} + // GetStrict returns the Strict field if it's non-nil, zero value otherwise. func (r *RequiredStatusChecksRequest) GetStrict() bool { if r == nil || r.Strict == nil { @@ -16582,6 +16814,62 @@ func (s *ScanningAnalysis) GetWarning() string { return *s.Warning } +// GetCreated returns the Created field if it's non-nil, zero value otherwise. +func (s *SCIMMeta) GetCreated() Timestamp { + if s == nil || s.Created == nil { + return Timestamp{} + } + return *s.Created +} + +// GetLastModified returns the LastModified field if it's non-nil, zero value otherwise. +func (s *SCIMMeta) GetLastModified() Timestamp { + if s == nil || s.LastModified == nil { + return Timestamp{} + } + return *s.LastModified +} + +// GetLocation returns the Location field if it's non-nil, zero value otherwise. +func (s *SCIMMeta) GetLocation() string { + if s == nil || s.Location == nil { + return "" + } + return *s.Location +} + +// GetResourceType returns the ResourceType field if it's non-nil, zero value otherwise. +func (s *SCIMMeta) GetResourceType() string { + if s == nil || s.ResourceType == nil { + return "" + } + return *s.ResourceType +} + +// GetItemsPerPage returns the ItemsPerPage field if it's non-nil, zero value otherwise. +func (s *SCIMProvisionedIdentities) GetItemsPerPage() int { + if s == nil || s.ItemsPerPage == nil { + return 0 + } + return *s.ItemsPerPage +} + +// GetStartIndex returns the StartIndex field if it's non-nil, zero value otherwise. +func (s *SCIMProvisionedIdentities) GetStartIndex() int { + if s == nil || s.StartIndex == nil { + return 0 + } + return *s.StartIndex +} + +// GetTotalResults returns the TotalResults field if it's non-nil, zero value otherwise. +func (s *SCIMProvisionedIdentities) GetTotalResults() int { + if s == nil || s.TotalResults == nil { + return 0 + } + return *s.TotalResults +} + // GetActive returns the Active field if it's non-nil, zero value otherwise. func (s *SCIMUserAttributes) GetActive() bool { if s == nil || s.Active == nil { @@ -16606,6 +16894,22 @@ func (s *SCIMUserAttributes) GetExternalID() string { return *s.ExternalID } +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (s *SCIMUserAttributes) GetID() string { + if s == nil || s.ID == nil { + return "" + } + return *s.ID +} + +// GetMeta returns the Meta field. +func (s *SCIMUserAttributes) GetMeta() *SCIMMeta { + if s == nil { + return nil + } + return s.Meta +} + // GetPrimary returns the Primary field if it's non-nil, zero value otherwise. func (s *SCIMUserEmail) GetPrimary() bool { if s == nil || s.Primary == nil { @@ -16894,6 +17198,14 @@ func (s *SecretScanningAlertUpdateOptions) GetState() string { return *s.State } +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (s *SecretScanningPushProtection) GetStatus() string { + if s == nil || s.Status == nil { + return "" + } + return *s.Status +} + // GetDescription returns the Description field if it's non-nil, zero value otherwise. func (s *SecurityAdvisory) GetDescription() string { if s == nil || s.Description == nil { @@ -16982,6 +17294,14 @@ func (s *SecurityAndAnalysis) GetSecretScanning() *SecretScanning { return s.SecretScanning } +// GetSecretScanningPushProtection returns the SecretScanningPushProtection field. +func (s *SecurityAndAnalysis) GetSecretScanningPushProtection() *SecretScanningPushProtection { + if s == nil { + return nil + } + return s.SecretScanningPushProtection +} + // GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. func (s *SelectedReposList) GetTotalCount() int { if s == nil || s.TotalCount == nil { @@ -16998,6 +17318,14 @@ func (s *ServiceHook) GetName() string { return *s.Name } +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (s *SignatureRequirementEnforcementLevelChanges) GetFrom() string { + if s == nil || s.From == nil { + return "" + } + return *s.From +} + // GetEnabled returns the Enabled field if it's non-nil, zero value otherwise. func (s *SignaturesProtectedBranch) GetEnabled() bool { if s == nil || s.Enabled == nil { @@ -17142,6 +17470,38 @@ func (s *SourceImportAuthor) GetURL() string { return *s.URL } +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (s *SSHSigningKey) GetCreatedAt() Timestamp { + if s == nil || s.CreatedAt == nil { + return Timestamp{} + } + return *s.CreatedAt +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (s *SSHSigningKey) GetID() int64 { + if s == nil || s.ID == nil { + return 0 + } + return *s.ID +} + +// GetKey returns the Key field if it's non-nil, zero value otherwise. +func (s *SSHSigningKey) GetKey() string { + if s == nil || s.Key == nil { + return "" + } + return *s.Key +} + +// GetTitle returns the Title field if it's non-nil, zero value otherwise. +func (s *SSHSigningKey) GetTitle() string { + if s == nil || s.Title == nil { + return "" + } + return *s.Title +} + // GetAction returns the Action field if it's non-nil, zero value otherwise. func (s *StarEvent) GetAction() string { if s == nil || s.Action == nil { diff --git a/vendor/github.com/google/go-github/v47/github/github.go b/vendor/github.com/google/go-github/v48/github/github.go similarity index 99% rename from vendor/github.com/google/go-github/v47/github/github.go rename to vendor/github.com/google/go-github/v48/github/github.go index da923dbb..2883c380 100644 --- a/vendor/github.com/google/go-github/v47/github/github.go +++ b/vendor/github.com/google/go-github/v48/github/github.go @@ -28,7 +28,7 @@ import ( ) const ( - Version = "v47.0.0" + Version = "v48.0.0" defaultBaseURL = "https://api.github.com/" defaultUserAgent = "go-github" + "/" + Version diff --git a/vendor/github.com/google/go-github/v47/github/gitignore.go b/vendor/github.com/google/go-github/v48/github/gitignore.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/gitignore.go rename to vendor/github.com/google/go-github/v48/github/gitignore.go diff --git a/vendor/github.com/google/go-github/v47/github/interactions.go b/vendor/github.com/google/go-github/v48/github/interactions.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/interactions.go rename to vendor/github.com/google/go-github/v48/github/interactions.go diff --git a/vendor/github.com/google/go-github/v47/github/interactions_orgs.go b/vendor/github.com/google/go-github/v48/github/interactions_orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/interactions_orgs.go rename to vendor/github.com/google/go-github/v48/github/interactions_orgs.go diff --git a/vendor/github.com/google/go-github/v47/github/interactions_repos.go b/vendor/github.com/google/go-github/v48/github/interactions_repos.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/interactions_repos.go rename to vendor/github.com/google/go-github/v48/github/interactions_repos.go diff --git a/vendor/github.com/google/go-github/v47/github/issue_import.go b/vendor/github.com/google/go-github/v48/github/issue_import.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/issue_import.go rename to vendor/github.com/google/go-github/v48/github/issue_import.go diff --git a/vendor/github.com/google/go-github/v47/github/issues.go b/vendor/github.com/google/go-github/v48/github/issues.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/issues.go rename to vendor/github.com/google/go-github/v48/github/issues.go diff --git a/vendor/github.com/google/go-github/v47/github/issues_assignees.go b/vendor/github.com/google/go-github/v48/github/issues_assignees.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/issues_assignees.go rename to vendor/github.com/google/go-github/v48/github/issues_assignees.go diff --git a/vendor/github.com/google/go-github/v47/github/issues_comments.go b/vendor/github.com/google/go-github/v48/github/issues_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/issues_comments.go rename to vendor/github.com/google/go-github/v48/github/issues_comments.go diff --git a/vendor/github.com/google/go-github/v47/github/issues_events.go b/vendor/github.com/google/go-github/v48/github/issues_events.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/issues_events.go rename to vendor/github.com/google/go-github/v48/github/issues_events.go diff --git a/vendor/github.com/google/go-github/v47/github/issues_labels.go b/vendor/github.com/google/go-github/v48/github/issues_labels.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/issues_labels.go rename to vendor/github.com/google/go-github/v48/github/issues_labels.go diff --git a/vendor/github.com/google/go-github/v47/github/issues_milestones.go b/vendor/github.com/google/go-github/v48/github/issues_milestones.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/issues_milestones.go rename to vendor/github.com/google/go-github/v48/github/issues_milestones.go diff --git a/vendor/github.com/google/go-github/v47/github/issues_timeline.go b/vendor/github.com/google/go-github/v48/github/issues_timeline.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/issues_timeline.go rename to vendor/github.com/google/go-github/v48/github/issues_timeline.go diff --git a/vendor/github.com/google/go-github/v47/github/licenses.go b/vendor/github.com/google/go-github/v48/github/licenses.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/licenses.go rename to vendor/github.com/google/go-github/v48/github/licenses.go diff --git a/vendor/github.com/google/go-github/v47/github/messages.go b/vendor/github.com/google/go-github/v48/github/messages.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/messages.go rename to vendor/github.com/google/go-github/v48/github/messages.go diff --git a/vendor/github.com/google/go-github/v47/github/migrations.go b/vendor/github.com/google/go-github/v48/github/migrations.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/migrations.go rename to vendor/github.com/google/go-github/v48/github/migrations.go diff --git a/vendor/github.com/google/go-github/v47/github/migrations_source_import.go b/vendor/github.com/google/go-github/v48/github/migrations_source_import.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/migrations_source_import.go rename to vendor/github.com/google/go-github/v48/github/migrations_source_import.go diff --git a/vendor/github.com/google/go-github/v47/github/migrations_user.go b/vendor/github.com/google/go-github/v48/github/migrations_user.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/migrations_user.go rename to vendor/github.com/google/go-github/v48/github/migrations_user.go diff --git a/vendor/github.com/google/go-github/v47/github/misc.go b/vendor/github.com/google/go-github/v48/github/misc.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/misc.go rename to vendor/github.com/google/go-github/v48/github/misc.go diff --git a/vendor/github.com/google/go-github/v47/github/orgs.go b/vendor/github.com/google/go-github/v48/github/orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/orgs.go rename to vendor/github.com/google/go-github/v48/github/orgs.go diff --git a/vendor/github.com/google/go-github/v47/github/orgs_actions_allowed.go b/vendor/github.com/google/go-github/v48/github/orgs_actions_allowed.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/orgs_actions_allowed.go rename to vendor/github.com/google/go-github/v48/github/orgs_actions_allowed.go diff --git a/vendor/github.com/google/go-github/v47/github/orgs_actions_permissions.go b/vendor/github.com/google/go-github/v48/github/orgs_actions_permissions.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/orgs_actions_permissions.go rename to vendor/github.com/google/go-github/v48/github/orgs_actions_permissions.go diff --git a/vendor/github.com/google/go-github/v47/github/orgs_audit_log.go b/vendor/github.com/google/go-github/v48/github/orgs_audit_log.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/orgs_audit_log.go rename to vendor/github.com/google/go-github/v48/github/orgs_audit_log.go diff --git a/vendor/github.com/google/go-github/v48/github/orgs_custom_roles.go b/vendor/github.com/google/go-github/v48/github/orgs_custom_roles.go new file mode 100644 index 00000000..41270b32 --- /dev/null +++ b/vendor/github.com/google/go-github/v48/github/orgs_custom_roles.go @@ -0,0 +1,120 @@ +// Copyright 2022 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" +) + +// OrganizationCustomRepoRoles represents custom repository roles available in specified organization. +type OrganizationCustomRepoRoles struct { + TotalCount *int `json:"total_count,omitempty"` + CustomRepoRoles []*CustomRepoRoles `json:"custom_roles,omitempty"` +} + +// CustomRepoRoles represents custom repository roles for an organization. +// See https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization +// for more information. +type CustomRepoRoles struct { + ID *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + BaseRole *string `json:"base_role,omitempty"` + Permissions []string `json:"permissions,omitempty"` +} + +// ListCustomRepoRoles lists the custom repository roles available in this organization. +// In order to see custom repository roles in an organization, the authenticated user must be an organization owner. +// +// GitHub API docs: https://docs.github.com/en/rest/orgs/custom-roles#list-custom-repository-roles-in-an-organization +func (s *OrganizationsService) ListCustomRepoRoles(ctx context.Context, org string) (*OrganizationCustomRepoRoles, *Response, error) { + u := fmt.Sprintf("orgs/%v/custom_roles", org) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + customRepoRoles := new(OrganizationCustomRepoRoles) + resp, err := s.client.Do(ctx, req, customRepoRoles) + if err != nil { + return nil, resp, err + } + + return customRepoRoles, resp, nil +} + +// CreateOrUpdateCustomRoleOptions represents options required to create or update a custom repository role. +type CreateOrUpdateCustomRoleOptions struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + BaseRole *string `json:"base_role,omitempty"` + Permissions []string `json:"permissions,omitempty"` +} + +// CreateCustomRepoRole creates a custom repository role in this organization. +// In order to create custom repository roles in an organization, the authenticated user must be an organization owner. +// +// GitHub API docs: https://docs.github.com/en/rest/orgs/custom-roles#create-a-custom-role +func (s *OrganizationsService) CreateCustomRepoRole(ctx context.Context, org string, opts *CreateOrUpdateCustomRoleOptions) (*CustomRepoRoles, *Response, error) { + u := fmt.Sprintf("orgs/%v/custom_roles", org) + + req, err := s.client.NewRequest("POST", u, opts) + if err != nil { + return nil, nil, err + } + + resultingRole := new(CustomRepoRoles) + resp, err := s.client.Do(ctx, req, resultingRole) + if err != nil { + return nil, resp, err + } + + return resultingRole, resp, err +} + +// UpdateCustomRepoRole updates a custom repository role in this organization. +// In order to update custom repository roles in an organization, the authenticated user must be an organization owner. +// +// GitHub API docs: https://docs.github.com/en/rest/orgs/custom-roles#update-a-custom-role +func (s *OrganizationsService) UpdateCustomRepoRole(ctx context.Context, org, roleID string, opts *CreateOrUpdateCustomRoleOptions) (*CustomRepoRoles, *Response, error) { + u := fmt.Sprintf("orgs/%v/custom_roles/%v", org, roleID) + + req, err := s.client.NewRequest("PATCH", u, opts) + if err != nil { + return nil, nil, err + } + + resultingRole := new(CustomRepoRoles) + resp, err := s.client.Do(ctx, req, resultingRole) + if err != nil { + return nil, resp, err + } + + return resultingRole, resp, err +} + +// DeleteCustomRepoRole deletes an existing custom repository role in this organization. +// In order to delete custom repository roles in an organization, the authenticated user must be an organization owner. +// +// GitHub API docs: https://docs.github.com/en/rest/orgs/custom-roles#delete-a-custom-role +func (s *OrganizationsService) DeleteCustomRepoRole(ctx context.Context, org, roleID string) (*Response, error) { + u := fmt.Sprintf("orgs/%v/custom_roles/%v", org, roleID) + + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + + resultingRole := new(CustomRepoRoles) + resp, err := s.client.Do(ctx, req, resultingRole) + if err != nil { + return resp, err + } + + return resp, nil +} diff --git a/vendor/github.com/google/go-github/v47/github/orgs_hooks.go b/vendor/github.com/google/go-github/v48/github/orgs_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/orgs_hooks.go rename to vendor/github.com/google/go-github/v48/github/orgs_hooks.go diff --git a/vendor/github.com/google/go-github/v47/github/orgs_hooks_deliveries.go b/vendor/github.com/google/go-github/v48/github/orgs_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/orgs_hooks_deliveries.go rename to vendor/github.com/google/go-github/v48/github/orgs_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v47/github/orgs_members.go b/vendor/github.com/google/go-github/v48/github/orgs_members.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/orgs_members.go rename to vendor/github.com/google/go-github/v48/github/orgs_members.go diff --git a/vendor/github.com/google/go-github/v47/github/orgs_outside_collaborators.go b/vendor/github.com/google/go-github/v48/github/orgs_outside_collaborators.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/orgs_outside_collaborators.go rename to vendor/github.com/google/go-github/v48/github/orgs_outside_collaborators.go diff --git a/vendor/github.com/google/go-github/v47/github/orgs_packages.go b/vendor/github.com/google/go-github/v48/github/orgs_packages.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/orgs_packages.go rename to vendor/github.com/google/go-github/v48/github/orgs_packages.go diff --git a/vendor/github.com/google/go-github/v47/github/orgs_projects.go b/vendor/github.com/google/go-github/v48/github/orgs_projects.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/orgs_projects.go rename to vendor/github.com/google/go-github/v48/github/orgs_projects.go diff --git a/vendor/github.com/google/go-github/v47/github/orgs_users_blocking.go b/vendor/github.com/google/go-github/v48/github/orgs_users_blocking.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/orgs_users_blocking.go rename to vendor/github.com/google/go-github/v48/github/orgs_users_blocking.go diff --git a/vendor/github.com/google/go-github/v47/github/packages.go b/vendor/github.com/google/go-github/v48/github/packages.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/packages.go rename to vendor/github.com/google/go-github/v48/github/packages.go diff --git a/vendor/github.com/google/go-github/v47/github/projects.go b/vendor/github.com/google/go-github/v48/github/projects.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/projects.go rename to vendor/github.com/google/go-github/v48/github/projects.go diff --git a/vendor/github.com/google/go-github/v47/github/pulls.go b/vendor/github.com/google/go-github/v48/github/pulls.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/pulls.go rename to vendor/github.com/google/go-github/v48/github/pulls.go diff --git a/vendor/github.com/google/go-github/v47/github/pulls_comments.go b/vendor/github.com/google/go-github/v48/github/pulls_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/pulls_comments.go rename to vendor/github.com/google/go-github/v48/github/pulls_comments.go diff --git a/vendor/github.com/google/go-github/v47/github/pulls_reviewers.go b/vendor/github.com/google/go-github/v48/github/pulls_reviewers.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/pulls_reviewers.go rename to vendor/github.com/google/go-github/v48/github/pulls_reviewers.go diff --git a/vendor/github.com/google/go-github/v47/github/pulls_reviews.go b/vendor/github.com/google/go-github/v48/github/pulls_reviews.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/pulls_reviews.go rename to vendor/github.com/google/go-github/v48/github/pulls_reviews.go diff --git a/vendor/github.com/google/go-github/v47/github/pulls_threads.go b/vendor/github.com/google/go-github/v48/github/pulls_threads.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/pulls_threads.go rename to vendor/github.com/google/go-github/v48/github/pulls_threads.go diff --git a/vendor/github.com/google/go-github/v47/github/reactions.go b/vendor/github.com/google/go-github/v48/github/reactions.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/reactions.go rename to vendor/github.com/google/go-github/v48/github/reactions.go diff --git a/vendor/github.com/google/go-github/v47/github/repos.go b/vendor/github.com/google/go-github/v48/github/repos.go similarity index 92% rename from vendor/github.com/google/go-github/v47/github/repos.go rename to vendor/github.com/google/go-github/v48/github/repos.go index 45fd1888..8f5bbea9 100644 --- a/vendor/github.com/google/go-github/v47/github/repos.go +++ b/vendor/github.com/google/go-github/v48/github/repos.go @@ -205,8 +205,9 @@ type RepositoryListOptions struct { // SecurityAndAnalysis specifies the optional advanced security features // that are enabled on a given repository. type SecurityAndAnalysis struct { - AdvancedSecurity *AdvancedSecurity `json:"advanced_security,omitempty"` - SecretScanning *SecretScanning `json:"secret_scanning,omitempty"` + AdvancedSecurity *AdvancedSecurity `json:"advanced_security,omitempty"` + SecretScanning *SecretScanning `json:"secret_scanning,omitempty"` + SecretScanningPushProtection *SecretScanningPushProtection `json:"secret_scanning_push_protection,omitempty"` } func (s SecurityAndAnalysis) String() string { @@ -235,6 +236,13 @@ func (s SecretScanning) String() string { return Stringify(s) } +// SecretScanningPushProtection specifies the state of secret scanning push protection on a repository. +// +// GitHub API docs: https://docs.github.com/en/code-security/secret-scanning/about-secret-scanning#about-secret-scanning-for-partner-patterns +type SecretScanningPushProtection struct { + Status *string `json:"status,omitempty"` +} + // List the repositories for a user. Passing the empty string will list // repositories for the authenticated user. // @@ -864,8 +872,31 @@ type BranchProtectionRule struct { // ProtectionChanges represents the changes to the rule if the BranchProtection was edited. type ProtectionChanges struct { - AuthorizedActorsOnly *AuthorizedActorsOnly `json:"authorized_actors_only,omitempty"` - AuthorizedActorNames *AuthorizedActorNames `json:"authorized_actor_names,omitempty"` + AdminEnforced *AdminEnforcedChanges `json:"admin_enforced,omitempty"` + AllowDeletionsEnforcementLevel *AllowDeletionsEnforcementLevelChanges `json:"allow_deletions_enforcement_level,omitempty"` + AuthorizedActorNames *AuthorizedActorNames `json:"authorized_actor_names,omitempty"` + AuthorizedActorsOnly *AuthorizedActorsOnly `json:"authorized_actors_only,omitempty"` + AuthorizedDismissalActorsOnly *AuthorizedDismissalActorsOnlyChanges `json:"authorized_dismissal_actors_only,omitempty"` + CreateProtected *CreateProtectedChanges `json:"create_protected,omitempty"` + DismissStaleReviewsOnPush *DismissStaleReviewsOnPushChanges `json:"dismiss_stale_reviews_on_push,omitempty"` + LinearHistoryRequirementEnforcementLevel *LinearHistoryRequirementEnforcementLevelChanges `json:"linear_history_requirement_enforcement_level,omitempty"` + PullRequestReviewsEnforcementLevel *PullRequestReviewsEnforcementLevelChanges `json:"pull_request_reviews_enforcement_level,omitempty"` + RequireCodeOwnerReview *RequireCodeOwnerReviewChanges `json:"require_code_owner_review,omitempty"` + RequiredConversationResolutionLevel *RequiredConversationResolutionLevelChanges `json:"required_conversation_resolution_level,omitempty"` + RequiredDeploymentsEnforcementLevel *RequiredDeploymentsEnforcementLevelChanges `json:"required_deployments_enforcement_level,omitempty"` + RequiredStatusChecks *RequiredStatusChecksChanges `json:"required_status_checks,omitempty"` + RequiredStatusChecksEnforcementLevel *RequiredStatusChecksEnforcementLevelChanges `json:"required_status_checks_enforcement_level,omitempty"` + SignatureRequirementEnforcementLevel *SignatureRequirementEnforcementLevelChanges `json:"signature_requirement_enforcement_level,omitempty"` +} + +// AdminEnforcedChanges represents the changes made to the AdminEnforced policy. +type AdminEnforcedChanges struct { + From *bool `json:"from,omitempty"` +} + +// AllowDeletionsEnforcementLevelChanges represents the changes made to the AllowDeletionsEnforcementLevel policy. +type AllowDeletionsEnforcementLevelChanges struct { + From *string `json:"from,omitempty"` } // AuthorizedActorNames represents who are authorized to edit the branch protection rules. @@ -873,11 +904,66 @@ type AuthorizedActorNames struct { From []string `json:"from,omitempty"` } -// AuthorizedActorsOnly represents if the branche rule can be edited by authorized actors only. +// AuthorizedActorsOnly represents if the branch rule can be edited by authorized actors only. type AuthorizedActorsOnly struct { From *bool `json:"from,omitempty"` } +// AuthorizedDismissalActorsOnlyChanges represents the changes made to the AuthorizedDismissalActorsOnly policy. +type AuthorizedDismissalActorsOnlyChanges struct { + From *bool `json:"from,omitempty"` +} + +// CreateProtectedChanges represents the changes made to the CreateProtected policy. +type CreateProtectedChanges struct { + From *bool `json:"from,omitempty"` +} + +// DismissStaleReviewsOnPushChanges represents the changes made to the DismissStaleReviewsOnPushChanges policy. +type DismissStaleReviewsOnPushChanges struct { + From *bool `json:"from,omitempty"` +} + +// LinearHistoryRequirementEnforcementLevelChanges represents the changes made to the LinearHistoryRequirementEnforcementLevel policy. +type LinearHistoryRequirementEnforcementLevelChanges struct { + From *string `json:"from,omitempty"` +} + +// PullRequestReviewsEnforcementLevelChanges represents the changes made to the PullRequestReviewsEnforcementLevel policy. +type PullRequestReviewsEnforcementLevelChanges struct { + From *string `json:"from,omitempty"` +} + +// RequireCodeOwnerReviewChanges represents the changes made to the RequireCodeOwnerReview policy. +type RequireCodeOwnerReviewChanges struct { + From *bool `json:"from,omitempty"` +} + +// RequiredConversationResolutionLevelChanges represents the changes made to the RequiredConversationResolutionLevel policy. +type RequiredConversationResolutionLevelChanges struct { + From *string `json:"from,omitempty"` +} + +// RequiredDeploymentsEnforcementLevelChanges represents the changes made to the RequiredDeploymentsEnforcementLevel policy. +type RequiredDeploymentsEnforcementLevelChanges struct { + From *string `json:"from,omitempty"` +} + +// RequiredStatusChecksChanges represents the changes made to the RequiredStatusChecks policy. +type RequiredStatusChecksChanges struct { + From []string `json:"from,omitempty"` +} + +// RequiredStatusChecksEnforcementLevelChanges represents the changes made to the RequiredStatusChecksEnforcementLevel policy. +type RequiredStatusChecksEnforcementLevelChanges struct { + From *string `json:"from,omitempty"` +} + +// SignatureRequirementEnforcementLevelChanges represents the changes made to the SignatureRequirementEnforcementLevel policy. +type SignatureRequirementEnforcementLevelChanges struct { + From *string `json:"from,omitempty"` +} + // ProtectionRequest represents a request to create/edit a branch's protection. type ProtectionRequest struct { RequiredStatusChecks *RequiredStatusChecks `json:"required_status_checks"` diff --git a/vendor/github.com/google/go-github/v47/github/repos_actions_allowed.go b/vendor/github.com/google/go-github/v48/github/repos_actions_allowed.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_actions_allowed.go rename to vendor/github.com/google/go-github/v48/github/repos_actions_allowed.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_actions_permissions.go b/vendor/github.com/google/go-github/v48/github/repos_actions_permissions.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_actions_permissions.go rename to vendor/github.com/google/go-github/v48/github/repos_actions_permissions.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_autolinks.go b/vendor/github.com/google/go-github/v48/github/repos_autolinks.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_autolinks.go rename to vendor/github.com/google/go-github/v48/github/repos_autolinks.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_codeowners.go b/vendor/github.com/google/go-github/v48/github/repos_codeowners.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_codeowners.go rename to vendor/github.com/google/go-github/v48/github/repos_codeowners.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_collaborators.go b/vendor/github.com/google/go-github/v48/github/repos_collaborators.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_collaborators.go rename to vendor/github.com/google/go-github/v48/github/repos_collaborators.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_comments.go b/vendor/github.com/google/go-github/v48/github/repos_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_comments.go rename to vendor/github.com/google/go-github/v48/github/repos_comments.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_commits.go b/vendor/github.com/google/go-github/v48/github/repos_commits.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_commits.go rename to vendor/github.com/google/go-github/v48/github/repos_commits.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_community_health.go b/vendor/github.com/google/go-github/v48/github/repos_community_health.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_community_health.go rename to vendor/github.com/google/go-github/v48/github/repos_community_health.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_contents.go b/vendor/github.com/google/go-github/v48/github/repos_contents.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_contents.go rename to vendor/github.com/google/go-github/v48/github/repos_contents.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_deployments.go b/vendor/github.com/google/go-github/v48/github/repos_deployments.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_deployments.go rename to vendor/github.com/google/go-github/v48/github/repos_deployments.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_environments.go b/vendor/github.com/google/go-github/v48/github/repos_environments.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_environments.go rename to vendor/github.com/google/go-github/v48/github/repos_environments.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_forks.go b/vendor/github.com/google/go-github/v48/github/repos_forks.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_forks.go rename to vendor/github.com/google/go-github/v48/github/repos_forks.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_hooks.go b/vendor/github.com/google/go-github/v48/github/repos_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_hooks.go rename to vendor/github.com/google/go-github/v48/github/repos_hooks.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_hooks_deliveries.go b/vendor/github.com/google/go-github/v48/github/repos_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_hooks_deliveries.go rename to vendor/github.com/google/go-github/v48/github/repos_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_invitations.go b/vendor/github.com/google/go-github/v48/github/repos_invitations.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_invitations.go rename to vendor/github.com/google/go-github/v48/github/repos_invitations.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_keys.go b/vendor/github.com/google/go-github/v48/github/repos_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_keys.go rename to vendor/github.com/google/go-github/v48/github/repos_keys.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_lfs.go b/vendor/github.com/google/go-github/v48/github/repos_lfs.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_lfs.go rename to vendor/github.com/google/go-github/v48/github/repos_lfs.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_merging.go b/vendor/github.com/google/go-github/v48/github/repos_merging.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_merging.go rename to vendor/github.com/google/go-github/v48/github/repos_merging.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_pages.go b/vendor/github.com/google/go-github/v48/github/repos_pages.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_pages.go rename to vendor/github.com/google/go-github/v48/github/repos_pages.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_prereceive_hooks.go b/vendor/github.com/google/go-github/v48/github/repos_prereceive_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_prereceive_hooks.go rename to vendor/github.com/google/go-github/v48/github/repos_prereceive_hooks.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_projects.go b/vendor/github.com/google/go-github/v48/github/repos_projects.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_projects.go rename to vendor/github.com/google/go-github/v48/github/repos_projects.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_releases.go b/vendor/github.com/google/go-github/v48/github/repos_releases.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_releases.go rename to vendor/github.com/google/go-github/v48/github/repos_releases.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_stats.go b/vendor/github.com/google/go-github/v48/github/repos_stats.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_stats.go rename to vendor/github.com/google/go-github/v48/github/repos_stats.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_statuses.go b/vendor/github.com/google/go-github/v48/github/repos_statuses.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_statuses.go rename to vendor/github.com/google/go-github/v48/github/repos_statuses.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_tags.go b/vendor/github.com/google/go-github/v48/github/repos_tags.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_tags.go rename to vendor/github.com/google/go-github/v48/github/repos_tags.go diff --git a/vendor/github.com/google/go-github/v47/github/repos_traffic.go b/vendor/github.com/google/go-github/v48/github/repos_traffic.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/repos_traffic.go rename to vendor/github.com/google/go-github/v48/github/repos_traffic.go diff --git a/vendor/github.com/google/go-github/v47/github/scim.go b/vendor/github.com/google/go-github/v48/github/scim.go similarity index 82% rename from vendor/github.com/google/go-github/v47/github/scim.go rename to vendor/github.com/google/go-github/v48/github/scim.go index 9462fb6b..70f81ed1 100644 --- a/vendor/github.com/google/go-github/v47/github/scim.go +++ b/vendor/github.com/google/go-github/v48/github/scim.go @@ -29,6 +29,9 @@ type SCIMUserAttributes struct { ExternalID *string `json:"externalId,omitempty"` // (Optional.) Groups []string `json:"groups,omitempty"` // (Optional.) Active *bool `json:"active,omitempty"` // (Optional.) + // Only populated as a result of calling ListSCIMProvisionedIdentitiesOptions or GetSCIMProvisioningInfoForUser: + ID *string `json:"id,omitempty"` + Meta *SCIMMeta `json:"meta,omitempty"` } // SCIMUserName represents SCIM user information. @@ -45,6 +48,23 @@ type SCIMUserEmail struct { Type *string `json:"type,omitempty"` // (Optional.) } +// SCIMMeta represents metadata about the SCIM resource. +type SCIMMeta struct { + ResourceType *string `json:"resourceType,omitempty"` + Created *Timestamp `json:"created,omitempty"` + LastModified *Timestamp `json:"lastModified,omitempty"` + Location *string `json:"location,omitempty"` +} + +// SCIMProvisionedIdentities represents the result of calling ListSCIMProvisionedIdentities. +type SCIMProvisionedIdentities struct { + Schemas []string `json:"schemas,omitempty"` + TotalResults *int `json:"totalResults,omitempty"` + ItemsPerPage *int `json:"itemsPerPage,omitempty"` + StartIndex *int `json:"startIndex,omitempty"` + Resources []*SCIMUserAttributes `json:"Resources,omitempty"` +} + // ListSCIMProvisionedIdentitiesOptions represents options for ListSCIMProvisionedIdentities. // // Github API docs: https://docs.github.com/en/rest/scim#list-scim-provisioned-identities--parameters @@ -62,17 +82,25 @@ type ListSCIMProvisionedIdentitiesOptions struct { // ListSCIMProvisionedIdentities lists SCIM provisioned identities. // // GitHub API docs: https://docs.github.com/en/rest/scim#list-scim-provisioned-identities -func (s *SCIMService) ListSCIMProvisionedIdentities(ctx context.Context, org string, opts *ListSCIMProvisionedIdentitiesOptions) (*Response, error) { +func (s *SCIMService) ListSCIMProvisionedIdentities(ctx context.Context, org string, opts *ListSCIMProvisionedIdentitiesOptions) (*SCIMProvisionedIdentities, *Response, error) { u := fmt.Sprintf("scim/v2/organizations/%v/Users", org) u, err := addOptions(u, opts) if err != nil { - return nil, err + return nil, nil, err } + req, err := s.client.NewRequest("GET", u, nil) if err != nil { - return nil, err + return nil, nil, err } - return s.client.Do(ctx, req, nil) + + identities := new(SCIMProvisionedIdentities) + resp, err := s.client.Do(ctx, req, identities) + if err != nil { + return nil, resp, err + } + + return identities, resp, nil } // ProvisionAndInviteSCIMUser provisions organization membership for a user, and sends an activation email to the email address. @@ -84,23 +112,32 @@ func (s *SCIMService) ProvisionAndInviteSCIMUser(ctx context.Context, org string if err != nil { return nil, err } + req, err := s.client.NewRequest("POST", u, nil) if err != nil { return nil, err } + return s.client.Do(ctx, req, nil) } // GetSCIMProvisioningInfoForUser returns SCIM provisioning information for a user. // // GitHub API docs: https://docs.github.com/en/rest/scim#supported-scim-user-attributes -func (s *SCIMService) GetSCIMProvisioningInfoForUser(ctx context.Context, org, scimUserID string) (*Response, error) { +func (s *SCIMService) GetSCIMProvisioningInfoForUser(ctx context.Context, org, scimUserID string) (*SCIMUserAttributes, *Response, error) { u := fmt.Sprintf("scim/v2/organizations/%v/Users/%v", org, scimUserID) req, err := s.client.NewRequest("GET", u, nil) if err != nil { - return nil, err + return nil, nil, err } - return s.client.Do(ctx, req, nil) + + user := new(SCIMUserAttributes) + resp, err := s.client.Do(ctx, req, &user) + if err != nil { + return nil, resp, err + } + + return user, resp, nil } // UpdateProvisionedOrgMembership updates a provisioned organization membership. @@ -112,10 +149,12 @@ func (s *SCIMService) UpdateProvisionedOrgMembership(ctx context.Context, org, s if err != nil { return nil, err } + req, err := s.client.NewRequest("PUT", u, nil) if err != nil { return nil, err } + return s.client.Do(ctx, req, nil) } @@ -143,10 +182,12 @@ func (s *SCIMService) UpdateAttributeForSCIMUser(ctx context.Context, org, scimU if err != nil { return nil, err } + req, err := s.client.NewRequest("PATCH", u, nil) if err != nil { return nil, err } + return s.client.Do(ctx, req, nil) } @@ -159,5 +200,6 @@ func (s *SCIMService) DeleteSCIMUserFromOrg(ctx context.Context, org, scimUserID if err != nil { return nil, err } + return s.client.Do(ctx, req, nil) } diff --git a/vendor/github.com/google/go-github/v47/github/search.go b/vendor/github.com/google/go-github/v48/github/search.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/search.go rename to vendor/github.com/google/go-github/v48/github/search.go diff --git a/vendor/github.com/google/go-github/v47/github/secret_scanning.go b/vendor/github.com/google/go-github/v48/github/secret_scanning.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/secret_scanning.go rename to vendor/github.com/google/go-github/v48/github/secret_scanning.go diff --git a/vendor/github.com/google/go-github/v47/github/strings.go b/vendor/github.com/google/go-github/v48/github/strings.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/strings.go rename to vendor/github.com/google/go-github/v48/github/strings.go diff --git a/vendor/github.com/google/go-github/v47/github/teams.go b/vendor/github.com/google/go-github/v48/github/teams.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/teams.go rename to vendor/github.com/google/go-github/v48/github/teams.go diff --git a/vendor/github.com/google/go-github/v47/github/teams_discussion_comments.go b/vendor/github.com/google/go-github/v48/github/teams_discussion_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/teams_discussion_comments.go rename to vendor/github.com/google/go-github/v48/github/teams_discussion_comments.go diff --git a/vendor/github.com/google/go-github/v47/github/teams_discussions.go b/vendor/github.com/google/go-github/v48/github/teams_discussions.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/teams_discussions.go rename to vendor/github.com/google/go-github/v48/github/teams_discussions.go diff --git a/vendor/github.com/google/go-github/v47/github/teams_members.go b/vendor/github.com/google/go-github/v48/github/teams_members.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/teams_members.go rename to vendor/github.com/google/go-github/v48/github/teams_members.go diff --git a/vendor/github.com/google/go-github/v47/github/timestamp.go b/vendor/github.com/google/go-github/v48/github/timestamp.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/timestamp.go rename to vendor/github.com/google/go-github/v48/github/timestamp.go diff --git a/vendor/github.com/google/go-github/v47/github/users.go b/vendor/github.com/google/go-github/v48/github/users.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/users.go rename to vendor/github.com/google/go-github/v48/github/users.go diff --git a/vendor/github.com/google/go-github/v47/github/users_administration.go b/vendor/github.com/google/go-github/v48/github/users_administration.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/users_administration.go rename to vendor/github.com/google/go-github/v48/github/users_administration.go diff --git a/vendor/github.com/google/go-github/v47/github/users_blocking.go b/vendor/github.com/google/go-github/v48/github/users_blocking.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/users_blocking.go rename to vendor/github.com/google/go-github/v48/github/users_blocking.go diff --git a/vendor/github.com/google/go-github/v47/github/users_emails.go b/vendor/github.com/google/go-github/v48/github/users_emails.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/users_emails.go rename to vendor/github.com/google/go-github/v48/github/users_emails.go diff --git a/vendor/github.com/google/go-github/v47/github/users_followers.go b/vendor/github.com/google/go-github/v48/github/users_followers.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/users_followers.go rename to vendor/github.com/google/go-github/v48/github/users_followers.go diff --git a/vendor/github.com/google/go-github/v47/github/users_gpg_keys.go b/vendor/github.com/google/go-github/v48/github/users_gpg_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/users_gpg_keys.go rename to vendor/github.com/google/go-github/v48/github/users_gpg_keys.go diff --git a/vendor/github.com/google/go-github/v47/github/users_keys.go b/vendor/github.com/google/go-github/v48/github/users_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/users_keys.go rename to vendor/github.com/google/go-github/v48/github/users_keys.go diff --git a/vendor/github.com/google/go-github/v47/github/users_packages.go b/vendor/github.com/google/go-github/v48/github/users_packages.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/users_packages.go rename to vendor/github.com/google/go-github/v48/github/users_packages.go diff --git a/vendor/github.com/google/go-github/v47/github/users_projects.go b/vendor/github.com/google/go-github/v48/github/users_projects.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/users_projects.go rename to vendor/github.com/google/go-github/v48/github/users_projects.go diff --git a/vendor/github.com/google/go-github/v48/github/users_ssh_signing_keys.go b/vendor/github.com/google/go-github/v48/github/users_ssh_signing_keys.go new file mode 100644 index 00000000..567623f8 --- /dev/null +++ b/vendor/github.com/google/go-github/v48/github/users_ssh_signing_keys.go @@ -0,0 +1,108 @@ +// Copyright 2022 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" +) + +// SSHSigningKey represents a public SSH key used to sign git commits. +type SSHSigningKey struct { + ID *int64 `json:"id,omitempty"` + Key *string `json:"key,omitempty"` + Title *string `json:"title,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` +} + +func (k SSHSigningKey) String() string { + return Stringify(k) +} + +// ListSSHSigningKeys lists the SSH signing keys for a user. Passing an empty +// username string will fetch SSH signing keys for the authenticated user. +// +// GitHub API docs: https://docs.github.com/en/rest/users/ssh-signing-keys#list-ssh-signing-keys-for-the-authenticated-user +// GitHub API docs: https://docs.github.com/en/rest/users/ssh-signing-keys#list-ssh-signing-keys-for-a-user +func (s *UsersService) ListSSHSigningKeys(ctx context.Context, user string, opts *ListOptions) ([]*SSHSigningKey, *Response, error) { + var u string + if user != "" { + u = fmt.Sprintf("users/%v/ssh_signing_keys", user) + } else { + u = "user/ssh_signing_keys" + } + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var keys []*SSHSigningKey + resp, err := s.client.Do(ctx, req, &keys) + if err != nil { + return nil, resp, err + } + + return keys, resp, nil +} + +// GetSSHSigningKey fetches a single SSH signing key for the authenticated user. +// +// GitHub API docs: https://docs.github.com/en/rest/users/ssh-signing-keys#get-an-ssh-signing-key-for-the-authenticated-user +func (s *UsersService) GetSSHSigningKey(ctx context.Context, id int64) (*SSHSigningKey, *Response, error) { + u := fmt.Sprintf("user/ssh_signing_keys/%v", id) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + key := new(SSHSigningKey) + resp, err := s.client.Do(ctx, req, key) + if err != nil { + return nil, resp, err + } + + return key, resp, nil +} + +// CreateSSHSigningKey adds a SSH signing key for the authenticated user. +// +// GitHub API docs: https://docs.github.com/en/rest/users/ssh-signing-keys#create-a-ssh-signing-key-for-the-authenticated-user +func (s *UsersService) CreateSSHSigningKey(ctx context.Context, key *Key) (*SSHSigningKey, *Response, error) { + u := "user/ssh_signing_keys" + + req, err := s.client.NewRequest("POST", u, key) + if err != nil { + return nil, nil, err + } + + k := new(SSHSigningKey) + resp, err := s.client.Do(ctx, req, k) + if err != nil { + return nil, resp, err + } + + return k, resp, nil +} + +// DeleteKey deletes a SSH signing key for the authenticated user. +// +// GitHub API docs: https://docs.github.com/en/rest/users/ssh-signing-keys#delete-an-ssh-signing-key-for-the-authenticated-user +func (s *UsersService) DeleteSSHSigningKey(ctx context.Context, id int64) (*Response, error) { + u := fmt.Sprintf("user/ssh_signing_keys/%v", id) + + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + + return s.client.Do(ctx, req, nil) +} diff --git a/vendor/github.com/google/go-github/v47/github/with_appengine.go b/vendor/github.com/google/go-github/v48/github/with_appengine.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/with_appengine.go rename to vendor/github.com/google/go-github/v48/github/with_appengine.go diff --git a/vendor/github.com/google/go-github/v47/github/without_appengine.go b/vendor/github.com/google/go-github/v48/github/without_appengine.go similarity index 100% rename from vendor/github.com/google/go-github/v47/github/without_appengine.go rename to vendor/github.com/google/go-github/v48/github/without_appengine.go diff --git a/vendor/modules.txt b/vendor/modules.txt index ba5205cc..876154bd 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -29,9 +29,9 @@ github.com/golang-jwt/jwt # github.com/golang/protobuf v1.5.2 ## explicit; go 1.9 github.com/golang/protobuf/proto -# github.com/google/go-github/v47 v47.1.0 => github.com/gabriel-samfira/go-github/v47 v47.1.1-0.20221013145953-21e3b4d7b0c1 +# github.com/google/go-github/v48 v48.0.0 ## explicit; go 1.17 -github.com/google/go-github/v47/github +github.com/google/go-github/v48/github # github.com/google/go-querystring v1.1.0 ## explicit; go 1.10 github.com/google/go-querystring/query @@ -292,4 +292,3 @@ gorm.io/gorm/logger gorm.io/gorm/migrator gorm.io/gorm/schema gorm.io/gorm/utils -# github.com/google/go-github/v47 => github.com/gabriel-samfira/go-github/v47 v47.1.1-0.20221013145953-21e3b4d7b0c1