diff --git a/github/config.go b/github/config.go index 4eb2c76ef6..1251b1400a 100644 --- a/github/config.go +++ b/github/config.go @@ -8,7 +8,7 @@ import ( "path" "time" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/logging" "github.com/shurcooL/githubv4" "golang.org/x/oauth2" diff --git a/github/data_source_github_branch.go b/github/data_source_github_branch.go index 00ea312fa8..bb84f516ef 100644 --- a/github/data_source_github_branch.go +++ b/github/data_source_github_branch.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/data_source_github_collaborators.go b/github/data_source_github_collaborators.go index 5877f50764..8f5427046c 100644 --- a/github/data_source_github_collaborators.go +++ b/github/data_source_github_collaborators.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/data_source_github_organization.go b/github/data_source_github_organization.go index 31a460ed1d..37604e0dc9 100644 --- a/github/data_source_github_organization.go +++ b/github/data_source_github_organization.go @@ -3,7 +3,7 @@ package github import ( "strconv" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/data_source_github_organization_team_sync_groups.go b/github/data_source_github_organization_team_sync_groups.go index 73a990b0da..850e8a706f 100644 --- a/github/data_source_github_organization_team_sync_groups.go +++ b/github/data_source_github_organization_team_sync_groups.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/data_source_github_ref.go b/github/data_source_github_ref.go index 3fcca6b453..9ab79ddd1d 100644 --- a/github/data_source_github_ref.go +++ b/github/data_source_github_ref.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/data_source_github_release.go b/github/data_source_github_release.go index 9aceeef731..1237464813 100644 --- a/github/data_source_github_release.go +++ b/github/data_source_github_release.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/validation" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/data_source_github_repositories.go b/github/data_source_github_repositories.go index 3f8dae759a..dbf96d64eb 100644 --- a/github/data_source_github_repositories.go +++ b/github/data_source_github_repositories.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/data_source_github_repository.go b/github/data_source_github_repository.go index ff592c0ec9..67f1b22c19 100644 --- a/github/data_source_github_repository.go +++ b/github/data_source_github_repository.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/data_source_github_repository_file.go b/github/data_source_github_repository_file.go index 8bb4cf06d0..4ae30142ae 100644 --- a/github/data_source_github_repository_file.go +++ b/github/data_source_github_repository_file.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/data_source_github_repository_pull_requests.go b/github/data_source_github_repository_pull_requests.go index 0e929390b9..6d8e8145ab 100644 --- a/github/data_source_github_repository_pull_requests.go +++ b/github/data_source_github_repository_pull_requests.go @@ -4,7 +4,7 @@ import ( "context" "strings" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/data_source_github_team.go b/github/data_source_github_team.go index 426d91abcb..b9a97872eb 100644 --- a/github/data_source_github_team.go +++ b/github/data_source_github_team.go @@ -4,7 +4,7 @@ import ( "context" "strconv" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/repository_utils.go b/github/repository_utils.go index 034bf77288..fb2c9f6e35 100644 --- a/github/repository_utils.go +++ b/github/repository_utils.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" ) // checkRepositoryBranchExists tests if a branch exists in a repository. diff --git a/github/resource_github_actions_environment_secret.go b/github/resource_github_actions_environment_secret.go index d0b4dde4f7..f3d273505b 100644 --- a/github/resource_github_actions_environment_secret.go +++ b/github/resource_github_actions_environment_secret.go @@ -6,7 +6,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_actions_organization_permissions.go b/github/resource_github_actions_organization_permissions.go index ab68193d2a..bb2ba39354 100644 --- a/github/resource_github_actions_organization_permissions.go +++ b/github/resource_github_actions_organization_permissions.go @@ -4,7 +4,7 @@ import ( "context" "errors" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_actions_organization_secret.go b/github/resource_github_actions_organization_secret.go index bf9b576309..254deb04b2 100644 --- a/github/resource_github_actions_organization_secret.go +++ b/github/resource_github_actions_organization_secret.go @@ -7,7 +7,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_actions_organization_secret_repositories.go b/github/resource_github_actions_organization_secret_repositories.go index 01006213a3..3e39b96197 100644 --- a/github/resource_github_actions_organization_secret_repositories.go +++ b/github/resource_github_actions_organization_secret_repositories.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_actions_runner_group.go b/github/resource_github_actions_runner_group.go index 98c1d6494e..e77afe566e 100644 --- a/github/resource_github_actions_runner_group.go +++ b/github/resource_github_actions_runner_group.go @@ -7,7 +7,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_actions_secret.go b/github/resource_github_actions_secret.go index 44275d8656..f2595f5b8c 100644 --- a/github/resource_github_actions_secret.go +++ b/github/resource_github_actions_secret.go @@ -7,7 +7,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "golang.org/x/crypto/nacl/box" ) diff --git a/github/resource_github_app_installation_repository.go b/github/resource_github_app_installation_repository.go index 6f59341985..596066d9d6 100644 --- a/github/resource_github_app_installation_repository.go +++ b/github/resource_github_app_installation_repository.go @@ -5,7 +5,7 @@ import ( "log" "strconv" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_branch.go b/github/resource_github_branch.go index a6353dc230..3bd7e9c4e8 100644 --- a/github/resource_github_branch.go +++ b/github/resource_github_branch.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_branch_default.go b/github/resource_github_branch_default.go index 2826714ad8..b087ce077b 100644 --- a/github/resource_github_branch_default.go +++ b/github/resource_github_branch_default.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_branch_protection_v3.go b/github/resource_github_branch_protection_v3.go index 7cdd080be8..8cde59ae95 100644 --- a/github/resource_github_branch_protection_v3.go +++ b/github/resource_github_branch_protection_v3.go @@ -6,7 +6,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_branch_protection_v3_utils.go b/github/resource_github_branch_protection_v3_utils.go index 2c4bf8b37a..ac82f141cd 100644 --- a/github/resource_github_branch_protection_v3_utils.go +++ b/github/resource_github_branch_protection_v3_utils.go @@ -7,7 +7,7 @@ import ( "log" "strings" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_issue.go b/github/resource_github_issue.go index 7d176b4e28..56b0f43c52 100644 --- a/github/resource_github_issue.go +++ b/github/resource_github_issue.go @@ -2,11 +2,12 @@ package github import ( "context" - "github.com/google/go-github/v42/github" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "log" "net/http" "strconv" + + "github.com/google/go-github/v43/github" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func resourceGithubIssue() *schema.Resource { diff --git a/github/resource_github_issue_label.go b/github/resource_github_issue_label.go index 3a60fba397..da515b3543 100644 --- a/github/resource_github_issue_label.go +++ b/github/resource_github_issue_label.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_membership.go b/github/resource_github_membership.go index 9f5bc6e9dc..1f466b96b6 100644 --- a/github/resource_github_membership.go +++ b/github/resource_github_membership.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_membership_test.go b/github/resource_github_membership_test.go index 5c20e67dc3..100e77668f 100644 --- a/github/resource_github_membership_test.go +++ b/github/resource_github_membership_test.go @@ -6,7 +6,7 @@ import ( "fmt" "testing" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) diff --git a/github/resource_github_organization_project.go b/github/resource_github_organization_project.go index f0aba3f195..d12517ed95 100644 --- a/github/resource_github_organization_project.go +++ b/github/resource_github_organization_project.go @@ -7,7 +7,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_organization_project_test.go b/github/resource_github_organization_project_test.go index a1d6aa83b8..3cbfd58e52 100644 --- a/github/resource_github_organization_project_test.go +++ b/github/resource_github_organization_project_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) diff --git a/github/resource_github_organization_webhook.go b/github/resource_github_organization_webhook.go index b35fda6ffe..a1ca185bb6 100644 --- a/github/resource_github_organization_webhook.go +++ b/github/resource_github_organization_webhook.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_project_card.go b/github/resource_github_project_card.go index c883c8e0b9..5b8bd1394b 100644 --- a/github/resource_github_project_card.go +++ b/github/resource_github_project_card.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_project_column.go b/github/resource_github_project_column.go index 14e7a14326..6e7df6302b 100644 --- a/github/resource_github_project_column.go +++ b/github/resource_github_project_column.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_project_column_test.go b/github/resource_github_project_column_test.go index ba489e8946..62ae08f8a1 100644 --- a/github/resource_github_project_column_test.go +++ b/github/resource_github_project_column_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) diff --git a/github/resource_github_repository.go b/github/resource_github_repository.go index 9c87f748aa..38567d5d45 100644 --- a/github/resource_github_repository.go +++ b/github/resource_github_repository.go @@ -9,7 +9,7 @@ import ( "regexp" "strings" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_repository_autolink_reference.go b/github/resource_github_repository_autolink_reference.go index 5546da16c7..59e3723f5f 100644 --- a/github/resource_github_repository_autolink_reference.go +++ b/github/resource_github_repository_autolink_reference.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_repository_collaborator.go b/github/resource_github_repository_collaborator.go index 635956d01f..a1f8ad16f5 100644 --- a/github/resource_github_repository_collaborator.go +++ b/github/resource_github_repository_collaborator.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_repository_deploy_key.go b/github/resource_github_repository_deploy_key.go index 35fc94bb25..91a8113839 100644 --- a/github/resource_github_repository_deploy_key.go +++ b/github/resource_github_repository_deploy_key.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_repository_environment.go b/github/resource_github_repository_environment.go index ba1d9c7c8a..c2dd7b2f71 100644 --- a/github/resource_github_repository_environment.go +++ b/github/resource_github_repository_environment.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_repository_file.go b/github/resource_github_repository_file.go index 82842fcd38..f9a923f88e 100644 --- a/github/resource_github_repository_file.go +++ b/github/resource_github_repository_file.go @@ -7,7 +7,7 @@ import ( "fmt" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_repository_milestone.go b/github/resource_github_repository_milestone.go index 553fcf6b59..7e0c430177 100644 --- a/github/resource_github_repository_milestone.go +++ b/github/resource_github_repository_milestone.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_repository_project.go b/github/resource_github_repository_project.go index 60ae47a2a7..9db834a374 100644 --- a/github/resource_github_repository_project.go +++ b/github/resource_github_repository_project.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_repository_pull_request.go b/github/resource_github_repository_pull_request.go index c2a4eb0a2b..826b64aa21 100644 --- a/github/resource_github_repository_pull_request.go +++ b/github/resource_github_repository_pull_request.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_repository_webhook.go b/github/resource_github_repository_webhook.go index e648c1a705..8040abc649 100644 --- a/github/resource_github_repository_webhook.go +++ b/github/resource_github_repository_webhook.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_team.go b/github/resource_github_team.go index 9f4c0f194c..1661e45c81 100644 --- a/github/resource_github_team.go +++ b/github/resource_github_team.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/shurcooL/githubv4" diff --git a/github/resource_github_team_members.go b/github/resource_github_team_members.go index 241a458857..906c22cdcb 100644 --- a/github/resource_github_team_members.go +++ b/github/resource_github_team_members.go @@ -6,7 +6,7 @@ import ( "reflect" "strconv" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_team_members_test.go b/github/resource_github_team_members_test.go index e0f2cb4789..2db2243702 100644 --- a/github/resource_github_team_members_test.go +++ b/github/resource_github_team_members_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" diff --git a/github/resource_github_team_membership.go b/github/resource_github_team_membership.go index 8899becdab..ad712229da 100644 --- a/github/resource_github_team_membership.go +++ b/github/resource_github_team_membership.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_team_membership_test.go b/github/resource_github_team_membership_test.go index c203c9e3f2..054f69f9ca 100644 --- a/github/resource_github_team_membership_test.go +++ b/github/resource_github_team_membership_test.go @@ -7,7 +7,7 @@ import ( "strconv" "testing" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" diff --git a/github/resource_github_team_repository.go b/github/resource_github_team_repository.go index bd08f4855a..f9784ccdb6 100644 --- a/github/resource_github_team_repository.go +++ b/github/resource_github_team_repository.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_team_sync_group_mapping.go b/github/resource_github_team_sync_group_mapping.go index 9c0bf4a6cb..075b8a3cd5 100644 --- a/github/resource_github_team_sync_group_mapping.go +++ b/github/resource_github_team_sync_group_mapping.go @@ -6,7 +6,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_team_sync_group_mapping_test.go b/github/resource_github_team_sync_group_mapping_test.go index 57cbb23d4a..d6339cfee0 100644 --- a/github/resource_github_team_sync_group_mapping_test.go +++ b/github/resource_github_team_sync_group_mapping_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" diff --git a/github/resource_github_user_gpg_key.go b/github/resource_github_user_gpg_key.go index 7f0eb8a35e..68acfc4b83 100644 --- a/github/resource_github_user_gpg_key.go +++ b/github/resource_github_user_gpg_key.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_user_ssh_key.go b/github/resource_github_user_ssh_key.go index 1c21a8b732..15bae317d4 100644 --- a/github/resource_github_user_ssh_key.go +++ b/github/resource_github_user_ssh_key.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_organization_block.go b/github/resource_organization_block.go index 3e5a4c02c3..5dfd4d23ae 100644 --- a/github/resource_organization_block.go +++ b/github/resource_organization_block.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/transport.go b/github/transport.go index b0c5f8788e..b8f3f29d16 100644 --- a/github/transport.go +++ b/github/transport.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" ) const ( diff --git a/github/transport_test.go b/github/transport_test.go index 5b8b3aa734..aa74737f42 100644 --- a/github/transport_test.go +++ b/github/transport_test.go @@ -10,7 +10,7 @@ import ( "net/url" "testing" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" ) func TestEtagTransport(t *testing.T) { diff --git a/github/util_permissions.go b/github/util_permissions.go index 3f55d627f8..41479b54d9 100644 --- a/github/util_permissions.go +++ b/github/util_permissions.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/google/go-github/v42/github" + "github.com/google/go-github/v43/github" ) const ( diff --git a/go.mod b/go.mod index 3a9f8f4001..ac290ff9b5 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.16 require ( github.com/client9/misspell v0.3.4 github.com/golangci/golangci-lint v1.25.1 - github.com/google/go-github/v42 v42.0.0 + github.com/google/go-github/v43 v43.0.0 github.com/hashicorp/go-getter v1.4.2-0.20200106182914-9813cbd4eb02 // indirect github.com/hashicorp/hcl/v2 v2.3.0 // indirect github.com/hashicorp/terraform-config-inspect v0.0.0-20191212124732-c6ae6269b9d7 // indirect diff --git a/go.sum b/go.sum index 06c432f125..d6389ba915 100644 --- a/go.sum +++ b/go.sum @@ -43,6 +43,7 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bombsimon/wsl/v3 v3.0.0 h1:w9f49xQatuaeTJFaNP4SpiWSR5vfT6IstPtM62JjcqA= github.com/bombsimon/wsl/v3 v3.0.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/bradleyfalzon/ghinstallation/v2 v2.0.3/go.mod h1:tlgi+JWCXnKFx/Y4WtnDbZEINo31N5bcvnCoqieefmk= +github.com/bradleyfalzon/ghinstallation/v2 v2.0.4/go.mod h1:B40qPqJxWE0jDZgOR1JmaMy+4AY1eBP+IByOvqyAKp0= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= @@ -159,9 +160,11 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-github/v39 v39.0.0/go.mod h1:C1s8C5aCC9L+JXIYpJM5GYytdX52vC1bLvHEF1IhBrE= -github.com/google/go-github/v42 v42.0.0 h1:YNT0FwjPrEysRkLIiKuEfSvBPCGKphW5aS5PxwaoLec= -github.com/google/go-github/v42 v42.0.0/go.mod h1:jgg/jvyI0YlDOM1/ps6XYh04HNQ3vKf0CVko62/EhRg= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-github/v41 v41.0.0/go.mod h1:XgmCA5H323A9rtgExdTcnDkcqp6S30AVACCBDOonIxg= +github.com/google/go-github/v43 v43.0.0 h1:y+GL7LIsAIF2NZlJ46ZoC/D1W1ivZasT0lnWHMYPZ+U= +github.com/google/go-github/v43 v43.0.0/go.mod h1:ZkTvvmCXBvsfPpTHXnH/d2hP9Y0cTbvN9kr5xqyXOIc= 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 h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= diff --git a/vendor/github.com/google/go-cmp/cmp/compare.go b/vendor/github.com/google/go-cmp/cmp/compare.go index 86d0903b8b..2a5446762c 100644 --- a/vendor/github.com/google/go-cmp/cmp/compare.go +++ b/vendor/github.com/google/go-cmp/cmp/compare.go @@ -36,7 +36,6 @@ import ( "strings" "github.com/google/go-cmp/cmp/internal/diff" - "github.com/google/go-cmp/cmp/internal/flags" "github.com/google/go-cmp/cmp/internal/function" "github.com/google/go-cmp/cmp/internal/value" ) @@ -319,7 +318,6 @@ func (s *state) tryMethod(t reflect.Type, vx, vy reflect.Value) bool { } func (s *state) callTRFunc(f, v reflect.Value, step Transform) reflect.Value { - v = sanitizeValue(v, f.Type().In(0)) if !s.dynChecker.Next() { return f.Call([]reflect.Value{v})[0] } @@ -343,8 +341,6 @@ func (s *state) callTRFunc(f, v reflect.Value, step Transform) reflect.Value { } func (s *state) callTTBFunc(f, x, y reflect.Value) bool { - x = sanitizeValue(x, f.Type().In(0)) - y = sanitizeValue(y, f.Type().In(1)) if !s.dynChecker.Next() { return f.Call([]reflect.Value{x, y})[0].Bool() } @@ -372,19 +368,6 @@ func detectRaces(c chan<- reflect.Value, f reflect.Value, vs ...reflect.Value) { ret = f.Call(vs)[0] } -// sanitizeValue converts nil interfaces of type T to those of type R, -// assuming that T is assignable to R. -// Otherwise, it returns the input value as is. -func sanitizeValue(v reflect.Value, t reflect.Type) reflect.Value { - // TODO(≥go1.10): Workaround for reflect bug (https://golang.org/issue/22143). - if !flags.AtLeastGo110 { - if v.Kind() == reflect.Interface && v.IsNil() && v.Type() != t { - return reflect.New(t).Elem() - } - } - return v -} - func (s *state) compareStruct(t reflect.Type, vx, vy reflect.Value) { var addr bool var vax, vay reflect.Value // Addressable versions of vx and vy diff --git a/vendor/github.com/google/go-cmp/cmp/export_panic.go b/vendor/github.com/google/go-cmp/cmp/export_panic.go index 5ff0b4218c..ae851fe53f 100644 --- a/vendor/github.com/google/go-cmp/cmp/export_panic.go +++ b/vendor/github.com/google/go-cmp/cmp/export_panic.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build purego // +build purego package cmp diff --git a/vendor/github.com/google/go-cmp/cmp/export_unsafe.go b/vendor/github.com/google/go-cmp/cmp/export_unsafe.go index 21eb54858e..e2c0f74e83 100644 --- a/vendor/github.com/google/go-cmp/cmp/export_unsafe.go +++ b/vendor/github.com/google/go-cmp/cmp/export_unsafe.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !purego // +build !purego package cmp diff --git a/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go b/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go index 1daaaacc5e..36062a604c 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !cmp_debug // +build !cmp_debug package diff diff --git a/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go b/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go index 4b91dbcaca..a3b97a1ad5 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build cmp_debug // +build cmp_debug package diff diff --git a/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_legacy.go b/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_legacy.go deleted file mode 100644 index 82d1d7fbf8..0000000000 --- a/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_legacy.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2019, The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.10 - -package flags - -// AtLeastGo110 reports whether the Go toolchain is at least Go 1.10. -const AtLeastGo110 = false diff --git a/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_recent.go b/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_recent.go deleted file mode 100644 index 8646f05293..0000000000 --- a/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_recent.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2019, The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.10 - -package flags - -// AtLeastGo110 reports whether the Go toolchain is at least Go 1.10. -const AtLeastGo110 = true diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/name.go b/vendor/github.com/google/go-cmp/cmp/internal/value/name.go index b6c12cefb4..7b498bb2cb 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/value/name.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/name.go @@ -9,6 +9,8 @@ import ( "strconv" ) +var anyType = reflect.TypeOf((*interface{})(nil)).Elem() + // TypeString is nearly identical to reflect.Type.String, // but has an additional option to specify that full type names be used. func TypeString(t reflect.Type, qualified bool) string { @@ -20,6 +22,11 @@ func appendTypeName(b []byte, t reflect.Type, qualified, elideFunc bool) []byte // of the same name and within the same package, // but declared within the namespace of different functions. + // Use the "any" alias instead of "interface{}" for better readability. + if t == anyType { + return append(b, "any"...) + } + // Named type. if t.Name() != "" { if qualified && t.PkgPath() != "" { diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go index 44f4a5afdd..1a71bfcbd3 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build purego // +build purego package value diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go index a605953d46..16e6860af6 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !purego // +build !purego package value diff --git a/vendor/github.com/google/go-cmp/cmp/path.go b/vendor/github.com/google/go-cmp/cmp/path.go index f01eff318c..c710034632 100644 --- a/vendor/github.com/google/go-cmp/cmp/path.go +++ b/vendor/github.com/google/go-cmp/cmp/path.go @@ -178,7 +178,7 @@ type structField struct { unexported bool mayForce bool // Forcibly allow visibility paddr bool // Was parent addressable? - pvx, pvy reflect.Value // Parent values (always addressible) + pvx, pvy reflect.Value // Parent values (always addressable) field reflect.StructField // Field information } diff --git a/vendor/github.com/google/go-cmp/cmp/report_reflect.go b/vendor/github.com/google/go-cmp/cmp/report_reflect.go index 33f03577f9..76c04fdbd6 100644 --- a/vendor/github.com/google/go-cmp/cmp/report_reflect.go +++ b/vendor/github.com/google/go-cmp/cmp/report_reflect.go @@ -207,9 +207,10 @@ func (opts formatOptions) FormatValue(v reflect.Value, parentKind reflect.Kind, // Check whether this is a []byte of text data. if t.Elem() == reflect.TypeOf(byte(0)) { b := v.Bytes() - isPrintSpace := func(r rune) bool { return unicode.IsPrint(r) && unicode.IsSpace(r) } + isPrintSpace := func(r rune) bool { return unicode.IsPrint(r) || unicode.IsSpace(r) } if len(b) > 0 && utf8.Valid(b) && len(bytes.TrimFunc(b, isPrintSpace)) == 0 { out = opts.formatString("", string(b)) + skipType = true return opts.WithTypeMode(emitType).FormatType(t, out) } } diff --git a/vendor/github.com/google/go-cmp/cmp/report_slices.go b/vendor/github.com/google/go-cmp/cmp/report_slices.go index 2ad3bc85ba..68b5c1ae16 100644 --- a/vendor/github.com/google/go-cmp/cmp/report_slices.go +++ b/vendor/github.com/google/go-cmp/cmp/report_slices.go @@ -80,7 +80,7 @@ func (opts formatOptions) CanFormatDiffSlice(v *valueNode) bool { } // Use specialized string diffing for longer slices or strings. - const minLength = 64 + const minLength = 32 return vx.Len() >= minLength && vy.Len() >= minLength } @@ -563,10 +563,10 @@ func cleanupSurroundingIdentical(groups []diffStats, eq func(i, j int) bool) []d nx := ds.NumIdentical + ds.NumRemoved + ds.NumModified ny := ds.NumIdentical + ds.NumInserted + ds.NumModified var numLeadingIdentical, numTrailingIdentical int - for i := 0; i < nx && i < ny && eq(ix+i, iy+i); i++ { + for j := 0; j < nx && j < ny && eq(ix+j, iy+j); j++ { numLeadingIdentical++ } - for i := 0; i < nx && i < ny && eq(ix+nx-1-i, iy+ny-1-i); i++ { + for j := 0; j < nx && j < ny && eq(ix+nx-1-j, iy+ny-1-j); j++ { numTrailingIdentical++ } if numIdentical := numLeadingIdentical + numTrailingIdentical; numIdentical > 0 { diff --git a/vendor/github.com/google/go-github/v42/AUTHORS b/vendor/github.com/google/go-github/v43/AUTHORS similarity index 100% rename from vendor/github.com/google/go-github/v42/AUTHORS rename to vendor/github.com/google/go-github/v43/AUTHORS diff --git a/vendor/github.com/google/go-github/v42/LICENSE b/vendor/github.com/google/go-github/v43/LICENSE similarity index 100% rename from vendor/github.com/google/go-github/v42/LICENSE rename to vendor/github.com/google/go-github/v43/LICENSE diff --git a/vendor/github.com/google/go-github/v42/github/actions.go b/vendor/github.com/google/go-github/v43/github/actions.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/actions.go rename to vendor/github.com/google/go-github/v43/github/actions.go diff --git a/vendor/github.com/google/go-github/v42/github/actions_artifacts.go b/vendor/github.com/google/go-github/v43/github/actions_artifacts.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/actions_artifacts.go rename to vendor/github.com/google/go-github/v43/github/actions_artifacts.go diff --git a/vendor/github.com/google/go-github/v42/github/actions_runner_groups.go b/vendor/github.com/google/go-github/v43/github/actions_runner_groups.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/actions_runner_groups.go rename to vendor/github.com/google/go-github/v43/github/actions_runner_groups.go diff --git a/vendor/github.com/google/go-github/v42/github/actions_runners.go b/vendor/github.com/google/go-github/v43/github/actions_runners.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/actions_runners.go rename to vendor/github.com/google/go-github/v43/github/actions_runners.go diff --git a/vendor/github.com/google/go-github/v42/github/actions_secrets.go b/vendor/github.com/google/go-github/v43/github/actions_secrets.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/actions_secrets.go rename to vendor/github.com/google/go-github/v43/github/actions_secrets.go diff --git a/vendor/github.com/google/go-github/v42/github/actions_workflow_jobs.go b/vendor/github.com/google/go-github/v43/github/actions_workflow_jobs.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/actions_workflow_jobs.go rename to vendor/github.com/google/go-github/v43/github/actions_workflow_jobs.go diff --git a/vendor/github.com/google/go-github/v42/github/actions_workflow_runs.go b/vendor/github.com/google/go-github/v43/github/actions_workflow_runs.go similarity index 91% rename from vendor/github.com/google/go-github/v42/github/actions_workflow_runs.go rename to vendor/github.com/google/go-github/v43/github/actions_workflow_runs.go index 1e1ff61ae8..273d2cc466 100644 --- a/vendor/github.com/google/go-github/v42/github/actions_workflow_runs.go +++ b/vendor/github.com/google/go-github/v43/github/actions_workflow_runs.go @@ -88,6 +88,11 @@ type WorkflowRunJobRun struct { DurationMS *int64 `json:"duration_ms,omitempty"` } +// WorkflowRunAttemptOptions specifies optional parameters to GetWorkflowRunAttempt. +type WorkflowRunAttemptOptions struct { + ExcludePullRequests *bool `url:"exclude_pull_requests,omitempty"` +} + func (s *ActionsService) listWorkflowRuns(ctx context.Context, endpoint string, opts *ListWorkflowRunsOptions) (*WorkflowRuns, *Response, error) { u, err := addOptions(endpoint, opts) if err != nil { @@ -168,6 +173,30 @@ func (s *ActionsService) GetWorkflowRunByID(ctx context.Context, owner, repo str return run, resp, nil } +// GetWorkflowRunAttempt gets a specific workflow run attempt. +// +// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#get-a-workflow-run-attempt +func (s *ActionsService) GetWorkflowRunAttempt(ctx context.Context, owner, repo string, runID int64, attemptNumber int, opts *WorkflowRunAttemptOptions) (*WorkflowRun, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/actions/runs/%v/attempts/%v", owner, repo, runID, attemptNumber) + 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 + } + + run := new(WorkflowRun) + resp, err := s.client.Do(ctx, req, run) + if err != nil { + return nil, resp, err + } + + return run, resp, nil +} + // RerunWorkflowByID re-runs a workflow by ID. // // GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions/#re-run-a-workflow diff --git a/vendor/github.com/google/go-github/v42/github/actions_workflows.go b/vendor/github.com/google/go-github/v43/github/actions_workflows.go similarity index 99% rename from vendor/github.com/google/go-github/v42/github/actions_workflows.go rename to vendor/github.com/google/go-github/v43/github/actions_workflows.go index 3ce926fed6..e0568462e8 100644 --- a/vendor/github.com/google/go-github/v42/github/actions_workflows.go +++ b/vendor/github.com/google/go-github/v43/github/actions_workflows.go @@ -50,7 +50,7 @@ type WorkflowBill struct { // CreateWorkflowDispatchEventRequest represents a request to create a workflow dispatch event. type CreateWorkflowDispatchEventRequest struct { // Ref represents the reference of the workflow run. - // The reference can be a branch, tag, or a commit SHA. + // The reference can be a branch or a tag. // Ref is required when creating a workflow dispatch event. Ref string `json:"ref"` // Inputs represents input keys and values configured in the workflow file. diff --git a/vendor/github.com/google/go-github/v42/github/activity.go b/vendor/github.com/google/go-github/v43/github/activity.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/activity.go rename to vendor/github.com/google/go-github/v43/github/activity.go diff --git a/vendor/github.com/google/go-github/v42/github/activity_events.go b/vendor/github.com/google/go-github/v43/github/activity_events.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/activity_events.go rename to vendor/github.com/google/go-github/v43/github/activity_events.go diff --git a/vendor/github.com/google/go-github/v42/github/activity_notifications.go b/vendor/github.com/google/go-github/v43/github/activity_notifications.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/activity_notifications.go rename to vendor/github.com/google/go-github/v43/github/activity_notifications.go diff --git a/vendor/github.com/google/go-github/v42/github/activity_star.go b/vendor/github.com/google/go-github/v43/github/activity_star.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/activity_star.go rename to vendor/github.com/google/go-github/v43/github/activity_star.go diff --git a/vendor/github.com/google/go-github/v42/github/activity_watching.go b/vendor/github.com/google/go-github/v43/github/activity_watching.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/activity_watching.go rename to vendor/github.com/google/go-github/v43/github/activity_watching.go diff --git a/vendor/github.com/google/go-github/v42/github/admin.go b/vendor/github.com/google/go-github/v43/github/admin.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/admin.go rename to vendor/github.com/google/go-github/v43/github/admin.go diff --git a/vendor/github.com/google/go-github/v42/github/admin_orgs.go b/vendor/github.com/google/go-github/v43/github/admin_orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/admin_orgs.go rename to vendor/github.com/google/go-github/v43/github/admin_orgs.go diff --git a/vendor/github.com/google/go-github/v42/github/admin_stats.go b/vendor/github.com/google/go-github/v43/github/admin_stats.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/admin_stats.go rename to vendor/github.com/google/go-github/v43/github/admin_stats.go diff --git a/vendor/github.com/google/go-github/v42/github/admin_users.go b/vendor/github.com/google/go-github/v43/github/admin_users.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/admin_users.go rename to vendor/github.com/google/go-github/v43/github/admin_users.go diff --git a/vendor/github.com/google/go-github/v42/github/apps.go b/vendor/github.com/google/go-github/v43/github/apps.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/apps.go rename to vendor/github.com/google/go-github/v43/github/apps.go diff --git a/vendor/github.com/google/go-github/v42/github/apps_hooks.go b/vendor/github.com/google/go-github/v43/github/apps_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/apps_hooks.go rename to vendor/github.com/google/go-github/v43/github/apps_hooks.go diff --git a/vendor/github.com/google/go-github/v42/github/apps_hooks_deliveries.go b/vendor/github.com/google/go-github/v43/github/apps_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/apps_hooks_deliveries.go rename to vendor/github.com/google/go-github/v43/github/apps_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v42/github/apps_installation.go b/vendor/github.com/google/go-github/v43/github/apps_installation.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/apps_installation.go rename to vendor/github.com/google/go-github/v43/github/apps_installation.go diff --git a/vendor/github.com/google/go-github/v42/github/apps_manifest.go b/vendor/github.com/google/go-github/v43/github/apps_manifest.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/apps_manifest.go rename to vendor/github.com/google/go-github/v43/github/apps_manifest.go diff --git a/vendor/github.com/google/go-github/v42/github/apps_marketplace.go b/vendor/github.com/google/go-github/v43/github/apps_marketplace.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/apps_marketplace.go rename to vendor/github.com/google/go-github/v43/github/apps_marketplace.go diff --git a/vendor/github.com/google/go-github/v42/github/authorizations.go b/vendor/github.com/google/go-github/v43/github/authorizations.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/authorizations.go rename to vendor/github.com/google/go-github/v43/github/authorizations.go diff --git a/vendor/github.com/google/go-github/v42/github/billing.go b/vendor/github.com/google/go-github/v43/github/billing.go similarity index 99% rename from vendor/github.com/google/go-github/v42/github/billing.go rename to vendor/github.com/google/go-github/v43/github/billing.go index 12a79fa60a..8921833bdb 100644 --- a/vendor/github.com/google/go-github/v42/github/billing.go +++ b/vendor/github.com/google/go-github/v43/github/billing.go @@ -19,7 +19,7 @@ type BillingService service // ActionBilling represents a GitHub Action billing. type ActionBilling struct { TotalMinutesUsed int `json:"total_minutes_used"` - TotalPaidMinutesUsed int `json:"total_paid_minutes_used"` + TotalPaidMinutesUsed float64 `json:"total_paid_minutes_used"` IncludedMinutes int `json:"included_minutes"` MinutesUsedBreakdown MinutesUsedBreakdown `json:"minutes_used_breakdown"` } diff --git a/vendor/github.com/google/go-github/v42/github/checks.go b/vendor/github.com/google/go-github/v43/github/checks.go similarity index 96% rename from vendor/github.com/google/go-github/v42/github/checks.go rename to vendor/github.com/google/go-github/v43/github/checks.go index 253d351896..8e388e8675 100644 --- a/vendor/github.com/google/go-github/v42/github/checks.go +++ b/vendor/github.com/google/go-github/v43/github/checks.go @@ -106,6 +106,8 @@ func (s *ChecksService) GetCheckRun(ctx context.Context, owner, repo string, che return nil, nil, err } + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + checkRun := new(CheckRun) resp, err := s.client.Do(ctx, req, checkRun) if err != nil { @@ -125,6 +127,8 @@ func (s *ChecksService) GetCheckSuite(ctx context.Context, owner, repo string, c return nil, nil, err } + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + checkSuite := new(CheckSuite) resp, err := s.client.Do(ctx, req, checkSuite) if err != nil { @@ -165,6 +169,8 @@ func (s *ChecksService) CreateCheckRun(ctx context.Context, owner, repo string, return nil, nil, err } + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + checkRun := new(CheckRun) resp, err := s.client.Do(ctx, req, checkRun) if err != nil { @@ -196,6 +202,8 @@ func (s *ChecksService) UpdateCheckRun(ctx context.Context, owner, repo string, return nil, nil, err } + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + checkRun := new(CheckRun) resp, err := s.client.Do(ctx, req, checkRun) if err != nil { @@ -220,6 +228,8 @@ func (s *ChecksService) ListCheckRunAnnotations(ctx context.Context, owner, repo return nil, nil, err } + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + var checkRunAnnotations []*CheckRunAnnotation resp, err := s.client.Do(ctx, req, &checkRunAnnotations) if err != nil { @@ -260,6 +270,8 @@ func (s *ChecksService) ListCheckRunsForRef(ctx context.Context, owner, repo, re return nil, nil, err } + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + var checkRunResults *ListCheckRunsResults resp, err := s.client.Do(ctx, req, &checkRunResults) if err != nil { @@ -284,6 +296,8 @@ func (s *ChecksService) ListCheckRunsCheckSuite(ctx context.Context, owner, repo return nil, nil, err } + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + var checkRunResults *ListCheckRunsResults resp, err := s.client.Do(ctx, req, &checkRunResults) if err != nil { @@ -322,6 +336,8 @@ func (s *ChecksService) ListCheckSuitesForRef(ctx context.Context, owner, repo, return nil, nil, err } + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + var checkSuiteResults *ListCheckSuiteResults resp, err := s.client.Do(ctx, req, &checkSuiteResults) if err != nil { @@ -363,6 +379,8 @@ func (s *ChecksService) SetCheckSuitePreferences(ctx context.Context, owner, rep return nil, nil, err } + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + var checkSuitePrefResults *CheckSuitePreferenceResults resp, err := s.client.Do(ctx, req, &checkSuitePrefResults) if err != nil { @@ -388,6 +406,8 @@ func (s *ChecksService) CreateCheckSuite(ctx context.Context, owner, repo string return nil, nil, err } + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + checkSuite := new(CheckSuite) resp, err := s.client.Do(ctx, req, checkSuite) if err != nil { @@ -408,6 +428,8 @@ func (s *ChecksService) ReRequestCheckSuite(ctx context.Context, owner, repo str return nil, err } + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + resp, err := s.client.Do(ctx, req, nil) return resp, err } diff --git a/vendor/github.com/google/go-github/v42/github/code-scanning.go b/vendor/github.com/google/go-github/v43/github/code-scanning.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/code-scanning.go rename to vendor/github.com/google/go-github/v43/github/code-scanning.go diff --git a/vendor/github.com/google/go-github/v42/github/dependabot.go b/vendor/github.com/google/go-github/v43/github/dependabot.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/dependabot.go rename to vendor/github.com/google/go-github/v43/github/dependabot.go diff --git a/vendor/github.com/google/go-github/v42/github/dependabot_secrets.go b/vendor/github.com/google/go-github/v43/github/dependabot_secrets.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/dependabot_secrets.go rename to vendor/github.com/google/go-github/v43/github/dependabot_secrets.go diff --git a/vendor/github.com/google/go-github/v42/github/doc.go b/vendor/github.com/google/go-github/v43/github/doc.go similarity index 99% rename from vendor/github.com/google/go-github/v42/github/doc.go rename to vendor/github.com/google/go-github/v43/github/doc.go index 556d27c4bf..8f16c65846 100644 --- a/vendor/github.com/google/go-github/v42/github/doc.go +++ b/vendor/github.com/google/go-github/v43/github/doc.go @@ -8,7 +8,7 @@ Package github provides a client for using the GitHub API. Usage: - import "github.com/google/go-github/v42/github" // with go modules enabled (GO111MODULE=on or outside GOPATH) + import "github.com/google/go-github/v43/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/v42/github/enterprise.go b/vendor/github.com/google/go-github/v43/github/enterprise.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/enterprise.go rename to vendor/github.com/google/go-github/v43/github/enterprise.go diff --git a/vendor/github.com/google/go-github/v42/github/enterprise_actions_runners.go b/vendor/github.com/google/go-github/v43/github/enterprise_actions_runners.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/enterprise_actions_runners.go rename to vendor/github.com/google/go-github/v43/github/enterprise_actions_runners.go diff --git a/vendor/github.com/google/go-github/v42/github/enterprise_audit_log.go b/vendor/github.com/google/go-github/v43/github/enterprise_audit_log.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/enterprise_audit_log.go rename to vendor/github.com/google/go-github/v43/github/enterprise_audit_log.go diff --git a/vendor/github.com/google/go-github/v42/github/event.go b/vendor/github.com/google/go-github/v43/github/event.go similarity index 98% rename from vendor/github.com/google/go-github/v42/github/event.go rename to vendor/github.com/google/go-github/v43/github/event.go index 136abb273d..9a39e2e95f 100644 --- a/vendor/github.com/google/go-github/v42/github/event.go +++ b/vendor/github.com/google/go-github/v43/github/event.go @@ -114,6 +114,8 @@ func (e *Event) ParsePayload() (payload interface{}, err error) { payload = &RepositoryDispatchEvent{} case "RepositoryVulnerabilityAlertEvent": payload = &RepositoryVulnerabilityAlertEvent{} + case "SecretScanningAlertEvent": + payload = &SecretScanningAlertEvent{} case "StarEvent": payload = &StarEvent{} case "StatusEvent": diff --git a/vendor/github.com/google/go-github/v42/github/event_types.go b/vendor/github.com/google/go-github/v43/github/event_types.go similarity index 97% rename from vendor/github.com/google/go-github/v42/github/event_types.go rename to vendor/github.com/google/go-github/v43/github/event_types.go index 6a806c4a1e..c940ec8f12 100644 --- a/vendor/github.com/google/go-github/v42/github/event_types.go +++ b/vendor/github.com/google/go-github/v43/github/event_types.go @@ -145,7 +145,15 @@ type DeployKeyEvent struct { // The deploy key resource. Key *Key `json:"key,omitempty"` + // The Repository where the event occurred + Repo *Repository `json:"repository,omitempty"` + + // The following field is only present when the webhook is triggered on + // a repository belonging to an organization. + Organization *Organization `json:"organization,omitempty"` + // The following fields are only populated by Webhook events. + Sender *User `json:"sender,omitempty"` Installation *Installation `json:"installation,omitempty"` } @@ -1057,6 +1065,26 @@ type RepositoryVulnerabilityAlert struct { DismissedAt *Timestamp `json:"dismissed_at,omitempty"` } +// SecretScanningAlertEvent is triggered when a secret scanning alert occurs in a repository. +// The Webhook name is secret_scanning_alert. +// +// GitHub API docs: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#secret_scanning_alert +type SecretScanningAlertEvent struct { + // Action is the action that was performed. Possible values are: "created", "resolved", or "reopened". + Action *string `json:"action,omitempty"` + + // Alert is the secret scanning alert involved in the event. + Alert *SecretScanningAlert `json:"alert,omitempty"` + + // Only populated by the "resolved" and "reopen" actions + Sender *User `json:"sender,omitempty"` + // The following fields are only populated by Webhook events. + Repo *Repository `json:"repository,omitempty"` + Organization *Organization `json:"organization,omitempty"` + Enterprise *Enterprise `json:"enterprise,omitempty"` + Installation *Installation `json:"installation,omitempty"` +} + // StarEvent is triggered when a star is added or removed from a repository. // The Webhook event name is "star". // diff --git a/vendor/github.com/google/go-github/v42/github/gists.go b/vendor/github.com/google/go-github/v43/github/gists.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/gists.go rename to vendor/github.com/google/go-github/v43/github/gists.go diff --git a/vendor/github.com/google/go-github/v42/github/gists_comments.go b/vendor/github.com/google/go-github/v43/github/gists_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/gists_comments.go rename to vendor/github.com/google/go-github/v43/github/gists_comments.go diff --git a/vendor/github.com/google/go-github/v42/github/git.go b/vendor/github.com/google/go-github/v43/github/git.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/git.go rename to vendor/github.com/google/go-github/v43/github/git.go diff --git a/vendor/github.com/google/go-github/v42/github/git_blobs.go b/vendor/github.com/google/go-github/v43/github/git_blobs.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/git_blobs.go rename to vendor/github.com/google/go-github/v43/github/git_blobs.go diff --git a/vendor/github.com/google/go-github/v42/github/git_commits.go b/vendor/github.com/google/go-github/v43/github/git_commits.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/git_commits.go rename to vendor/github.com/google/go-github/v43/github/git_commits.go diff --git a/vendor/github.com/google/go-github/v42/github/git_refs.go b/vendor/github.com/google/go-github/v43/github/git_refs.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/git_refs.go rename to vendor/github.com/google/go-github/v43/github/git_refs.go diff --git a/vendor/github.com/google/go-github/v42/github/git_tags.go b/vendor/github.com/google/go-github/v43/github/git_tags.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/git_tags.go rename to vendor/github.com/google/go-github/v43/github/git_tags.go diff --git a/vendor/github.com/google/go-github/v42/github/git_trees.go b/vendor/github.com/google/go-github/v43/github/git_trees.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/git_trees.go rename to vendor/github.com/google/go-github/v43/github/git_trees.go diff --git a/vendor/github.com/google/go-github/v42/github/github-accessors.go b/vendor/github.com/google/go-github/v43/github/github-accessors.go similarity index 98% rename from vendor/github.com/google/go-github/v42/github/github-accessors.go rename to vendor/github.com/google/go-github/v43/github/github-accessors.go index 12d6019f0a..6c13f545cd 100644 --- a/vendor/github.com/google/go-github/v42/github/github-accessors.go +++ b/vendor/github.com/google/go-github/v43/github/github-accessors.go @@ -316,6 +316,14 @@ func (a *AnalysesListOptions) GetSarifID() string { return *a.SarifID } +// GetSSHKeyFingerprints returns the SSHKeyFingerprints map if it's non-nil, an empty map otherwise. +func (a *APIMeta) GetSSHKeyFingerprints() map[string]string { + if a == nil || a.SSHKeyFingerprints == nil { + return map[string]string{} + } + return a.SSHKeyFingerprints +} + // GetVerifiablePasswordAuthentication returns the VerifiablePasswordAuthentication field if it's non-nil, zero value otherwise. func (a *APIMeta) GetVerifiablePasswordAuthentication() bool { if a == nil || a.VerifiablePasswordAuthentication == nil { @@ -3444,6 +3452,30 @@ func (d *DeployKeyEvent) GetKey() *Key { return d.Key } +// GetOrganization returns the Organization field. +func (d *DeployKeyEvent) GetOrganization() *Organization { + if d == nil { + return nil + } + return d.Organization +} + +// GetRepo returns the Repo field. +func (d *DeployKeyEvent) GetRepo() *Repository { + if d == nil { + return nil + } + return d.Repo +} + +// GetSender returns the Sender field. +func (d *DeployKeyEvent) GetSender() *User { + if d == nil { + return nil + } + return d.Sender +} + // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. func (d *Deployment) GetCreatedAt() Timestamp { if d == nil || d.CreatedAt == nil { @@ -10484,6 +10516,22 @@ func (p *PagesUpdate) GetCNAME() string { return *p.CNAME } +// GetHTTPSEnforced returns the HTTPSEnforced field if it's non-nil, zero value otherwise. +func (p *PagesUpdate) GetHTTPSEnforced() bool { + if p == nil || p.HTTPSEnforced == nil { + return false + } + return *p.HTTPSEnforced +} + +// GetPublic returns the Public field if it's non-nil, zero value otherwise. +func (p *PagesUpdate) GetPublic() bool { + if p == nil || p.Public == nil { + return false + } + return *p.Public +} + // GetSource returns the Source field if it's non-nil, zero value otherwise. func (p *PagesUpdate) GetSource() string { if p == nil || p.Source == nil { @@ -12596,6 +12644,14 @@ func (p *PullRequestReviewsEnforcementUpdate) GetDismissStaleReviews() bool { return *p.DismissStaleReviews } +// GetRequireCodeOwnerReviews returns the RequireCodeOwnerReviews field if it's non-nil, zero value otherwise. +func (p *PullRequestReviewsEnforcementUpdate) GetRequireCodeOwnerReviews() bool { + if p == nil || p.RequireCodeOwnerReviews == nil { + return false + } + return *p.RequireCodeOwnerReviews +} + // GetAction returns the Action field if it's non-nil, zero value otherwise. func (p *PullRequestTargetEvent) GetAction() string { if p == nil || p.Action == nil { @@ -13612,6 +13668,14 @@ func (r *Repository) GetAllowAutoMerge() bool { return *r.AllowAutoMerge } +// GetAllowForking returns the AllowForking field if it's non-nil, zero value otherwise. +func (r *Repository) GetAllowForking() bool { + if r == nil || r.AllowForking == nil { + return false + } + return *r.AllowForking +} + // GetAllowMergeCommit returns the AllowMergeCommit field if it's non-nil, zero value otherwise. func (r *Repository) GetAllowMergeCommit() bool { if r == nil || r.AllowMergeCommit == nil { @@ -15420,6 +15484,14 @@ func (r *RequiredReviewer) GetType() string { return *r.Type } +// GetAppID returns the AppID field if it's non-nil, zero value otherwise. +func (r *RequiredStatusCheck) GetAppID() int64 { + if r == nil || r.AppID == nil { + return 0 + } + return *r.AppID +} + // GetStrict returns the Strict field if it's non-nil, zero value otherwise. func (r *RequiredStatusChecksRequest) GetStrict() bool { if r == nil || r.Strict == nil { @@ -15908,6 +15980,262 @@ func (s *SecretScanning) GetStatus() string { return *s.Status } +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetCreatedAt() Timestamp { + if s == nil || s.CreatedAt == nil { + return Timestamp{} + } + return *s.CreatedAt +} + +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetHTMLURL() string { + if s == nil || s.HTMLURL == nil { + return "" + } + return *s.HTMLURL +} + +// GetLocationsURL returns the LocationsURL field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetLocationsURL() string { + if s == nil || s.LocationsURL == nil { + return "" + } + return *s.LocationsURL +} + +// GetNumber returns the Number field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetNumber() int { + if s == nil || s.Number == nil { + return 0 + } + return *s.Number +} + +// GetResolution returns the Resolution field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetResolution() string { + if s == nil || s.Resolution == nil { + return "" + } + return *s.Resolution +} + +// GetResolvedAt returns the ResolvedAt field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetResolvedAt() Timestamp { + if s == nil || s.ResolvedAt == nil { + return Timestamp{} + } + return *s.ResolvedAt +} + +// GetResolvedBy returns the ResolvedBy field. +func (s *SecretScanningAlert) GetResolvedBy() *User { + if s == nil { + return nil + } + return s.ResolvedBy +} + +// GetSecret returns the Secret field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetSecret() string { + if s == nil || s.Secret == nil { + return "" + } + return *s.Secret +} + +// GetSecretType returns the SecretType field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetSecretType() string { + if s == nil || s.SecretType == nil { + return "" + } + return *s.SecretType +} + +// GetState returns the State field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetState() string { + if s == nil || s.State == nil { + return "" + } + return *s.State +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetURL() string { + if s == nil || s.URL == nil { + return "" + } + return *s.URL +} + +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlertEvent) GetAction() string { + if s == nil || s.Action == nil { + return "" + } + return *s.Action +} + +// GetAlert returns the Alert field. +func (s *SecretScanningAlertEvent) GetAlert() *SecretScanningAlert { + if s == nil { + return nil + } + return s.Alert +} + +// GetEnterprise returns the Enterprise field. +func (s *SecretScanningAlertEvent) GetEnterprise() *Enterprise { + if s == nil { + return nil + } + return s.Enterprise +} + +// GetInstallation returns the Installation field. +func (s *SecretScanningAlertEvent) GetInstallation() *Installation { + if s == nil { + return nil + } + return s.Installation +} + +// GetOrganization returns the Organization field. +func (s *SecretScanningAlertEvent) GetOrganization() *Organization { + if s == nil { + return nil + } + return s.Organization +} + +// GetRepo returns the Repo field. +func (s *SecretScanningAlertEvent) GetRepo() *Repository { + if s == nil { + return nil + } + return s.Repo +} + +// GetSender returns the Sender field. +func (s *SecretScanningAlertEvent) GetSender() *User { + if s == nil { + return nil + } + return s.Sender +} + +// GetDetails returns the Details field. +func (s *SecretScanningAlertLocation) GetDetails() *SecretScanningAlertLocationDetails { + if s == nil { + return nil + } + return s.Details +} + +// GetType returns the Type field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlertLocation) GetType() string { + if s == nil || s.Type == nil { + return "" + } + return *s.Type +} + +// GetBlobSHA returns the BlobSHA field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlertLocationDetails) GetBlobSHA() string { + if s == nil || s.BlobSHA == nil { + return "" + } + return *s.BlobSHA +} + +// GetBlobURL returns the BlobURL field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlertLocationDetails) GetBlobURL() string { + if s == nil || s.BlobURL == nil { + return "" + } + return *s.BlobURL +} + +// GetCommitSHA returns the CommitSHA field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlertLocationDetails) GetCommitSHA() string { + if s == nil || s.CommitSHA == nil { + return "" + } + return *s.CommitSHA +} + +// GetCommitURL returns the CommitURL field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlertLocationDetails) GetCommitURL() string { + if s == nil || s.CommitURL == nil { + return "" + } + return *s.CommitURL +} + +// GetEndColumn returns the EndColumn field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlertLocationDetails) GetEndColumn() int { + if s == nil || s.EndColumn == nil { + return 0 + } + return *s.EndColumn +} + +// GetEndLine returns the EndLine field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlertLocationDetails) GetEndLine() int { + if s == nil || s.EndLine == nil { + return 0 + } + return *s.EndLine +} + +// GetPath returns the Path field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlertLocationDetails) GetPath() string { + if s == nil || s.Path == nil { + return "" + } + return *s.Path +} + +// GetStartColumn returns the StartColumn field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlertLocationDetails) GetStartColumn() int { + if s == nil || s.StartColumn == nil { + return 0 + } + return *s.StartColumn +} + +// GetStartline returns the Startline field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlertLocationDetails) GetStartline() int { + if s == nil || s.Startline == nil { + return 0 + } + return *s.Startline +} + +// GetResolution returns the Resolution field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlertUpdateOptions) GetResolution() string { + if s == nil || s.Resolution == nil { + return "" + } + return *s.Resolution +} + +// GetSecretType returns the SecretType field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlertUpdateOptions) GetSecretType() string { + if s == nil || s.SecretType == nil { + return "" + } + return *s.SecretType +} + +// GetState returns the State field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlertUpdateOptions) GetState() string { + if s == nil || s.State == nil { + return "" + } + return *s.State +} + // GetAdvancedSecurity returns the AdvancedSecurity field. func (s *SecurityAndAnalysis) GetAdvancedSecurity() *AdvancedSecurity { if s == nil { @@ -19244,6 +19572,14 @@ func (w *WorkflowRun) GetWorkflowURL() string { return *w.WorkflowURL } +// GetExcludePullRequests returns the ExcludePullRequests field if it's non-nil, zero value otherwise. +func (w *WorkflowRunAttemptOptions) GetExcludePullRequests() bool { + if w == nil || w.ExcludePullRequests == nil { + return false + } + return *w.ExcludePullRequests +} + // GetJobs returns the Jobs field if it's non-nil, zero value otherwise. func (w *WorkflowRunBill) GetJobs() int { if w == nil || w.Jobs == nil { diff --git a/vendor/github.com/google/go-github/v42/github/github.go b/vendor/github.com/google/go-github/v43/github/github.go similarity index 98% rename from vendor/github.com/google/go-github/v42/github/github.go rename to vendor/github.com/google/go-github/v43/github/github.go index 4fb466e3a6..164b2d0678 100644 --- a/vendor/github.com/google/go-github/v42/github/github.go +++ b/vendor/github.com/google/go-github/v43/github/github.go @@ -100,6 +100,9 @@ const ( // https://developer.github.com/changes/2018-03-16-protected-branches-required-approving-reviews/ mediaTypeRequiredApprovingReviewsPreview = "application/vnd.github.luke-cage-preview+json" + // https://developer.github.com/changes/2018-05-07-new-checks-api-public-beta/ + mediaTypeCheckRunsPreview = "application/vnd.github.antiope-preview+json" + // https://developer.github.com/enterprise/2.13/v3/repos/pre_receive_hooks/ mediaTypePreReceiveHooksPreview = "application/vnd.github.eye-scream-preview" @@ -196,6 +199,7 @@ type Client struct { Repositories *RepositoriesService SCIM *SCIMService Search *SearchService + SecretScanning *SecretScanningService Teams *TeamsService Users *UsersService } @@ -325,6 +329,7 @@ func NewClient(httpClient *http.Client) *Client { c.Repositories = (*RepositoriesService)(&c.common) c.SCIM = (*SCIMService)(&c.common) c.Search = (*SearchService)(&c.common) + c.SecretScanning = (*SecretScanningService)(&c.common) c.Teams = (*TeamsService)(&c.common) c.Users = (*UsersService)(&c.common) return c @@ -653,9 +658,13 @@ func (c *Client) BareDo(ctx context.Context, req *http.Request) (*Response, erro response := newResponse(resp) - c.rateMu.Lock() - c.rateLimits[rateLimitCategory] = response.Rate - c.rateMu.Unlock() + // Don't update the rate limits if this was a cached response. + // X-From-Cache is set by https://github.com/gregjones/httpcache + if response.Header.Get("X-From-Cache") == "" { + c.rateMu.Lock() + c.rateLimits[rateLimitCategory] = response.Rate + c.rateMu.Unlock() + } err = CheckResponse(resp) if err != nil { diff --git a/vendor/github.com/google/go-github/v42/github/gitignore.go b/vendor/github.com/google/go-github/v43/github/gitignore.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/gitignore.go rename to vendor/github.com/google/go-github/v43/github/gitignore.go diff --git a/vendor/github.com/google/go-github/v42/github/interactions.go b/vendor/github.com/google/go-github/v43/github/interactions.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/interactions.go rename to vendor/github.com/google/go-github/v43/github/interactions.go diff --git a/vendor/github.com/google/go-github/v42/github/interactions_orgs.go b/vendor/github.com/google/go-github/v43/github/interactions_orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/interactions_orgs.go rename to vendor/github.com/google/go-github/v43/github/interactions_orgs.go diff --git a/vendor/github.com/google/go-github/v42/github/interactions_repos.go b/vendor/github.com/google/go-github/v43/github/interactions_repos.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/interactions_repos.go rename to vendor/github.com/google/go-github/v43/github/interactions_repos.go diff --git a/vendor/github.com/google/go-github/v42/github/issue_import.go b/vendor/github.com/google/go-github/v43/github/issue_import.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/issue_import.go rename to vendor/github.com/google/go-github/v43/github/issue_import.go diff --git a/vendor/github.com/google/go-github/v42/github/issues.go b/vendor/github.com/google/go-github/v43/github/issues.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/issues.go rename to vendor/github.com/google/go-github/v43/github/issues.go diff --git a/vendor/github.com/google/go-github/v42/github/issues_assignees.go b/vendor/github.com/google/go-github/v43/github/issues_assignees.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/issues_assignees.go rename to vendor/github.com/google/go-github/v43/github/issues_assignees.go diff --git a/vendor/github.com/google/go-github/v42/github/issues_comments.go b/vendor/github.com/google/go-github/v43/github/issues_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/issues_comments.go rename to vendor/github.com/google/go-github/v43/github/issues_comments.go diff --git a/vendor/github.com/google/go-github/v42/github/issues_events.go b/vendor/github.com/google/go-github/v43/github/issues_events.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/issues_events.go rename to vendor/github.com/google/go-github/v43/github/issues_events.go diff --git a/vendor/github.com/google/go-github/v42/github/issues_labels.go b/vendor/github.com/google/go-github/v43/github/issues_labels.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/issues_labels.go rename to vendor/github.com/google/go-github/v43/github/issues_labels.go diff --git a/vendor/github.com/google/go-github/v42/github/issues_milestones.go b/vendor/github.com/google/go-github/v43/github/issues_milestones.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/issues_milestones.go rename to vendor/github.com/google/go-github/v43/github/issues_milestones.go diff --git a/vendor/github.com/google/go-github/v42/github/issues_timeline.go b/vendor/github.com/google/go-github/v43/github/issues_timeline.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/issues_timeline.go rename to vendor/github.com/google/go-github/v43/github/issues_timeline.go diff --git a/vendor/github.com/google/go-github/v42/github/licenses.go b/vendor/github.com/google/go-github/v43/github/licenses.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/licenses.go rename to vendor/github.com/google/go-github/v43/github/licenses.go diff --git a/vendor/github.com/google/go-github/v42/github/messages.go b/vendor/github.com/google/go-github/v43/github/messages.go similarity index 99% rename from vendor/github.com/google/go-github/v42/github/messages.go rename to vendor/github.com/google/go-github/v43/github/messages.go index 2e69c523e9..c1e8161b67 100644 --- a/vendor/github.com/google/go-github/v42/github/messages.go +++ b/vendor/github.com/google/go-github/v43/github/messages.go @@ -87,6 +87,7 @@ var ( "repository_dispatch": "RepositoryDispatchEvent", "repository_vulnerability_alert": "RepositoryVulnerabilityAlertEvent", "release": "ReleaseEvent", + "secret_scanning_alert": "SecretScanningAlertEvent", "star": "StarEvent", "status": "StatusEvent", "team": "TeamEvent", diff --git a/vendor/github.com/google/go-github/v42/github/migrations.go b/vendor/github.com/google/go-github/v43/github/migrations.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/migrations.go rename to vendor/github.com/google/go-github/v43/github/migrations.go diff --git a/vendor/github.com/google/go-github/v42/github/migrations_source_import.go b/vendor/github.com/google/go-github/v43/github/migrations_source_import.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/migrations_source_import.go rename to vendor/github.com/google/go-github/v43/github/migrations_source_import.go diff --git a/vendor/github.com/google/go-github/v42/github/migrations_user.go b/vendor/github.com/google/go-github/v43/github/migrations_user.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/migrations_user.go rename to vendor/github.com/google/go-github/v43/github/migrations_user.go diff --git a/vendor/github.com/google/go-github/v42/github/misc.go b/vendor/github.com/google/go-github/v43/github/misc.go similarity index 97% rename from vendor/github.com/google/go-github/v42/github/misc.go rename to vendor/github.com/google/go-github/v43/github/misc.go index 1fa6c4e130..7672e08acc 100644 --- a/vendor/github.com/google/go-github/v42/github/misc.go +++ b/vendor/github.com/google/go-github/v43/github/misc.go @@ -170,6 +170,12 @@ type APIMeta struct { // An array of IP addresses in CIDR format specifying the IP addresses // Dependabot will originate from. Dependabot []string `json:"dependabot,omitempty"` + + // A map of algorithms to SSH key fingerprints. + SSHKeyFingerprints map[string]string `json:"ssh_key_fingerprints,omitempty"` + + // An array of SSH keys. + SSHKeys []string `json:"ssh_keys,omitempty"` } // APIMeta returns information about GitHub.com, the service. Or, if you access diff --git a/vendor/github.com/google/go-github/v42/github/orgs.go b/vendor/github.com/google/go-github/v43/github/orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/orgs.go rename to vendor/github.com/google/go-github/v43/github/orgs.go diff --git a/vendor/github.com/google/go-github/v42/github/orgs_actions_allowed.go b/vendor/github.com/google/go-github/v43/github/orgs_actions_allowed.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/orgs_actions_allowed.go rename to vendor/github.com/google/go-github/v43/github/orgs_actions_allowed.go diff --git a/vendor/github.com/google/go-github/v42/github/orgs_actions_permissions.go b/vendor/github.com/google/go-github/v43/github/orgs_actions_permissions.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/orgs_actions_permissions.go rename to vendor/github.com/google/go-github/v43/github/orgs_actions_permissions.go diff --git a/vendor/github.com/google/go-github/v42/github/orgs_audit_log.go b/vendor/github.com/google/go-github/v43/github/orgs_audit_log.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/orgs_audit_log.go rename to vendor/github.com/google/go-github/v43/github/orgs_audit_log.go diff --git a/vendor/github.com/google/go-github/v42/github/orgs_hooks.go b/vendor/github.com/google/go-github/v43/github/orgs_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/orgs_hooks.go rename to vendor/github.com/google/go-github/v43/github/orgs_hooks.go diff --git a/vendor/github.com/google/go-github/v42/github/orgs_hooks_deliveries.go b/vendor/github.com/google/go-github/v43/github/orgs_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/orgs_hooks_deliveries.go rename to vendor/github.com/google/go-github/v43/github/orgs_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v42/github/orgs_members.go b/vendor/github.com/google/go-github/v43/github/orgs_members.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/orgs_members.go rename to vendor/github.com/google/go-github/v43/github/orgs_members.go diff --git a/vendor/github.com/google/go-github/v42/github/orgs_outside_collaborators.go b/vendor/github.com/google/go-github/v43/github/orgs_outside_collaborators.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/orgs_outside_collaborators.go rename to vendor/github.com/google/go-github/v43/github/orgs_outside_collaborators.go diff --git a/vendor/github.com/google/go-github/v42/github/orgs_packages.go b/vendor/github.com/google/go-github/v43/github/orgs_packages.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/orgs_packages.go rename to vendor/github.com/google/go-github/v43/github/orgs_packages.go diff --git a/vendor/github.com/google/go-github/v42/github/orgs_projects.go b/vendor/github.com/google/go-github/v43/github/orgs_projects.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/orgs_projects.go rename to vendor/github.com/google/go-github/v43/github/orgs_projects.go diff --git a/vendor/github.com/google/go-github/v42/github/orgs_users_blocking.go b/vendor/github.com/google/go-github/v43/github/orgs_users_blocking.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/orgs_users_blocking.go rename to vendor/github.com/google/go-github/v43/github/orgs_users_blocking.go diff --git a/vendor/github.com/google/go-github/v42/github/packages.go b/vendor/github.com/google/go-github/v43/github/packages.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/packages.go rename to vendor/github.com/google/go-github/v43/github/packages.go diff --git a/vendor/github.com/google/go-github/v42/github/projects.go b/vendor/github.com/google/go-github/v43/github/projects.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/projects.go rename to vendor/github.com/google/go-github/v43/github/projects.go diff --git a/vendor/github.com/google/go-github/v42/github/pulls.go b/vendor/github.com/google/go-github/v43/github/pulls.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/pulls.go rename to vendor/github.com/google/go-github/v43/github/pulls.go diff --git a/vendor/github.com/google/go-github/v42/github/pulls_comments.go b/vendor/github.com/google/go-github/v43/github/pulls_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/pulls_comments.go rename to vendor/github.com/google/go-github/v43/github/pulls_comments.go diff --git a/vendor/github.com/google/go-github/v42/github/pulls_reviewers.go b/vendor/github.com/google/go-github/v43/github/pulls_reviewers.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/pulls_reviewers.go rename to vendor/github.com/google/go-github/v43/github/pulls_reviewers.go diff --git a/vendor/github.com/google/go-github/v42/github/pulls_reviews.go b/vendor/github.com/google/go-github/v43/github/pulls_reviews.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/pulls_reviews.go rename to vendor/github.com/google/go-github/v43/github/pulls_reviews.go diff --git a/vendor/github.com/google/go-github/v42/github/reactions.go b/vendor/github.com/google/go-github/v43/github/reactions.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/reactions.go rename to vendor/github.com/google/go-github/v43/github/reactions.go diff --git a/vendor/github.com/google/go-github/v42/github/repos.go b/vendor/github.com/google/go-github/v43/github/repos.go similarity index 97% rename from vendor/github.com/google/go-github/v42/github/repos.go rename to vendor/github.com/google/go-github/v43/github/repos.go index 2239c70001..2b1139b679 100644 --- a/vendor/github.com/google/go-github/v42/github/repos.go +++ b/vendor/github.com/google/go-github/v43/github/repos.go @@ -66,6 +66,7 @@ type Repository struct { AllowSquashMerge *bool `json:"allow_squash_merge,omitempty"` AllowMergeCommit *bool `json:"allow_merge_commit,omitempty"` AllowAutoMerge *bool `json:"allow_auto_merge,omitempty"` + AllowForking *bool `json:"allow_forking,omitempty"` DeleteBranchOnMerge *bool `json:"delete_branch_on_merge,omitempty"` Topics []string `json:"topics,omitempty"` Archived *bool `json:"archived,omitempty"` @@ -363,6 +364,7 @@ type createRepoRequest struct { AllowMergeCommit *bool `json:"allow_merge_commit,omitempty"` AllowRebaseMerge *bool `json:"allow_rebase_merge,omitempty"` AllowAutoMerge *bool `json:"allow_auto_merge,omitempty"` + AllowForking *bool `json:"allow_forking,omitempty"` DeleteBranchOnMerge *bool `json:"delete_branch_on_merge,omitempty"` } @@ -406,6 +408,7 @@ func (s *RepositoriesService) Create(ctx context.Context, org string, repo *Repo AllowMergeCommit: repo.AllowMergeCommit, AllowRebaseMerge: repo.AllowRebaseMerge, AllowAutoMerge: repo.AllowAutoMerge, + AllowForking: repo.AllowForking, DeleteBranchOnMerge: repo.DeleteBranchOnMerge, } @@ -874,14 +877,33 @@ type RequiredStatusChecks struct { // Require branches to be up to date before merging. (Required.) Strict bool `json:"strict"` // The list of status checks to require in order to merge into this - // branch. (Required; use []string{} instead of nil for empty list.) - Contexts []string `json:"contexts"` + // branch. (Deprecated. Note: only one of Contexts/Checks can be populated, + // but at least one must be populated). + Contexts []string `json:"contexts,omitempty"` + // The list of status checks to require in order to merge into this + // branch. + Checks []*RequiredStatusCheck `json:"checks,omitempty"` } // RequiredStatusChecksRequest represents a request to edit a protected branch's status checks. type RequiredStatusChecksRequest struct { - Strict *bool `json:"strict,omitempty"` - Contexts []string `json:"contexts,omitempty"` + Strict *bool `json:"strict,omitempty"` + // Note: if both Contexts and Checks are populated, + // the GitHub API will only use Checks. + Contexts []string `json:"contexts,omitempty"` + Checks []*RequiredStatusCheck `json:"checks,omitempty"` +} + +// RequiredStatusCheck represents a status check of a protected branch. +type RequiredStatusCheck struct { + // The name of the required check. + Context string `json:"context"` + // The ID of the GitHub App that must provide this check. + // Omit this field to automatically select the GitHub App + // that has recently provided this check, + // or any app if it was not set by a GitHub App. + // Pass -1 to explicitly allow any app to set the status. + AppID *int64 `json:"app_id,omitempty"` } // PullRequestReviewsEnforcement represents the pull request reviews enforcement of a protected branch. @@ -922,10 +944,10 @@ type PullRequestReviewsEnforcementUpdate struct { DismissalRestrictionsRequest *DismissalRestrictionsRequest `json:"dismissal_restrictions,omitempty"` // Specifies if approved reviews can be dismissed automatically, when a new commit is pushed. Can be omitted. DismissStaleReviews *bool `json:"dismiss_stale_reviews,omitempty"` - // RequireCodeOwnerReviews specifies if an approved review is required in pull requests including files with a designated code owner. - RequireCodeOwnerReviews bool `json:"require_code_owner_reviews,omitempty"` + // RequireCodeOwnerReviews specifies if merging pull requests is blocked until code owners have reviewed. + RequireCodeOwnerReviews *bool `json:"require_code_owner_reviews,omitempty"` // RequiredApprovingReviewCount specifies the number of approvals required before the pull request can be merged. - // Valid values are 1 - 6. + // Valid values are 1 - 6 or 0 to not require reviewers. RequiredApprovingReviewCount int `json:"required_approving_review_count"` } diff --git a/vendor/github.com/google/go-github/v42/github/repos_autolinks.go b/vendor/github.com/google/go-github/v43/github/repos_autolinks.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_autolinks.go rename to vendor/github.com/google/go-github/v43/github/repos_autolinks.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_collaborators.go b/vendor/github.com/google/go-github/v43/github/repos_collaborators.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_collaborators.go rename to vendor/github.com/google/go-github/v43/github/repos_collaborators.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_comments.go b/vendor/github.com/google/go-github/v43/github/repos_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_comments.go rename to vendor/github.com/google/go-github/v43/github/repos_comments.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_commits.go b/vendor/github.com/google/go-github/v43/github/repos_commits.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_commits.go rename to vendor/github.com/google/go-github/v43/github/repos_commits.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_community_health.go b/vendor/github.com/google/go-github/v43/github/repos_community_health.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_community_health.go rename to vendor/github.com/google/go-github/v43/github/repos_community_health.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_contents.go b/vendor/github.com/google/go-github/v43/github/repos_contents.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_contents.go rename to vendor/github.com/google/go-github/v43/github/repos_contents.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_deployments.go b/vendor/github.com/google/go-github/v43/github/repos_deployments.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_deployments.go rename to vendor/github.com/google/go-github/v43/github/repos_deployments.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_environments.go b/vendor/github.com/google/go-github/v43/github/repos_environments.go similarity index 95% rename from vendor/github.com/google/go-github/v42/github/repos_environments.go rename to vendor/github.com/google/go-github/v43/github/repos_environments.go index 25cb005e8d..5dd454289c 100644 --- a/vendor/github.com/google/go-github/v42/github/repos_environments.go +++ b/vendor/github.com/google/go-github/v43/github/repos_environments.go @@ -63,6 +63,12 @@ type RequiredReviewer struct { Reviewer interface{} `json:"reviewer,omitempty"` } +// EnvironmentListOptions specifies the optional parameters to the +// RepositoriesService.ListEnvironments method. +type EnvironmentListOptions struct { + ListOptions +} + // UnmarshalJSON implements the json.Unmarshaler interface. // This helps us handle the fact that RequiredReviewer can have either a User or Team type reviewer field. func (r *RequiredReviewer) UnmarshalJSON(data []byte) error { @@ -99,8 +105,12 @@ func (r *RequiredReviewer) UnmarshalJSON(data []byte) error { // ListEnvironments lists all environments for a repository. // // GitHub API docs: https://docs.github.com/en/rest/reference/repos#get-all-environments -func (s *RepositoriesService) ListEnvironments(ctx context.Context, owner, repo string) (*EnvResponse, *Response, error) { +func (s *RepositoriesService) ListEnvironments(ctx context.Context, owner, repo string, opts *EnvironmentListOptions) (*EnvResponse, *Response, error) { u := fmt.Sprintf("repos/%s/%s/environments", owner, repo) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } req, err := s.client.NewRequest("GET", u, nil) if err != nil { diff --git a/vendor/github.com/google/go-github/v42/github/repos_forks.go b/vendor/github.com/google/go-github/v43/github/repos_forks.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_forks.go rename to vendor/github.com/google/go-github/v43/github/repos_forks.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_hooks.go b/vendor/github.com/google/go-github/v43/github/repos_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_hooks.go rename to vendor/github.com/google/go-github/v43/github/repos_hooks.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_hooks_deliveries.go b/vendor/github.com/google/go-github/v43/github/repos_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_hooks_deliveries.go rename to vendor/github.com/google/go-github/v43/github/repos_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_invitations.go b/vendor/github.com/google/go-github/v43/github/repos_invitations.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_invitations.go rename to vendor/github.com/google/go-github/v43/github/repos_invitations.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_keys.go b/vendor/github.com/google/go-github/v43/github/repos_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_keys.go rename to vendor/github.com/google/go-github/v43/github/repos_keys.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_merging.go b/vendor/github.com/google/go-github/v43/github/repos_merging.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_merging.go rename to vendor/github.com/google/go-github/v43/github/repos_merging.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_pages.go b/vendor/github.com/google/go-github/v43/github/repos_pages.go similarity index 94% rename from vendor/github.com/google/go-github/v42/github/repos_pages.go rename to vendor/github.com/google/go-github/v43/github/repos_pages.go index 04825baea1..60a756b647 100644 --- a/vendor/github.com/google/go-github/v42/github/repos_pages.go +++ b/vendor/github.com/google/go-github/v43/github/repos_pages.go @@ -95,6 +95,13 @@ type PagesUpdate struct { // Source must include the branch name, and may optionally specify the subdirectory "/docs". // Possible values are: "gh-pages", "master", and "master /docs". Source *string `json:"source,omitempty"` + // Public configures access controls for the site. + // If "true", the site will be accessible to anyone on the internet. If "false", + // the site will be accessible to anyone with read access to the repository that + // published the site. + Public *bool `json:"public,omitempty"` + // HTTPSEnforced specifies whether HTTPS should be enforced for the repository. + HTTPSEnforced *bool `json:"https_enforced,omitempty"` } // UpdatePages updates GitHub Pages for the named repo. diff --git a/vendor/github.com/google/go-github/v42/github/repos_prereceive_hooks.go b/vendor/github.com/google/go-github/v43/github/repos_prereceive_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_prereceive_hooks.go rename to vendor/github.com/google/go-github/v43/github/repos_prereceive_hooks.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_projects.go b/vendor/github.com/google/go-github/v43/github/repos_projects.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_projects.go rename to vendor/github.com/google/go-github/v43/github/repos_projects.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_releases.go b/vendor/github.com/google/go-github/v43/github/repos_releases.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_releases.go rename to vendor/github.com/google/go-github/v43/github/repos_releases.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_stats.go b/vendor/github.com/google/go-github/v43/github/repos_stats.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_stats.go rename to vendor/github.com/google/go-github/v43/github/repos_stats.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_statuses.go b/vendor/github.com/google/go-github/v43/github/repos_statuses.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_statuses.go rename to vendor/github.com/google/go-github/v43/github/repos_statuses.go diff --git a/vendor/github.com/google/go-github/v42/github/repos_traffic.go b/vendor/github.com/google/go-github/v43/github/repos_traffic.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/repos_traffic.go rename to vendor/github.com/google/go-github/v43/github/repos_traffic.go diff --git a/vendor/github.com/google/go-github/v42/github/scim.go b/vendor/github.com/google/go-github/v43/github/scim.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/scim.go rename to vendor/github.com/google/go-github/v43/github/scim.go diff --git a/vendor/github.com/google/go-github/v42/github/search.go b/vendor/github.com/google/go-github/v43/github/search.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/search.go rename to vendor/github.com/google/go-github/v43/github/search.go diff --git a/vendor/github.com/google/go-github/v43/github/secret_scanning.go b/vendor/github.com/google/go-github/v43/github/secret_scanning.go new file mode 100644 index 0000000000..f5061f3b92 --- /dev/null +++ b/vendor/github.com/google/go-github/v43/github/secret_scanning.go @@ -0,0 +1,234 @@ +// 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" +) + +// SecretScanningService handles communication with the secret scanning related +// methods of the GitHub API. +// +// GitHub API docs: https://docs.github.com/en/rest/reference/secret-scanning +type SecretScanningService service + +// SecretScanningAlert represents a GitHub secret scanning alert. +type SecretScanningAlert struct { + Number *int `json:"number,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + URL *string `json:"url,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + LocationsURL *string `json:"locations_url,omitempty"` + State *string `json:"state,omitempty"` + Resolution *string `json:"resolution,omitempty"` + ResolvedAt *Timestamp `json:"resolved_at,omitempty"` + ResolvedBy *User `json:"resolved_by,omitempty"` + SecretType *string `json:"secret_type,omitempty"` + Secret *string `json:"secret,omitempty"` +} + +// SecretScanningAlertLocation represents the location for a secret scanning alert. +type SecretScanningAlertLocation struct { + Type *string `json:"type,omitempty"` + Details *SecretScanningAlertLocationDetails `json:"details,omitempty"` +} + +// SecretScanningAlertLocationDetails represents the location details for a secret scanning alert. +type SecretScanningAlertLocationDetails struct { + Path *string `json:"path,omitempty"` + Startline *int `json:"start_line,omitempty"` + EndLine *int `json:"end_line,omitempty"` + StartColumn *int `json:"start_column,omitempty"` + EndColumn *int `json:"end_column,omitempty"` + BlobSHA *string `json:"blob_sha,omitempty"` + BlobURL *string `json:"blob_url,omitempty"` + CommitSHA *string `json:"commit_sha,omitempty"` + CommitURL *string `json:"commit_url,omitempty"` +} + +// SecretScanningAlertListOptions specifies optional parameters to the SecretScanningService.ListAlertsForEnterprise method. +type SecretScanningAlertListOptions struct { + // State of the secret scanning alerts to list. Set to open or resolved to only list secret scanning alerts in a specific state. + State string `url:"state,omitempty"` + + // A comma-separated list of secret types to return. By default all secret types are returned. + SecretType string `url:"secret_type,omitempty"` + + // A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. + // Valid resolutions are false_positive, wont_fix, revoked, pattern_edited, pattern_deleted or used_in_tests. + Resolution string `url:"resolution,omitempty"` + + ListCursorOptions +} + +// SecretScanningAlertUpdateOptions specifies optional parameters to the SecretScanningService.UpdateAlert method. +type SecretScanningAlertUpdateOptions struct { + // Required. Sets the state of the secret scanning alert. Can be either open or resolved. + // You must provide resolution when you set the state to resolved. + State *string `url:"state,omitempty"` + + // A comma-separated list of secret types to return. By default all secret types are returned. + SecretType *string `url:"secret_type,omitempty"` + + // Required when the state is resolved. The reason for resolving the alert. Can be one of false_positive, + // wont_fix, revoked, or used_in_tests. + Resolution *string `url:"resolution,omitempty"` +} + +// Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. +// +// To use this endpoint, you must be a member of the enterprise, and you must use an access token with the repo scope or +// security_events scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. +// +// GitHub API docs: https://docs.github.com/en/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise +func (s *SecretScanningService) ListAlertsForEnterprise(ctx context.Context, enterprise string, opts *SecretScanningAlertListOptions) ([]*SecretScanningAlert, *Response, error) { + u := fmt.Sprintf("enterprises/%v/secret-scanning/alerts", enterprise) + 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 alerts []*SecretScanningAlert + resp, err := s.client.Do(ctx, req, &alerts) + if err != nil { + return nil, resp, err + } + + return alerts, resp, nil +} + +// Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. +// +// To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with +// the repo scope or security_events scope. +// +// GitHub API docs: https://docs.github.com/en/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization +func (s *SecretScanningService) ListAlertsForOrg(ctx context.Context, org string, opts *SecretScanningAlertListOptions) ([]*SecretScanningAlert, *Response, error) { + u := fmt.Sprintf("orgs/%v/secret-scanning/alerts", org) + 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 alerts []*SecretScanningAlert + resp, err := s.client.Do(ctx, req, &alerts) + if err != nil { + return nil, resp, err + } + + return alerts, resp, nil +} + +// Lists secret scanning alerts for a private repository, from newest to oldest. +// +// To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with +// the repo scope or security_events scope. +// +// GitHub API docs: https://docs.github.com/en/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository +func (s *SecretScanningService) ListAlertsForRepo(ctx context.Context, owner, repo string, opts *SecretScanningAlertListOptions) ([]*SecretScanningAlert, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/secret-scanning/alerts", owner, repo) + 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 alerts []*SecretScanningAlert + resp, err := s.client.Do(ctx, req, &alerts) + if err != nil { + return nil, resp, err + } + + return alerts, resp, nil +} + +// Gets a single secret scanning alert detected in a private repository. +// +// To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with +// the repo scope or security_events scope. +// +// GitHub API docs: https://docs.github.com/en/rest/reference/secret-scanning#get-a-secret-scanning-alert +func (s *SecretScanningService) GetAlert(ctx context.Context, owner, repo string, number int64) (*SecretScanningAlert, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/secret-scanning/alerts/%v", owner, repo, number) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var alert *SecretScanningAlert + resp, err := s.client.Do(ctx, req, &alert) + if err != nil { + return nil, resp, err + } + + return alert, resp, nil +} + +// Updates the status of a secret scanning alert in a private repository. +// +// To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with +// the repo scope or security_events scope. +// +// GitHub API docs: https://docs.github.com/en/rest/reference/secret-scanning#update-a-secret-scanning-alert +func (s *SecretScanningService) UpdateAlert(ctx context.Context, owner, repo string, number int64, opts *SecretScanningAlertUpdateOptions) (*SecretScanningAlert, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/secret-scanning/alerts/%v", owner, repo, number) + + req, err := s.client.NewRequest("PATCH", u, opts) + if err != nil { + return nil, nil, err + } + + var alert *SecretScanningAlert + resp, err := s.client.Do(ctx, req, &alert) + if err != nil { + return nil, resp, err + } + + return alert, resp, nil +} + +// Lists all locations for a given secret scanning alert for a private repository. +// +// To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with +// the repo scope or security_events scope. +// +// GitHub API docs: https://docs.github.com/en/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert +func (s *SecretScanningService) ListLocationsForAlert(ctx context.Context, owner, repo string, number int64, opts *ListOptions) ([]*SecretScanningAlertLocation, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/secret-scanning/alerts/%v/locations", owner, repo, number) + 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 locations []*SecretScanningAlertLocation + resp, err := s.client.Do(ctx, req, &locations) + if err != nil { + return nil, resp, err + } + + return locations, resp, nil +} diff --git a/vendor/github.com/google/go-github/v42/github/strings.go b/vendor/github.com/google/go-github/v43/github/strings.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/strings.go rename to vendor/github.com/google/go-github/v43/github/strings.go diff --git a/vendor/github.com/google/go-github/v42/github/teams.go b/vendor/github.com/google/go-github/v43/github/teams.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/teams.go rename to vendor/github.com/google/go-github/v43/github/teams.go diff --git a/vendor/github.com/google/go-github/v42/github/teams_discussion_comments.go b/vendor/github.com/google/go-github/v43/github/teams_discussion_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/teams_discussion_comments.go rename to vendor/github.com/google/go-github/v43/github/teams_discussion_comments.go diff --git a/vendor/github.com/google/go-github/v42/github/teams_discussions.go b/vendor/github.com/google/go-github/v43/github/teams_discussions.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/teams_discussions.go rename to vendor/github.com/google/go-github/v43/github/teams_discussions.go diff --git a/vendor/github.com/google/go-github/v42/github/teams_members.go b/vendor/github.com/google/go-github/v43/github/teams_members.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/teams_members.go rename to vendor/github.com/google/go-github/v43/github/teams_members.go diff --git a/vendor/github.com/google/go-github/v42/github/timestamp.go b/vendor/github.com/google/go-github/v43/github/timestamp.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/timestamp.go rename to vendor/github.com/google/go-github/v43/github/timestamp.go diff --git a/vendor/github.com/google/go-github/v42/github/users.go b/vendor/github.com/google/go-github/v43/github/users.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/users.go rename to vendor/github.com/google/go-github/v43/github/users.go diff --git a/vendor/github.com/google/go-github/v42/github/users_administration.go b/vendor/github.com/google/go-github/v43/github/users_administration.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/users_administration.go rename to vendor/github.com/google/go-github/v43/github/users_administration.go diff --git a/vendor/github.com/google/go-github/v42/github/users_blocking.go b/vendor/github.com/google/go-github/v43/github/users_blocking.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/users_blocking.go rename to vendor/github.com/google/go-github/v43/github/users_blocking.go diff --git a/vendor/github.com/google/go-github/v42/github/users_emails.go b/vendor/github.com/google/go-github/v43/github/users_emails.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/users_emails.go rename to vendor/github.com/google/go-github/v43/github/users_emails.go diff --git a/vendor/github.com/google/go-github/v42/github/users_followers.go b/vendor/github.com/google/go-github/v43/github/users_followers.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/users_followers.go rename to vendor/github.com/google/go-github/v43/github/users_followers.go diff --git a/vendor/github.com/google/go-github/v42/github/users_gpg_keys.go b/vendor/github.com/google/go-github/v43/github/users_gpg_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/users_gpg_keys.go rename to vendor/github.com/google/go-github/v43/github/users_gpg_keys.go diff --git a/vendor/github.com/google/go-github/v42/github/users_keys.go b/vendor/github.com/google/go-github/v43/github/users_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/users_keys.go rename to vendor/github.com/google/go-github/v43/github/users_keys.go diff --git a/vendor/github.com/google/go-github/v42/github/users_packages.go b/vendor/github.com/google/go-github/v43/github/users_packages.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/users_packages.go rename to vendor/github.com/google/go-github/v43/github/users_packages.go diff --git a/vendor/github.com/google/go-github/v42/github/users_projects.go b/vendor/github.com/google/go-github/v43/github/users_projects.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/users_projects.go rename to vendor/github.com/google/go-github/v43/github/users_projects.go diff --git a/vendor/github.com/google/go-github/v42/github/with_appengine.go b/vendor/github.com/google/go-github/v43/github/with_appengine.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/with_appengine.go rename to vendor/github.com/google/go-github/v43/github/with_appengine.go diff --git a/vendor/github.com/google/go-github/v42/github/without_appengine.go b/vendor/github.com/google/go-github/v43/github/without_appengine.go similarity index 100% rename from vendor/github.com/google/go-github/v42/github/without_appengine.go rename to vendor/github.com/google/go-github/v43/github/without_appengine.go diff --git a/vendor/modules.txt b/vendor/modules.txt index 2ff789bfa3..404481f23b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -174,15 +174,15 @@ github.com/golangci/prealloc github.com/golangci/revgrep # github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 github.com/golangci/unconvert -# github.com/google/go-cmp v0.5.6 +# github.com/google/go-cmp v0.5.7 github.com/google/go-cmp/cmp github.com/google/go-cmp/cmp/internal/diff github.com/google/go-cmp/cmp/internal/flags github.com/google/go-cmp/cmp/internal/function github.com/google/go-cmp/cmp/internal/value -# github.com/google/go-github/v42 v42.0.0 +# github.com/google/go-github/v43 v43.0.0 ## explicit -github.com/google/go-github/v42/github +github.com/google/go-github/v43/github # github.com/google/go-querystring v1.1.0 github.com/google/go-querystring/query # github.com/google/uuid v1.1.1