diff --git a/github/acc_test.go b/github/acc_test.go index c3631e5588..c267467476 100644 --- a/github/acc_test.go +++ b/github/acc_test.go @@ -10,7 +10,7 @@ import ( "strings" "testing" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/config.go b/github/config.go index de232c1766..869677fc42 100644 --- a/github/config.go +++ b/github/config.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" "github.com/shurcooL/githubv4" "golang.org/x/oauth2" diff --git a/github/data_source_github_actions_environment_secrets.go b/github/data_source_github_actions_environment_secrets.go index 608e663b0f..220a96b279 100644 --- a/github/data_source_github_actions_environment_secrets.go +++ b/github/data_source_github_actions_environment_secrets.go @@ -4,7 +4,7 @@ import ( "context" "net/url" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/github/data_source_github_actions_environment_variables.go b/github/data_source_github_actions_environment_variables.go index 48ad009866..e2c510df67 100644 --- a/github/data_source_github_actions_environment_variables.go +++ b/github/data_source_github_actions_environment_variables.go @@ -4,7 +4,7 @@ import ( "context" "net/url" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/github/data_source_github_actions_organization_secrets.go b/github/data_source_github_actions_organization_secrets.go index db2747bd7e..98745882ed 100644 --- a/github/data_source_github_actions_organization_secrets.go +++ b/github/data_source_github_actions_organization_secrets.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_actions_organization_variables.go b/github/data_source_github_actions_organization_variables.go index c0647f3646..d24add1afc 100644 --- a/github/data_source_github_actions_organization_variables.go +++ b/github/data_source_github_actions_organization_variables.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_actions_secrets.go b/github/data_source_github_actions_secrets.go index f9244efb08..1acc61923c 100644 --- a/github/data_source_github_actions_secrets.go +++ b/github/data_source_github_actions_secrets.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_actions_variables.go b/github/data_source_github_actions_variables.go index dad2327db0..7b3b405f56 100644 --- a/github/data_source_github_actions_variables.go +++ b/github/data_source_github_actions_variables.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_app_token_test.go b/github/data_source_github_app_token_test.go index 76a6710c6e..d107bc0fd3 100644 --- a/github/data_source_github_app_token_test.go +++ b/github/data_source_github_app_token_test.go @@ -7,7 +7,7 @@ import ( "os" "testing" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_branch.go b/github/data_source_github_branch.go index ff4bd50de7..649c5b12af 100644 --- a/github/data_source_github_branch.go +++ b/github/data_source_github_branch.go @@ -6,7 +6,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_codespaces_organization_secrets.go b/github/data_source_github_codespaces_organization_secrets.go index c877da20fa..bd3ad291c0 100644 --- a/github/data_source_github_codespaces_organization_secrets.go +++ b/github/data_source_github_codespaces_organization_secrets.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_codespaces_secrets.go b/github/data_source_github_codespaces_secrets.go index a3a4df73d6..5d9a4b37b8 100644 --- a/github/data_source_github_codespaces_secrets.go +++ b/github/data_source_github_codespaces_secrets.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_codespaces_user_secrets.go b/github/data_source_github_codespaces_user_secrets.go index 961b8c664c..b4459c2943 100644 --- a/github/data_source_github_codespaces_user_secrets.go +++ b/github/data_source_github_codespaces_user_secrets.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_collaborators.go b/github/data_source_github_collaborators.go index 42dc3d2c19..caa14d6e14 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/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/data_source_github_dependabot_organization_secrets.go b/github/data_source_github_dependabot_organization_secrets.go index 0997c9a613..7b0832c135 100644 --- a/github/data_source_github_dependabot_organization_secrets.go +++ b/github/data_source_github_dependabot_organization_secrets.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_dependabot_secrets.go b/github/data_source_github_dependabot_secrets.go index d3840e1079..1f053c8c6c 100644 --- a/github/data_source_github_dependabot_secrets.go +++ b/github/data_source_github_dependabot_secrets.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_external_groups.go b/github/data_source_github_external_groups.go index f525c161d2..04a7bdb33f 100644 --- a/github/data_source_github_external_groups.go +++ b/github/data_source_github_external_groups.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_organization.go b/github/data_source_github_organization.go index 3ba9121b1c..8742f93940 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/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/shurcooL/githubv4" ) diff --git a/github/data_source_github_organization_custom_properties.go b/github/data_source_github_organization_custom_properties.go index 10bd8d38d9..dd9aadd42c 100644 --- a/github/data_source_github_organization_custom_properties.go +++ b/github/data_source_github_organization_custom_properties.go @@ -64,13 +64,16 @@ func dataSourceGithubOrganizationCustomPropertiesRead(d *schema.ResourceData, me return fmt.Errorf("error querying GitHub custom properties %s: %w", orgName, err) } + // TODO: Add support for other types of default values + defaultValue, _ := propertyAttributes.DefaultValueString() + d.SetId("org-custom-properties") _ = d.Set("allowed_values", propertyAttributes.AllowedValues) - _ = d.Set("default_value", propertyAttributes.DefaultValue) + _ = d.Set("default_value", defaultValue) _ = d.Set("description", propertyAttributes.Description) _ = d.Set("property_name", propertyAttributes.PropertyName) _ = d.Set("required", propertyAttributes.Required) - _ = d.Set("value_type", propertyAttributes.ValueType) + _ = d.Set("value_type", string(propertyAttributes.ValueType)) _ = d.Set("values_editable_by", propertyAttributes.ValuesEditableBy) return nil diff --git a/github/data_source_github_organization_custom_role.go b/github/data_source_github_organization_custom_role.go index bfdd6672f8..760af74ebb 100644 --- a/github/data_source_github_organization_custom_role.go +++ b/github/data_source_github_organization_custom_role.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_organization_repository_role.go b/github/data_source_github_organization_repository_role.go index 1f970b1b66..66ef09aef5 100644 --- a/github/data_source_github_organization_repository_role.go +++ b/github/data_source_github_organization_repository_role.go @@ -5,7 +5,7 @@ import ( "fmt" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_organization_role_teams.go b/github/data_source_github_organization_role_teams.go index b93d40a795..15a384f0cb 100644 --- a/github/data_source_github_organization_role_teams.go +++ b/github/data_source_github_organization_role_teams.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_organization_role_users.go b/github/data_source_github_organization_role_users.go index 47973ed651..708acc4bd6 100644 --- a/github/data_source_github_organization_role_users.go +++ b/github/data_source_github_organization_role_users.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/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 be275edec9..416bd655f5 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/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_organization_teams.go b/github/data_source_github_organization_teams.go index ea5c3c5994..3fc86ffc42 100644 --- a/github/data_source_github_organization_teams.go +++ b/github/data_source_github_organization_teams.go @@ -4,7 +4,7 @@ import ( "context" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/shurcooL/githubv4" diff --git a/github/data_source_github_organization_webhooks.go b/github/data_source_github_organization_webhooks.go index 214e0b9f4f..b808398b8e 100644 --- a/github/data_source_github_organization_webhooks.go +++ b/github/data_source_github_organization_webhooks.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_ref.go b/github/data_source_github_ref.go index 8713ca37db..c68c7e688d 100644 --- a/github/data_source_github_ref.go +++ b/github/data_source_github_ref.go @@ -6,7 +6,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_release.go b/github/data_source_github_release.go index f2df2145df..092e33a4d2 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/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_repositories.go b/github/data_source_github_repositories.go index db61d6062c..abfbf7fc63 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/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/data_source_github_repository.go b/github/data_source_github_repository.go index 1f2a7c19ef..56972f89d5 100644 --- a/github/data_source_github_repository.go +++ b/github/data_source_github_repository.go @@ -8,7 +8,7 @@ import ( "net/http" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_repository_autolink_references.go b/github/data_source_github_repository_autolink_references.go index 593dc60244..ab888bcf3a 100644 --- a/github/data_source_github_repository_autolink_references.go +++ b/github/data_source_github_repository_autolink_references.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_repository_branches.go b/github/data_source_github_repository_branches.go index 04ccae7ba5..ff9ddd2fc1 100644 --- a/github/data_source_github_repository_branches.go +++ b/github/data_source_github_repository_branches.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_repository_custom_properties.go b/github/data_source_github_repository_custom_properties.go index a12a99d694..a2001db80a 100644 --- a/github/data_source_github_repository_custom_properties.go +++ b/github/data_source_github_repository_custom_properties.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_repository_deploy_keys.go b/github/data_source_github_repository_deploy_keys.go index deafee3632..e83a5f6a7b 100644 --- a/github/data_source_github_repository_deploy_keys.go +++ b/github/data_source_github_repository_deploy_keys.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_repository_environments.go b/github/data_source_github_repository_environments.go index 415d442cdf..926a57a54e 100644 --- a/github/data_source_github_repository_environments.go +++ b/github/data_source_github_repository_environments.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_repository_file.go b/github/data_source_github_repository_file.go index 80fb85b272..b64fe4b398 100644 --- a/github/data_source_github_repository_file.go +++ b/github/data_source_github_repository_file.go @@ -9,7 +9,7 @@ import ( "net/url" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_repository_pull_requests.go b/github/data_source_github_repository_pull_requests.go index b852122662..f330461364 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/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/data_source_github_repository_teams.go b/github/data_source_github_repository_teams.go index 8e1467adc7..94d7d0c374 100644 --- a/github/data_source_github_repository_teams.go +++ b/github/data_source_github_repository_teams.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_repository_webhooks.go b/github/data_source_github_repository_webhooks.go index 2939e7da0b..546473f782 100644 --- a/github/data_source_github_repository_webhooks.go +++ b/github/data_source_github_repository_webhooks.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/data_source_github_team.go b/github/data_source_github_team.go index f5f1b22af4..7472867c59 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/v81/github" + "github.com/google/go-github/v82/github" "github.com/shurcooL/githubv4" diff --git a/github/repository_utils.go b/github/repository_utils.go index 2bc9af5c55..00d6f3e23c 100644 --- a/github/repository_utils.go +++ b/github/repository_utils.go @@ -8,7 +8,7 @@ import ( "net/http" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/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 355e16df7e..593ebcb9b2 100644 --- a/github/resource_github_actions_environment_secret.go +++ b/github/resource_github_actions_environment_secret.go @@ -8,7 +8,7 @@ import ( "net/http" "net/url" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/github/resource_github_actions_environment_variable.go b/github/resource_github_actions_environment_variable.go index b3dff7eb51..7005ad03cd 100644 --- a/github/resource_github_actions_environment_variable.go +++ b/github/resource_github_actions_environment_variable.go @@ -7,7 +7,7 @@ import ( "net/http" "net/url" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_actions_environment_variable_test.go b/github/resource_github_actions_environment_variable_test.go index 96b667e8f6..1303827503 100644 --- a/github/resource_github_actions_environment_variable_test.go +++ b/github/resource_github_actions_environment_variable_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" diff --git a/github/resource_github_actions_hosted_runner.go b/github/resource_github_actions_hosted_runner.go index 039e3e9722..1629c5c97c 100644 --- a/github/resource_github_actions_hosted_runner.go +++ b/github/resource_github_actions_hosted_runner.go @@ -10,7 +10,7 @@ import ( "strconv" "time" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/github/resource_github_actions_organization_oidc_subject_claim_customization_template.go b/github/resource_github_actions_organization_oidc_subject_claim_customization_template.go index 0a6ac6985c..336884ecbd 100644 --- a/github/resource_github_actions_organization_oidc_subject_claim_customization_template.go +++ b/github/resource_github_actions_organization_oidc_subject_claim_customization_template.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_actions_organization_permissions.go b/github/resource_github_actions_organization_permissions.go index ca035d483a..0e7754c4c9 100644 --- a/github/resource_github_actions_organization_permissions.go +++ b/github/resource_github_actions_organization_permissions.go @@ -5,7 +5,7 @@ import ( "errors" "log" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/resource_github_actions_organization_secret.go b/github/resource_github_actions_organization_secret.go index becfdbbc9d..17c5876ce2 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/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/github/resource_github_actions_organization_secret_repositories.go b/github/resource_github_actions_organization_secret_repositories.go index f71902f766..1610e19094 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/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_actions_organization_secret_repository.go b/github/resource_github_actions_organization_secret_repository.go index b98ef73567..32f370b599 100644 --- a/github/resource_github_actions_organization_secret_repository.go +++ b/github/resource_github_actions_organization_secret_repository.go @@ -5,7 +5,7 @@ import ( "log" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_actions_organization_secret_test.go b/github/resource_github_actions_organization_secret_test.go index 9af4548cb1..2acc63d6c9 100644 --- a/github/resource_github_actions_organization_secret_test.go +++ b/github/resource_github_actions_organization_secret_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/github/resource_github_actions_organization_variable.go b/github/resource_github_actions_organization_variable.go index 44eccf092a..4c1b675e7c 100644 --- a/github/resource_github_actions_organization_variable.go +++ b/github/resource_github_actions_organization_variable.go @@ -7,7 +7,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_actions_organization_workflow_permissions.go b/github/resource_github_actions_organization_workflow_permissions.go index c2601a4b0c..0ef2118b38 100644 --- a/github/resource_github_actions_organization_workflow_permissions.go +++ b/github/resource_github_actions_organization_workflow_permissions.go @@ -8,7 +8,7 @@ import ( "io" "net/http" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/github/resource_github_actions_repository_access_level.go b/github/resource_github_actions_repository_access_level.go index 012123395b..b31f9ad136 100644 --- a/github/resource_github_actions_repository_access_level.go +++ b/github/resource_github_actions_repository_access_level.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/resource_github_actions_repository_oidc_subject_claim_customization_template.go b/github/resource_github_actions_repository_oidc_subject_claim_customization_template.go index bfae9d8b85..c973ca03bd 100644 --- a/github/resource_github_actions_repository_oidc_subject_claim_customization_template.go +++ b/github/resource_github_actions_repository_oidc_subject_claim_customization_template.go @@ -4,7 +4,7 @@ import ( "context" "errors" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/resource_github_actions_repository_permissions.go b/github/resource_github_actions_repository_permissions.go index 2c45a62d36..5710251a7e 100644 --- a/github/resource_github_actions_repository_permissions.go +++ b/github/resource_github_actions_repository_permissions.go @@ -4,7 +4,7 @@ import ( "context" "log" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/resource_github_actions_runner_group.go b/github/resource_github_actions_runner_group.go index 754aa01f34..394ff56a1c 100644 --- a/github/resource_github_actions_runner_group.go +++ b/github/resource_github_actions_runner_group.go @@ -8,7 +8,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/resource_github_actions_secret.go b/github/resource_github_actions_secret.go index 7f82291a22..a831076a9d 100644 --- a/github/resource_github_actions_secret.go +++ b/github/resource_github_actions_secret.go @@ -9,7 +9,7 @@ import ( "net/http" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "golang.org/x/crypto/nacl/box" diff --git a/github/resource_github_actions_variable.go b/github/resource_github_actions_variable.go index f4e80f00e3..e60b8323d3 100644 --- a/github/resource_github_actions_variable.go +++ b/github/resource_github_actions_variable.go @@ -6,7 +6,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_app_installation_repositories.go b/github/resource_github_app_installation_repositories.go index db5354a61c..aac67565b3 100644 --- a/github/resource_github_app_installation_repositories.go +++ b/github/resource_github_app_installation_repositories.go @@ -5,7 +5,7 @@ import ( "log" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_app_installation_repository.go b/github/resource_github_app_installation_repository.go index 9f1b6aa4c6..07348b951c 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/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_branch.go b/github/resource_github_branch.go index 54e84da988..d7c34d36bd 100644 --- a/github/resource_github_branch.go +++ b/github/resource_github_branch.go @@ -8,7 +8,7 @@ import ( "net/http" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_branch_default.go b/github/resource_github_branch_default.go index 4e5fdc89bb..b137d92730 100644 --- a/github/resource_github_branch_default.go +++ b/github/resource_github_branch_default.go @@ -6,7 +6,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_branch_protection_v3.go b/github/resource_github_branch_protection_v3.go index af4930dd62..e238def1fd 100644 --- a/github/resource_github_branch_protection_v3.go +++ b/github/resource_github_branch_protection_v3.go @@ -7,7 +7,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/resource_github_branch_protection_v3_utils.go b/github/resource_github_branch_protection_v3_utils.go index 328754a3b8..b5cceb07f9 100644 --- a/github/resource_github_branch_protection_v3_utils.go +++ b/github/resource_github_branch_protection_v3_utils.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_codespaces_organization_secret.go b/github/resource_github_codespaces_organization_secret.go index 3ab3f9cbc1..89b428b361 100644 --- a/github/resource_github_codespaces_organization_secret.go +++ b/github/resource_github_codespaces_organization_secret.go @@ -8,7 +8,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/resource_github_codespaces_organization_secret_repositories.go b/github/resource_github_codespaces_organization_secret_repositories.go index 7fd9064e23..105b18c698 100644 --- a/github/resource_github_codespaces_organization_secret_repositories.go +++ b/github/resource_github_codespaces_organization_secret_repositories.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_codespaces_secret.go b/github/resource_github_codespaces_secret.go index 04155785b8..f11ab7ba18 100644 --- a/github/resource_github_codespaces_secret.go +++ b/github/resource_github_codespaces_secret.go @@ -9,7 +9,7 @@ import ( "net/http" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_codespaces_user_secret.go b/github/resource_github_codespaces_user_secret.go index 8bf637de6d..446ecc73d4 100644 --- a/github/resource_github_codespaces_user_secret.go +++ b/github/resource_github_codespaces_user_secret.go @@ -7,7 +7,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/resource_github_dependabot_organization_secret.go b/github/resource_github_dependabot_organization_secret.go index c9761a5229..9548de5829 100644 --- a/github/resource_github_dependabot_organization_secret.go +++ b/github/resource_github_dependabot_organization_secret.go @@ -8,7 +8,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/resource_github_dependabot_organization_secret_repositories.go b/github/resource_github_dependabot_organization_secret_repositories.go index 11b3db5498..39cb3faba0 100644 --- a/github/resource_github_dependabot_organization_secret_repositories.go +++ b/github/resource_github_dependabot_organization_secret_repositories.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_dependabot_secret.go b/github/resource_github_dependabot_secret.go index b90008b19e..86b3654fb4 100644 --- a/github/resource_github_dependabot_secret.go +++ b/github/resource_github_dependabot_secret.go @@ -9,7 +9,7 @@ import ( "net/http" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "golang.org/x/crypto/nacl/box" ) diff --git a/github/resource_github_emu_group_mapping.go b/github/resource_github_emu_group_mapping.go index d4ce89e3ae..17235683c8 100644 --- a/github/resource_github_emu_group_mapping.go +++ b/github/resource_github_emu_group_mapping.go @@ -5,7 +5,7 @@ import ( "fmt" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/github/resource_github_enterprise_actions_permissions.go b/github/resource_github_enterprise_actions_permissions.go index 85af290311..f5470afa65 100644 --- a/github/resource_github_enterprise_actions_permissions.go +++ b/github/resource_github_enterprise_actions_permissions.go @@ -4,7 +4,7 @@ import ( "context" "errors" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/resource_github_enterprise_actions_runner_group.go b/github/resource_github_enterprise_actions_runner_group.go index 5e96266398..c37ebd8bef 100644 --- a/github/resource_github_enterprise_actions_runner_group.go +++ b/github/resource_github_enterprise_actions_runner_group.go @@ -9,7 +9,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/resource_github_enterprise_actions_workflow_permissions.go b/github/resource_github_enterprise_actions_workflow_permissions.go index e9bf8c7fba..5419bb0896 100644 --- a/github/resource_github_enterprise_actions_workflow_permissions.go +++ b/github/resource_github_enterprise_actions_workflow_permissions.go @@ -4,7 +4,7 @@ import ( "context" "log" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/resource_github_enterprise_organization.go b/github/resource_github_enterprise_organization.go index 7a4a8e4448..3400c54663 100644 --- a/github/resource_github_enterprise_organization.go +++ b/github/resource_github_enterprise_organization.go @@ -7,7 +7,7 @@ import ( "log" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/shurcooL/githubv4" ) diff --git a/github/resource_github_enterprise_organization_test.go b/github/resource_github_enterprise_organization_test.go index fc8b380307..dffc609653 100644 --- a/github/resource_github_enterprise_organization_test.go +++ b/github/resource_github_enterprise_organization_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) diff --git a/github/resource_github_enterprise_security_analysis_settings.go b/github/resource_github_enterprise_security_analysis_settings.go index 73f12477dc..8252ac9631 100644 --- a/github/resource_github_enterprise_security_analysis_settings.go +++ b/github/resource_github_enterprise_security_analysis_settings.go @@ -4,7 +4,7 @@ import ( "context" "log" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_issue.go b/github/resource_github_issue.go index c7387ed54e..3588c81c6d 100644 --- a/github/resource_github_issue.go +++ b/github/resource_github_issue.go @@ -7,7 +7,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_issue_label.go b/github/resource_github_issue_label.go index 0180bc3828..adaefc8c8e 100644 --- a/github/resource_github_issue_label.go +++ b/github/resource_github_issue_label.go @@ -6,7 +6,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_issue_labels.go b/github/resource_github_issue_labels.go index 29465c2635..971d97c000 100644 --- a/github/resource_github_issue_labels.go +++ b/github/resource_github_issue_labels.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_membership.go b/github/resource_github_membership.go index c86bc6e97b..d1ddfacab2 100644 --- a/github/resource_github_membership.go +++ b/github/resource_github_membership.go @@ -6,7 +6,7 @@ import ( "fmt" "net/http" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/github/resource_github_membership_test.go b/github/resource_github_membership_test.go index 5f5c5d4bc6..1f6ddbfdec 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/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) diff --git a/github/resource_github_organization_custom_properties.go b/github/resource_github_organization_custom_properties.go index cfd0dd18a8..ec8872ee36 100644 --- a/github/resource_github_organization_custom_properties.go +++ b/github/resource_github_organization_custom_properties.go @@ -3,9 +3,10 @@ package github import ( "context" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) func resourceGithubOrganizationCustomProperties() *schema.Resource { @@ -31,9 +32,10 @@ func resourceGithubOrganizationCustomProperties() *schema.Resource { Description: "The name of the custom property", }, "value_type": { - Type: schema.TypeString, - Optional: true, - Description: "The type of the custom property", + Type: schema.TypeString, + Optional: true, + Description: "The type of the custom property", + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{string(github.PropertyValueTypeString), string(github.PropertyValueTypeSingleSelect), string(github.PropertyValueTypeMultiSelect), string(github.PropertyValueTypeTrueFalse), string(github.PropertyValueTypeURL)}, false)), }, "required": { Type: schema.TypeBool, @@ -64,7 +66,7 @@ func resourceGithubOrganizationCustomProperties() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateDiagFunc: validateValueFunc([]string{"org_actors", "org_and_repo_actors"}), + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"org_actors", "org_and_repo_actors"}, false)), }, }, } @@ -76,7 +78,7 @@ func resourceGithubCustomPropertiesCreate(d *schema.ResourceData, meta any) erro ownerName := meta.(*Owner).name propertyName := d.Get("property_name").(string) - valueType := d.Get("value_type").(string) + valueType := github.PropertyValueType(d.Get("value_type").(string)) required := d.Get("required").(bool) defaultValue := d.Get("default_value").(string) description := d.Get("description").(string) @@ -119,13 +121,16 @@ func resourceGithubCustomPropertiesRead(d *schema.ResourceData, meta any) error return err } + // TODO: Add support for other types of default values + defaultValue, _ := customProperty.DefaultValueString() + d.SetId(*customProperty.PropertyName) _ = d.Set("allowed_values", customProperty.AllowedValues) - _ = d.Set("default_value", customProperty.DefaultValue) + _ = d.Set("default_value", defaultValue) _ = d.Set("description", customProperty.Description) _ = d.Set("property_name", customProperty.PropertyName) _ = d.Set("required", customProperty.Required) - _ = d.Set("value_type", customProperty.ValueType) + _ = d.Set("value_type", string(customProperty.ValueType)) _ = d.Set("values_editable_by", customProperty.ValuesEditableBy) return nil diff --git a/github/resource_github_organization_custom_properties_test.go b/github/resource_github_organization_custom_properties_test.go index ae7a1aaf9a..071759f957 100644 --- a/github/resource_github_organization_custom_properties_test.go +++ b/github/resource_github_organization_custom_properties_test.go @@ -25,7 +25,7 @@ func TestAccGithubOrganizationCustomPropertiesValidation(t *testing.T) { Steps: []resource.TestStep{ { Config: config, - ExpectError: regexp.MustCompile("invalid_value is an invalid value"), + ExpectError: regexp.MustCompile("invalid_value"), }, }, }) diff --git a/github/resource_github_organization_custom_role.go b/github/resource_github_organization_custom_role.go index 2c0801ef60..1d4727cd4a 100644 --- a/github/resource_github_organization_custom_role.go +++ b/github/resource_github_organization_custom_role.go @@ -6,7 +6,7 @@ import ( "log" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_organization_project_test.go b/github/resource_github_organization_project_test.go index 20b64d0137..3fcf0f5583 100644 --- a/github/resource_github_organization_project_test.go +++ b/github/resource_github_organization_project_test.go @@ -7,7 +7,7 @@ package github // "strings" // "testing" -// "github.com/google/go-github/v81/github" +// "github.com/google/go-github/v82/github" // "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" // "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" // ) diff --git a/github/resource_github_organization_repository_role.go b/github/resource_github_organization_repository_role.go index e1d248e47f..b7bf49ab67 100644 --- a/github/resource_github_organization_repository_role.go +++ b/github/resource_github_organization_repository_role.go @@ -6,7 +6,7 @@ import ( "log" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_organization_role.go b/github/resource_github_organization_role.go index eddeb79c56..7ae73b71ea 100644 --- a/github/resource_github_organization_role.go +++ b/github/resource_github_organization_role.go @@ -8,7 +8,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_organization_role_team.go b/github/resource_github_organization_role_team.go index 453f39fb64..47f33d6c14 100644 --- a/github/resource_github_organization_role_team.go +++ b/github/resource_github_organization_role_team.go @@ -6,7 +6,7 @@ import ( "log" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_organization_role_team_assignment.go b/github/resource_github_organization_role_team_assignment.go index 0aaa51fb01..8c513e6dc5 100644 --- a/github/resource_github_organization_role_team_assignment.go +++ b/github/resource_github_organization_role_team_assignment.go @@ -5,7 +5,7 @@ import ( "log" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_organization_role_user.go b/github/resource_github_organization_role_user.go index dbf5591bc2..8ae33c8ea4 100644 --- a/github/resource_github_organization_role_user.go +++ b/github/resource_github_organization_role_user.go @@ -6,7 +6,7 @@ import ( "log" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_organization_ruleset.go b/github/resource_github_organization_ruleset.go index d6ad89a390..66f3a9a14a 100644 --- a/github/resource_github_organization_ruleset.go +++ b/github/resource_github_organization_ruleset.go @@ -7,7 +7,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/github/resource_github_organization_security_manager.go b/github/resource_github_organization_security_manager.go index 8b90ebd83a..5503619102 100644 --- a/github/resource_github_organization_security_manager.go +++ b/github/resource_github_organization_security_manager.go @@ -6,7 +6,7 @@ import ( "log" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_organization_settings.go b/github/resource_github_organization_settings.go index c9e4d6ce63..c5ae0bd5b4 100644 --- a/github/resource_github_organization_settings.go +++ b/github/resource_github_organization_settings.go @@ -6,7 +6,7 @@ import ( "log" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/resource_github_organization_webhook.go b/github/resource_github_organization_webhook.go index 5c6dfa65e7..62c9a8926f 100644 --- a/github/resource_github_organization_webhook.go +++ b/github/resource_github_organization_webhook.go @@ -7,7 +7,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_project_column_test.go b/github/resource_github_project_column_test.go index af5d2e94ed..f610d5cd82 100644 --- a/github/resource_github_project_column_test.go +++ b/github/resource_github_project_column_test.go @@ -6,7 +6,7 @@ package github // "strconv" // "testing" -// "github.com/google/go-github/v81/github" +// "github.com/google/go-github/v82/github" // "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" // "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" // ) diff --git a/github/resource_github_release.go b/github/resource_github_release.go index bc0299dba3..98949c9cd0 100644 --- a/github/resource_github_release.go +++ b/github/resource_github_release.go @@ -8,7 +8,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_repository.go b/github/resource_github_repository.go index 2419dee190..0f0c3a5791 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/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/github/resource_github_repository_autolink_reference.go b/github/resource_github_repository_autolink_reference.go index b569845cba..9ee8c90eee 100644 --- a/github/resource_github_repository_autolink_reference.go +++ b/github/resource_github_repository_autolink_reference.go @@ -10,7 +10,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/resource_github_repository_collaborator.go b/github/resource_github_repository_collaborator.go index 27a198efe5..ecb8d1bde9 100644 --- a/github/resource_github_repository_collaborator.go +++ b/github/resource_github_repository_collaborator.go @@ -8,7 +8,7 @@ import ( "net/http" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_repository_collaborators.go b/github/resource_github_repository_collaborators.go index 72b676c750..2fafc28695 100644 --- a/github/resource_github_repository_collaborators.go +++ b/github/resource_github_repository_collaborators.go @@ -8,7 +8,7 @@ import ( "sort" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_repository_collaborators_test.go b/github/resource_github_repository_collaborators_test.go index 3e792ac979..b3bcbbf212 100644 --- a/github/resource_github_repository_collaborators_test.go +++ b/github/resource_github_repository_collaborators_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" diff --git a/github/resource_github_repository_custom_property.go b/github/resource_github_repository_custom_property.go index c72b6b5493..e5c5eae229 100644 --- a/github/resource_github_repository_custom_property.go +++ b/github/resource_github_repository_custom_property.go @@ -4,18 +4,11 @@ import ( "context" "fmt" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) -const ( - SINGLE_SELECT = "single_select" - MULTI_SELECT = "multi_select" - STRING = "string" - TRUE_FALSE = "true_false" -) - func resourceGithubRepositoryCustomProperty() *schema.Resource { return &schema.Resource{ Create: resourceGithubRepositoryCustomPropertyCreate, @@ -37,7 +30,7 @@ func resourceGithubRepositoryCustomProperty() *schema.Resource { Required: true, Description: "Type of the custom property", ForceNew: true, - ValidateDiagFunc: toDiagFunc(validation.StringInSlice([]string{SINGLE_SELECT, MULTI_SELECT, STRING, TRUE_FALSE}, false), "property_type"), + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{string(github.PropertyValueTypeString), string(github.PropertyValueTypeSingleSelect), string(github.PropertyValueTypeMultiSelect), string(github.PropertyValueTypeTrueFalse), string(github.PropertyValueTypeURL)}, false)), }, "property_name": { Type: schema.TypeString, @@ -66,7 +59,7 @@ func resourceGithubRepositoryCustomPropertyCreate(d *schema.ResourceData, meta a owner := meta.(*Owner).name repoName := d.Get("repository").(string) propertyName := d.Get("property_name").(string) - propertyType := d.Get("property_type").(string) + propertyType := github.PropertyValueType(d.Get("property_type").(string)) propertyValue := expandStringList(d.Get("property_value").(*schema.Set).List()) customProperty := github.CustomPropertyValue{ @@ -75,9 +68,9 @@ func resourceGithubRepositoryCustomPropertyCreate(d *schema.ResourceData, meta a // The propertyValue can either be a list of strings or a string switch propertyType { - case SINGLE_SELECT, TRUE_FALSE, STRING: + case github.PropertyValueTypeString, github.PropertyValueTypeSingleSelect, github.PropertyValueTypeURL, github.PropertyValueTypeTrueFalse: customProperty.Value = propertyValue[0] - case MULTI_SELECT: + case github.PropertyValueTypeMultiSelect: customProperty.Value = propertyValue default: return fmt.Errorf("custom property type is not valid: %v", propertyType) diff --git a/github/resource_github_repository_deploy_key.go b/github/resource_github_repository_deploy_key.go index f89c296348..9cd12c2836 100644 --- a/github/resource_github_repository_deploy_key.go +++ b/github/resource_github_repository_deploy_key.go @@ -9,7 +9,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_repository_deployment_branch_policy.go b/github/resource_github_repository_deployment_branch_policy.go index 1dfded0490..a66c73afb1 100644 --- a/github/resource_github_repository_deployment_branch_policy.go +++ b/github/resource_github_repository_deployment_branch_policy.go @@ -7,7 +7,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_repository_environment.go b/github/resource_github_repository_environment.go index bf2fccf6f0..4b3713ef03 100644 --- a/github/resource_github_repository_environment.go +++ b/github/resource_github_repository_environment.go @@ -7,7 +7,7 @@ import ( "net/http" "net/url" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/github/resource_github_repository_environment_deployment_policy.go b/github/resource_github_repository_environment_deployment_policy.go index 8726a02663..a988ab9e1a 100644 --- a/github/resource_github_repository_environment_deployment_policy.go +++ b/github/resource_github_repository_environment_deployment_policy.go @@ -8,7 +8,7 @@ import ( "net/url" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/github/resource_github_repository_file.go b/github/resource_github_repository_file.go index c24573c056..a0727c6b74 100644 --- a/github/resource_github_repository_file.go +++ b/github/resource_github_repository_file.go @@ -9,7 +9,7 @@ import ( "net/url" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_repository_milestone.go b/github/resource_github_repository_milestone.go index 2ac4345887..680db860e0 100644 --- a/github/resource_github_repository_milestone.go +++ b/github/resource_github_repository_milestone.go @@ -10,7 +10,7 @@ import ( "strings" "time" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/resource_github_repository_pull_request.go b/github/resource_github_repository_pull_request.go index 51f6bfba31..9508001bf6 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/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_repository_ruleset.go b/github/resource_github_repository_ruleset.go index 75127637a3..8abdb26126 100644 --- a/github/resource_github_repository_ruleset.go +++ b/github/resource_github_repository_ruleset.go @@ -9,7 +9,7 @@ import ( "regexp" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/github/resource_github_repository_topics.go b/github/resource_github_repository_topics.go index 625869a557..3c5d5a5113 100644 --- a/github/resource_github_repository_topics.go +++ b/github/resource_github_repository_topics.go @@ -7,7 +7,7 @@ import ( "net/http" "regexp" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/resource_github_repository_webhook.go b/github/resource_github_repository_webhook.go index db105e35ae..3defdb23ee 100644 --- a/github/resource_github_repository_webhook.go +++ b/github/resource_github_repository_webhook.go @@ -9,7 +9,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_team.go b/github/resource_github_team.go index 5eb0d6f757..6f823e730d 100644 --- a/github/resource_github_team.go +++ b/github/resource_github_team.go @@ -7,7 +7,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/github/resource_github_team_members.go b/github/resource_github_team_members.go index f972473e84..6bb22e2c60 100644 --- a/github/resource_github_team_members.go +++ b/github/resource_github_team_members.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/shurcooL/githubv4" ) diff --git a/github/resource_github_team_membership.go b/github/resource_github_team_membership.go index e7932a791b..e0a296e657 100644 --- a/github/resource_github_team_membership.go +++ b/github/resource_github_team_membership.go @@ -7,7 +7,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_team_membership_test.go b/github/resource_github_team_membership_test.go index f9156f349f..02fa2f313c 100644 --- a/github/resource_github_team_membership_test.go +++ b/github/resource_github_team_membership_test.go @@ -6,7 +6,7 @@ import ( "fmt" "testing" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" diff --git a/github/resource_github_team_repository.go b/github/resource_github_team_repository.go index ecdbe26216..2806231d1a 100644 --- a/github/resource_github_team_repository.go +++ b/github/resource_github_team_repository.go @@ -8,7 +8,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_team_sync_group_mapping.go b/github/resource_github_team_sync_group_mapping.go index 52ad3fa806..53d7363bf3 100644 --- a/github/resource_github_team_sync_group_mapping.go +++ b/github/resource_github_team_sync_group_mapping.go @@ -7,7 +7,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/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 6874317323..a03fbce056 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/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" diff --git a/github/resource_github_user_gpg_key.go b/github/resource_github_user_gpg_key.go index aa2196f44f..cc6c2d21b8 100644 --- a/github/resource_github_user_gpg_key.go +++ b/github/resource_github_user_gpg_key.go @@ -7,7 +7,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_user_ssh_key.go b/github/resource_github_user_ssh_key.go index 84d7355ec1..681a68220f 100644 --- a/github/resource_github_user_ssh_key.go +++ b/github/resource_github_user_ssh_key.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/resource_github_workflow_repository_permissions.go b/github/resource_github_workflow_repository_permissions.go index 9dff24e6d4..ca35e34183 100644 --- a/github/resource_github_workflow_repository_permissions.go +++ b/github/resource_github_workflow_repository_permissions.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) diff --git a/github/resource_organization_block.go b/github/resource_organization_block.go index 5f2a4361d4..013e49d1dc 100644 --- a/github/resource_organization_block.go +++ b/github/resource_organization_block.go @@ -6,7 +6,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/github/transport.go b/github/transport.go index ec56ef440f..8b445b7a37 100644 --- a/github/transport.go +++ b/github/transport.go @@ -10,7 +10,7 @@ import ( "sync" "time" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) const ( diff --git a/github/transport_test.go b/github/transport_test.go index 856e9b2509..ad465b2d1f 100644 --- a/github/transport_test.go +++ b/github/transport_test.go @@ -12,7 +12,7 @@ import ( "testing" "time" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) func TestEtagTransport(t *testing.T) { diff --git a/github/util.go b/github/util.go index b3345c9477..736615a9cc 100644 --- a/github/util.go +++ b/github/util.go @@ -13,7 +13,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/github/util_labels.go b/github/util_labels.go index ca610da60f..3e0793e5bf 100644 --- a/github/util_labels.go +++ b/github/util_labels.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) func flattenLabels(labels []*github.Label) []any { diff --git a/github/util_rules.go b/github/util_rules.go index 016bba72c2..bc8ac1cdd8 100644 --- a/github/util_rules.go +++ b/github/util_rules.go @@ -5,13 +5,10 @@ import ( "reflect" "sort" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -// This is a workaround for the SDK not setting the default value for the allowed_merge_methods field. -var defaultPullRequestMergeMethods = []github.PullRequestMergeMethod{github.PullRequestMergeMethodMerge, github.PullRequestMergeMethodRebase, github.PullRequestMergeMethodSquash} - // Helper function to safely convert interface{} to int, handling both int and float64. func toInt(v any) int { switch val := v.(type) { @@ -42,10 +39,10 @@ func toInt64(v any) int64 { func toPullRequestMergeMethods(input any) []github.PullRequestMergeMethod { value, ok := input.([]any) - if !ok || value == nil || len(value) == 0 { - log.Printf("[DEBUG] No allowed merge methods provided, using default: %#v", input) - return defaultPullRequestMergeMethods + if !ok || len(value) == 0 { + return []github.PullRequestMergeMethod{} } + mergeMethods := make([]github.PullRequestMergeMethod, 0, len(value)) for _, item := range value { if method, ok := item.(string); ok { diff --git a/github/util_rules_test.go b/github/util_rules_test.go index 2298fed112..8aaec0aed4 100644 --- a/github/util_rules_test.go +++ b/github/util_rules_test.go @@ -3,7 +3,7 @@ package github import ( "testing" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/go.mod b/go.mod index c67609c969..ec195e5f94 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.24.0 require ( github.com/go-jose/go-jose/v3 v3.0.4 - github.com/google/go-github/v81 v81.0.0 + github.com/google/go-github/v82 v82.0.0 github.com/google/uuid v1.6.0 github.com/hashicorp/go-cty v1.5.0 github.com/hashicorp/terraform-plugin-log v0.9.0 @@ -24,7 +24,7 @@ require ( github.com/fatih/color v1.18.0 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-cmp v0.7.0 // indirect - github.com/google/go-querystring v1.1.0 // indirect + github.com/google/go-querystring v1.2.0 // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-checkpoint v0.5.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect diff --git a/go.sum b/go.sum index 8adda88028..5afae4d9be 100644 --- a/go.sum +++ b/go.sum @@ -47,15 +47,15 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/google/go-github/v81 v81.0.0 h1:hTLugQRxSLD1Yei18fk4A5eYjOGLUBKAl/VCqOfFkZc= -github.com/google/go-github/v81 v81.0.0/go.mod h1:upyjaybucIbBIuxgJS7YLOZGziyvvJ92WX6WEBNE3sM= -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/go-github/v82 v82.0.0 h1:OH09ESON2QwKCUVMYmMcVu1IFKFoaZHwqYaUtr/MVfk= +github.com/google/go-github/v82 v82.0.0/go.mod h1:hQ6Xo0VKfL8RZ7z1hSfB4fvISg0QqHOqe9BP0qo+WvM= +github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfhIxNtP0= +github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= diff --git a/vendor/github.com/google/go-github/v81/AUTHORS b/vendor/github.com/google/go-github/v82/AUTHORS similarity index 100% rename from vendor/github.com/google/go-github/v81/AUTHORS rename to vendor/github.com/google/go-github/v82/AUTHORS diff --git a/vendor/github.com/google/go-github/v81/LICENSE b/vendor/github.com/google/go-github/v82/LICENSE similarity index 100% rename from vendor/github.com/google/go-github/v81/LICENSE rename to vendor/github.com/google/go-github/v82/LICENSE diff --git a/vendor/github.com/google/go-github/v81/github/actions.go b/vendor/github.com/google/go-github/v82/github/actions.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/actions.go rename to vendor/github.com/google/go-github/v82/github/actions.go diff --git a/vendor/github.com/google/go-github/v81/github/actions_artifacts.go b/vendor/github.com/google/go-github/v82/github/actions_artifacts.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/actions_artifacts.go rename to vendor/github.com/google/go-github/v82/github/actions_artifacts.go diff --git a/vendor/github.com/google/go-github/v81/github/actions_cache.go b/vendor/github.com/google/go-github/v82/github/actions_cache.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/actions_cache.go rename to vendor/github.com/google/go-github/v82/github/actions_cache.go diff --git a/vendor/github.com/google/go-github/v81/github/actions_hosted_runners.go b/vendor/github.com/google/go-github/v82/github/actions_hosted_runners.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/actions_hosted_runners.go rename to vendor/github.com/google/go-github/v82/github/actions_hosted_runners.go diff --git a/vendor/github.com/google/go-github/v81/github/actions_oidc.go b/vendor/github.com/google/go-github/v82/github/actions_oidc.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/actions_oidc.go rename to vendor/github.com/google/go-github/v82/github/actions_oidc.go diff --git a/vendor/github.com/google/go-github/v81/github/actions_permissions_enterprise.go b/vendor/github.com/google/go-github/v82/github/actions_permissions_enterprise.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/actions_permissions_enterprise.go rename to vendor/github.com/google/go-github/v82/github/actions_permissions_enterprise.go diff --git a/vendor/github.com/google/go-github/v81/github/actions_permissions_orgs.go b/vendor/github.com/google/go-github/v82/github/actions_permissions_orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/actions_permissions_orgs.go rename to vendor/github.com/google/go-github/v82/github/actions_permissions_orgs.go diff --git a/vendor/github.com/google/go-github/v81/github/actions_runner_groups.go b/vendor/github.com/google/go-github/v82/github/actions_runner_groups.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/actions_runner_groups.go rename to vendor/github.com/google/go-github/v82/github/actions_runner_groups.go diff --git a/vendor/github.com/google/go-github/v81/github/actions_runners.go b/vendor/github.com/google/go-github/v82/github/actions_runners.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/actions_runners.go rename to vendor/github.com/google/go-github/v82/github/actions_runners.go diff --git a/vendor/github.com/google/go-github/v81/github/actions_secrets.go b/vendor/github.com/google/go-github/v82/github/actions_secrets.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/actions_secrets.go rename to vendor/github.com/google/go-github/v82/github/actions_secrets.go diff --git a/vendor/github.com/google/go-github/v81/github/actions_variables.go b/vendor/github.com/google/go-github/v82/github/actions_variables.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/actions_variables.go rename to vendor/github.com/google/go-github/v82/github/actions_variables.go diff --git a/vendor/github.com/google/go-github/v81/github/actions_workflow_jobs.go b/vendor/github.com/google/go-github/v82/github/actions_workflow_jobs.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/actions_workflow_jobs.go rename to vendor/github.com/google/go-github/v82/github/actions_workflow_jobs.go diff --git a/vendor/github.com/google/go-github/v81/github/actions_workflow_runs.go b/vendor/github.com/google/go-github/v82/github/actions_workflow_runs.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/actions_workflow_runs.go rename to vendor/github.com/google/go-github/v82/github/actions_workflow_runs.go diff --git a/vendor/github.com/google/go-github/v81/github/actions_workflows.go b/vendor/github.com/google/go-github/v82/github/actions_workflows.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/actions_workflows.go rename to vendor/github.com/google/go-github/v82/github/actions_workflows.go diff --git a/vendor/github.com/google/go-github/v81/github/activity.go b/vendor/github.com/google/go-github/v82/github/activity.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/activity.go rename to vendor/github.com/google/go-github/v82/github/activity.go diff --git a/vendor/github.com/google/go-github/v81/github/activity_events.go b/vendor/github.com/google/go-github/v82/github/activity_events.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/activity_events.go rename to vendor/github.com/google/go-github/v82/github/activity_events.go diff --git a/vendor/github.com/google/go-github/v81/github/activity_notifications.go b/vendor/github.com/google/go-github/v82/github/activity_notifications.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/activity_notifications.go rename to vendor/github.com/google/go-github/v82/github/activity_notifications.go diff --git a/vendor/github.com/google/go-github/v81/github/activity_star.go b/vendor/github.com/google/go-github/v82/github/activity_star.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/activity_star.go rename to vendor/github.com/google/go-github/v82/github/activity_star.go diff --git a/vendor/github.com/google/go-github/v81/github/activity_watching.go b/vendor/github.com/google/go-github/v82/github/activity_watching.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/activity_watching.go rename to vendor/github.com/google/go-github/v82/github/activity_watching.go diff --git a/vendor/github.com/google/go-github/v81/github/admin.go b/vendor/github.com/google/go-github/v82/github/admin.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/admin.go rename to vendor/github.com/google/go-github/v82/github/admin.go diff --git a/vendor/github.com/google/go-github/v81/github/admin_orgs.go b/vendor/github.com/google/go-github/v82/github/admin_orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/admin_orgs.go rename to vendor/github.com/google/go-github/v82/github/admin_orgs.go diff --git a/vendor/github.com/google/go-github/v81/github/admin_stats.go b/vendor/github.com/google/go-github/v82/github/admin_stats.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/admin_stats.go rename to vendor/github.com/google/go-github/v82/github/admin_stats.go diff --git a/vendor/github.com/google/go-github/v81/github/admin_users.go b/vendor/github.com/google/go-github/v82/github/admin_users.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/admin_users.go rename to vendor/github.com/google/go-github/v82/github/admin_users.go diff --git a/vendor/github.com/google/go-github/v81/github/apps.go b/vendor/github.com/google/go-github/v82/github/apps.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/apps.go rename to vendor/github.com/google/go-github/v82/github/apps.go diff --git a/vendor/github.com/google/go-github/v81/github/apps_hooks.go b/vendor/github.com/google/go-github/v82/github/apps_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/apps_hooks.go rename to vendor/github.com/google/go-github/v82/github/apps_hooks.go diff --git a/vendor/github.com/google/go-github/v81/github/apps_hooks_deliveries.go b/vendor/github.com/google/go-github/v82/github/apps_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/apps_hooks_deliveries.go rename to vendor/github.com/google/go-github/v82/github/apps_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v81/github/apps_installation.go b/vendor/github.com/google/go-github/v82/github/apps_installation.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/apps_installation.go rename to vendor/github.com/google/go-github/v82/github/apps_installation.go diff --git a/vendor/github.com/google/go-github/v81/github/apps_manifest.go b/vendor/github.com/google/go-github/v82/github/apps_manifest.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/apps_manifest.go rename to vendor/github.com/google/go-github/v82/github/apps_manifest.go diff --git a/vendor/github.com/google/go-github/v81/github/apps_marketplace.go b/vendor/github.com/google/go-github/v82/github/apps_marketplace.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/apps_marketplace.go rename to vendor/github.com/google/go-github/v82/github/apps_marketplace.go diff --git a/vendor/github.com/google/go-github/v81/github/attestations.go b/vendor/github.com/google/go-github/v82/github/attestations.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/attestations.go rename to vendor/github.com/google/go-github/v82/github/attestations.go diff --git a/vendor/github.com/google/go-github/v81/github/authorizations.go b/vendor/github.com/google/go-github/v82/github/authorizations.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/authorizations.go rename to vendor/github.com/google/go-github/v82/github/authorizations.go diff --git a/vendor/github.com/google/go-github/v81/github/billing.go b/vendor/github.com/google/go-github/v82/github/billing.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/billing.go rename to vendor/github.com/google/go-github/v82/github/billing.go diff --git a/vendor/github.com/google/go-github/v81/github/checks.go b/vendor/github.com/google/go-github/v82/github/checks.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/checks.go rename to vendor/github.com/google/go-github/v82/github/checks.go diff --git a/vendor/github.com/google/go-github/v81/github/classroom.go b/vendor/github.com/google/go-github/v82/github/classroom.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/classroom.go rename to vendor/github.com/google/go-github/v82/github/classroom.go diff --git a/vendor/github.com/google/go-github/v81/github/code_scanning.go b/vendor/github.com/google/go-github/v82/github/code_scanning.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/code_scanning.go rename to vendor/github.com/google/go-github/v82/github/code_scanning.go diff --git a/vendor/github.com/google/go-github/v81/github/codesofconduct.go b/vendor/github.com/google/go-github/v82/github/codesofconduct.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/codesofconduct.go rename to vendor/github.com/google/go-github/v82/github/codesofconduct.go diff --git a/vendor/github.com/google/go-github/v81/github/codespaces.go b/vendor/github.com/google/go-github/v82/github/codespaces.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/codespaces.go rename to vendor/github.com/google/go-github/v82/github/codespaces.go diff --git a/vendor/github.com/google/go-github/v81/github/codespaces_machines.go b/vendor/github.com/google/go-github/v82/github/codespaces_machines.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/codespaces_machines.go rename to vendor/github.com/google/go-github/v82/github/codespaces_machines.go diff --git a/vendor/github.com/google/go-github/v81/github/codespaces_orgs.go b/vendor/github.com/google/go-github/v82/github/codespaces_orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/codespaces_orgs.go rename to vendor/github.com/google/go-github/v82/github/codespaces_orgs.go diff --git a/vendor/github.com/google/go-github/v81/github/codespaces_secrets.go b/vendor/github.com/google/go-github/v82/github/codespaces_secrets.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/codespaces_secrets.go rename to vendor/github.com/google/go-github/v82/github/codespaces_secrets.go diff --git a/vendor/github.com/google/go-github/v81/github/copilot.go b/vendor/github.com/google/go-github/v82/github/copilot.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/copilot.go rename to vendor/github.com/google/go-github/v82/github/copilot.go diff --git a/vendor/github.com/google/go-github/v81/github/credentials.go b/vendor/github.com/google/go-github/v82/github/credentials.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/credentials.go rename to vendor/github.com/google/go-github/v82/github/credentials.go diff --git a/vendor/github.com/google/go-github/v81/github/dependabot.go b/vendor/github.com/google/go-github/v82/github/dependabot.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/dependabot.go rename to vendor/github.com/google/go-github/v82/github/dependabot.go diff --git a/vendor/github.com/google/go-github/v81/github/dependabot_alerts.go b/vendor/github.com/google/go-github/v82/github/dependabot_alerts.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/dependabot_alerts.go rename to vendor/github.com/google/go-github/v82/github/dependabot_alerts.go diff --git a/vendor/github.com/google/go-github/v81/github/dependabot_secrets.go b/vendor/github.com/google/go-github/v82/github/dependabot_secrets.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/dependabot_secrets.go rename to vendor/github.com/google/go-github/v82/github/dependabot_secrets.go diff --git a/vendor/github.com/google/go-github/v81/github/dependency_graph.go b/vendor/github.com/google/go-github/v82/github/dependency_graph.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/dependency_graph.go rename to vendor/github.com/google/go-github/v82/github/dependency_graph.go diff --git a/vendor/github.com/google/go-github/v81/github/dependency_graph_snapshots.go b/vendor/github.com/google/go-github/v82/github/dependency_graph_snapshots.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/dependency_graph_snapshots.go rename to vendor/github.com/google/go-github/v82/github/dependency_graph_snapshots.go diff --git a/vendor/github.com/google/go-github/v81/github/doc.go b/vendor/github.com/google/go-github/v82/github/doc.go similarity index 99% rename from vendor/github.com/google/go-github/v81/github/doc.go rename to vendor/github.com/google/go-github/v82/github/doc.go index 9cfe0ac91a..850f3ddbaa 100644 --- a/vendor/github.com/google/go-github/v81/github/doc.go +++ b/vendor/github.com/google/go-github/v82/github/doc.go @@ -8,7 +8,7 @@ Package github provides a client for using the GitHub API. Usage: - import "github.com/google/go-github/v81/github" // with go modules enabled (GO111MODULE=on or outside GOPATH) + import "github.com/google/go-github/v82/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/v81/github/emojis.go b/vendor/github.com/google/go-github/v82/github/emojis.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/emojis.go rename to vendor/github.com/google/go-github/v82/github/emojis.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise.go b/vendor/github.com/google/go-github/v82/github/enterprise.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise.go rename to vendor/github.com/google/go-github/v82/github/enterprise.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_actions_hosted_runners.go b/vendor/github.com/google/go-github/v82/github/enterprise_actions_hosted_runners.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_actions_hosted_runners.go rename to vendor/github.com/google/go-github/v82/github/enterprise_actions_hosted_runners.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_actions_runner_groups.go b/vendor/github.com/google/go-github/v82/github/enterprise_actions_runner_groups.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_actions_runner_groups.go rename to vendor/github.com/google/go-github/v82/github/enterprise_actions_runner_groups.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_actions_runners.go b/vendor/github.com/google/go-github/v82/github/enterprise_actions_runners.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_actions_runners.go rename to vendor/github.com/google/go-github/v82/github/enterprise_actions_runners.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_app_installation.go b/vendor/github.com/google/go-github/v82/github/enterprise_app_installation.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_app_installation.go rename to vendor/github.com/google/go-github/v82/github/enterprise_app_installation.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_apps.go b/vendor/github.com/google/go-github/v82/github/enterprise_apps.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_apps.go rename to vendor/github.com/google/go-github/v82/github/enterprise_apps.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_audit_log.go b/vendor/github.com/google/go-github/v82/github/enterprise_audit_log.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_audit_log.go rename to vendor/github.com/google/go-github/v82/github/enterprise_audit_log.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_billing_cost_centers.go b/vendor/github.com/google/go-github/v82/github/enterprise_billing_cost_centers.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_billing_cost_centers.go rename to vendor/github.com/google/go-github/v82/github/enterprise_billing_cost_centers.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_code_security_and_analysis.go b/vendor/github.com/google/go-github/v82/github/enterprise_code_security_and_analysis.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_code_security_and_analysis.go rename to vendor/github.com/google/go-github/v82/github/enterprise_code_security_and_analysis.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_codesecurity_configurations.go b/vendor/github.com/google/go-github/v82/github/enterprise_codesecurity_configurations.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_codesecurity_configurations.go rename to vendor/github.com/google/go-github/v82/github/enterprise_codesecurity_configurations.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_licenses.go b/vendor/github.com/google/go-github/v82/github/enterprise_licenses.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_licenses.go rename to vendor/github.com/google/go-github/v82/github/enterprise_licenses.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_manage_ghes.go b/vendor/github.com/google/go-github/v82/github/enterprise_manage_ghes.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_manage_ghes.go rename to vendor/github.com/google/go-github/v82/github/enterprise_manage_ghes.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_manage_ghes_config.go b/vendor/github.com/google/go-github/v82/github/enterprise_manage_ghes_config.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_manage_ghes_config.go rename to vendor/github.com/google/go-github/v82/github/enterprise_manage_ghes_config.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_manage_ghes_maintenance.go b/vendor/github.com/google/go-github/v82/github/enterprise_manage_ghes_maintenance.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_manage_ghes_maintenance.go rename to vendor/github.com/google/go-github/v82/github/enterprise_manage_ghes_maintenance.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_manage_ghes_ssh.go b/vendor/github.com/google/go-github/v82/github/enterprise_manage_ghes_ssh.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_manage_ghes_ssh.go rename to vendor/github.com/google/go-github/v82/github/enterprise_manage_ghes_ssh.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_network_configurations.go b/vendor/github.com/google/go-github/v82/github/enterprise_network_configurations.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_network_configurations.go rename to vendor/github.com/google/go-github/v82/github/enterprise_network_configurations.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_organization_properties.go b/vendor/github.com/google/go-github/v82/github/enterprise_organization_properties.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_organization_properties.go rename to vendor/github.com/google/go-github/v82/github/enterprise_organization_properties.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_properties.go b/vendor/github.com/google/go-github/v82/github/enterprise_properties.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_properties.go rename to vendor/github.com/google/go-github/v82/github/enterprise_properties.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_rules.go b/vendor/github.com/google/go-github/v82/github/enterprise_rules.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_rules.go rename to vendor/github.com/google/go-github/v82/github/enterprise_rules.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_scim.go b/vendor/github.com/google/go-github/v82/github/enterprise_scim.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_scim.go rename to vendor/github.com/google/go-github/v82/github/enterprise_scim.go diff --git a/vendor/github.com/google/go-github/v81/github/enterprise_team.go b/vendor/github.com/google/go-github/v82/github/enterprise_team.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/enterprise_team.go rename to vendor/github.com/google/go-github/v82/github/enterprise_team.go diff --git a/vendor/github.com/google/go-github/v81/github/event.go b/vendor/github.com/google/go-github/v82/github/event.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/event.go rename to vendor/github.com/google/go-github/v82/github/event.go diff --git a/vendor/github.com/google/go-github/v81/github/event_types.go b/vendor/github.com/google/go-github/v82/github/event_types.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/event_types.go rename to vendor/github.com/google/go-github/v82/github/event_types.go diff --git a/vendor/github.com/google/go-github/v81/github/gists.go b/vendor/github.com/google/go-github/v82/github/gists.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/gists.go rename to vendor/github.com/google/go-github/v82/github/gists.go diff --git a/vendor/github.com/google/go-github/v81/github/gists_comments.go b/vendor/github.com/google/go-github/v82/github/gists_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/gists_comments.go rename to vendor/github.com/google/go-github/v82/github/gists_comments.go diff --git a/vendor/github.com/google/go-github/v81/github/git.go b/vendor/github.com/google/go-github/v82/github/git.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/git.go rename to vendor/github.com/google/go-github/v82/github/git.go diff --git a/vendor/github.com/google/go-github/v81/github/git_blobs.go b/vendor/github.com/google/go-github/v82/github/git_blobs.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/git_blobs.go rename to vendor/github.com/google/go-github/v82/github/git_blobs.go diff --git a/vendor/github.com/google/go-github/v81/github/git_commits.go b/vendor/github.com/google/go-github/v82/github/git_commits.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/git_commits.go rename to vendor/github.com/google/go-github/v82/github/git_commits.go diff --git a/vendor/github.com/google/go-github/v81/github/git_refs.go b/vendor/github.com/google/go-github/v82/github/git_refs.go similarity index 90% rename from vendor/github.com/google/go-github/v81/github/git_refs.go rename to vendor/github.com/google/go-github/v82/github/git_refs.go index 735aef006b..bca7741d93 100644 --- a/vendor/github.com/google/go-github/v81/github/git_refs.go +++ b/vendor/github.com/google/go-github/v82/github/git_refs.go @@ -82,31 +82,17 @@ func refURLEscape(ref string) string { return strings.Join(parts, "/") } -// ReferenceListOptions specifies optional parameters to the -// GitService.ListMatchingRefs method. -type ReferenceListOptions struct { - // The ref must be formatted as `heads/` for branches and `tags/` for tags. - Ref string `url:"-"` - - ListOptions -} - // ListMatchingRefs lists references in a repository that match a supplied ref. +// The ref in the URL must be formatted as `heads/` for branches and `tags/` for tags. +// If the ref doesn't exist in the repository, but existing refs start with ref, they will be returned as an array. // Use an empty ref to list all references. // // GitHub API docs: https://docs.github.com/rest/git/refs#list-matching-references // //meta:operation GET /repos/{owner}/{repo}/git/matching-refs/{ref} -func (s *GitService) ListMatchingRefs(ctx context.Context, owner, repo string, opts *ReferenceListOptions) ([]*Reference, *Response, error) { - var ref string - if opts != nil { - ref = strings.TrimPrefix(opts.Ref, "refs/") - } +func (s *GitService) ListMatchingRefs(ctx context.Context, owner, repo, ref string) ([]*Reference, *Response, error) { + ref = strings.TrimPrefix(ref, "refs/") // API expects no "refs/" prefix u := fmt.Sprintf("repos/%v/%v/git/matching-refs/%v", owner, repo, refURLEscape(ref)) - 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/v81/github/git_tags.go b/vendor/github.com/google/go-github/v82/github/git_tags.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/git_tags.go rename to vendor/github.com/google/go-github/v82/github/git_tags.go diff --git a/vendor/github.com/google/go-github/v81/github/git_trees.go b/vendor/github.com/google/go-github/v82/github/git_trees.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/git_trees.go rename to vendor/github.com/google/go-github/v82/github/git_trees.go diff --git a/vendor/github.com/google/go-github/v81/github/github-accessors.go b/vendor/github.com/google/go-github/v82/github/github-accessors.go similarity index 99% rename from vendor/github.com/google/go-github/v81/github/github-accessors.go rename to vendor/github.com/google/go-github/v82/github/github-accessors.go index 35d86729d0..03a8bc19ea 100644 --- a/vendor/github.com/google/go-github/v81/github/github-accessors.go +++ b/vendor/github.com/google/go-github/v82/github/github-accessors.go @@ -2222,6 +2222,14 @@ func (b *BypassActor) GetBypassMode() *BypassMode { return b.BypassMode } +// GetSecurityConfigurationID returns the SecurityConfigurationID field if it's non-nil, zero value otherwise. +func (b *BypassReviewer) GetSecurityConfigurationID() int64 { + if b == nil || b.SecurityConfigurationID == nil { + return 0 + } + return *b.SecurityConfigurationID +} + // GetApp returns the App field. func (c *CheckRun) GetApp() *App { if c == nil { @@ -3438,6 +3446,22 @@ func (c *CodeSecurityConfiguration) GetSecretScanningDelegatedAlertDismissal() s return *c.SecretScanningDelegatedAlertDismissal } +// GetSecretScanningDelegatedBypass returns the SecretScanningDelegatedBypass field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetSecretScanningDelegatedBypass() string { + if c == nil || c.SecretScanningDelegatedBypass == nil { + return "" + } + return *c.SecretScanningDelegatedBypass +} + +// GetSecretScanningDelegatedBypassOptions returns the SecretScanningDelegatedBypassOptions field. +func (c *CodeSecurityConfiguration) GetSecretScanningDelegatedBypassOptions() *SecretScanningDelegatedBypassOptions { + if c == nil { + return nil + } + return c.SecretScanningDelegatedBypassOptions +} + // GetSecretScanningGenericSecrets returns the SecretScanningGenericSecrets field if it's non-nil, zero value otherwise. func (c *CodeSecurityConfiguration) GetSecretScanningGenericSecrets() string { if c == nil || c.SecretScanningGenericSecrets == nil { @@ -7102,14 +7126,6 @@ func (c *CustomPatternBackfillScan) GetPatternSlug() string { return *c.PatternSlug } -// GetDefaultValue returns the DefaultValue field if it's non-nil, zero value otherwise. -func (c *CustomProperty) GetDefaultValue() string { - if c == nil || c.DefaultValue == nil { - return "" - } - return *c.DefaultValue -} - // GetDescription returns the Description field if it's non-nil, zero value otherwise. func (c *CustomProperty) GetDescription() string { if c == nil || c.Description == nil { @@ -10198,6 +10214,14 @@ func (g *GenerateJITConfigRequest) GetWorkFolder() string { return *g.WorkFolder } +// GetConfigurationFilePath returns the ConfigurationFilePath field if it's non-nil, zero value otherwise. +func (g *GenerateNotesOptions) GetConfigurationFilePath() string { + if g == nil || g.ConfigurationFilePath == nil { + return "" + } + return *g.ConfigurationFilePath +} + // GetPreviousTagName returns the PreviousTagName field if it's non-nil, zero value otherwise. func (g *GenerateNotesOptions) GetPreviousTagName() string { if g == nil || g.PreviousTagName == nil { @@ -22598,6 +22622,14 @@ func (r *RateLimits) GetCore() *Rate { return r.Core } +// GetDependencySBOM returns the DependencySBOM field. +func (r *RateLimits) GetDependencySBOM() *Rate { + if r == nil { + return nil + } + return r.DependencySBOM +} + // GetDependencySnapshots returns the DependencySnapshots field. func (r *RateLimits) GetDependencySnapshots() *Rate { if r == nil { @@ -23902,10 +23934,10 @@ func (r *Repository) GetParent() *Repository { return r.Parent } -// GetPermissions returns the Permissions map if it's non-nil, an empty map otherwise. -func (r *Repository) GetPermissions() map[string]bool { - if r == nil || r.Permissions == nil { - return map[string]bool{} +// GetPermissions returns the Permissions field. +func (r *Repository) GetPermissions() *RepositoryPermissions { + if r == nil { + return nil } return r.Permissions } @@ -25022,6 +25054,46 @@ func (r *RepositoryPermissionLevel) GetUser() *User { return r.User } +// GetAdmin returns the Admin field if it's non-nil, zero value otherwise. +func (r *RepositoryPermissions) GetAdmin() bool { + if r == nil || r.Admin == nil { + return false + } + return *r.Admin +} + +// GetMaintain returns the Maintain field if it's non-nil, zero value otherwise. +func (r *RepositoryPermissions) GetMaintain() bool { + if r == nil || r.Maintain == nil { + return false + } + return *r.Maintain +} + +// GetPull returns the Pull field if it's non-nil, zero value otherwise. +func (r *RepositoryPermissions) GetPull() bool { + if r == nil || r.Pull == nil { + return false + } + return *r.Pull +} + +// GetPush returns the Push field if it's non-nil, zero value otherwise. +func (r *RepositoryPermissions) GetPush() bool { + if r == nil || r.Push == nil { + return false + } + return *r.Push +} + +// GetTriage returns the Triage field if it's non-nil, zero value otherwise. +func (r *RepositoryPermissions) GetTriage() bool { + if r == nil || r.Triage == nil { + return false + } + return *r.Triage +} + // GetAssetsURL returns the AssetsURL field if it's non-nil, zero value otherwise. func (r *RepositoryRelease) GetAssetsURL() string { if r == nil || r.AssetsURL == nil { diff --git a/vendor/github.com/google/go-github/v81/github/github.go b/vendor/github.com/google/go-github/v82/github/github.go similarity index 99% rename from vendor/github.com/google/go-github/v81/github/github.go rename to vendor/github.com/google/go-github/v82/github/github.go index d447c31ee3..a806e7b803 100644 --- a/vendor/github.com/google/go-github/v81/github/github.go +++ b/vendor/github.com/google/go-github/v82/github/github.go @@ -29,7 +29,7 @@ import ( ) const ( - Version = "v81.0.0" + Version = "v82.0.0" defaultAPIVersion = "2022-11-28" defaultBaseURL = "https://api.github.com/" @@ -336,6 +336,10 @@ func addOptions(s string, opts any) (string, error) { // authentication, either use Client.WithAuthToken or provide NewClient with // an http.Client that will perform the authentication for you (such as that // provided by the golang.org/x/oauth2 library). +// +// Note: When using a nil httpClient, the default client has no timeout set. +// This may not be suitable for production environments. It is recommended to +// provide a custom http.Client with an appropriate timeout. func NewClient(httpClient *http.Client) *Client { if httpClient == nil { httpClient = &http.Client{} @@ -1523,6 +1527,7 @@ const ( DependencySnapshotsCategory CodeSearchCategory AuditLogCategory + DependencySBOMCategory Categories // An array of this length will be able to contain all rate limit categories. ) @@ -1573,6 +1578,11 @@ func GetRateLimitCategory(method, path string) RateLimitCategory { // https://docs.github.com/en/enterprise-cloud@latest/rest/orgs/orgs?apiVersion=2022-11-28#get-the-audit-log-for-an-organization case strings.HasSuffix(path, "/audit-log"): return AuditLogCategory + + // https://docs.github.com/en/rest/dependency-graph/sboms?apiVersion=2022-11-28#export-a-software-bill-of-materials-sbom-for-a-repository + case strings.HasPrefix(path, "/repos/") && + strings.HasSuffix(path, "/dependency-graph/sbom"): + return DependencySBOMCategory } } diff --git a/vendor/github.com/google/go-github/v81/github/gitignore.go b/vendor/github.com/google/go-github/v82/github/gitignore.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/gitignore.go rename to vendor/github.com/google/go-github/v82/github/gitignore.go diff --git a/vendor/github.com/google/go-github/v81/github/interactions.go b/vendor/github.com/google/go-github/v82/github/interactions.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/interactions.go rename to vendor/github.com/google/go-github/v82/github/interactions.go diff --git a/vendor/github.com/google/go-github/v81/github/interactions_orgs.go b/vendor/github.com/google/go-github/v82/github/interactions_orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/interactions_orgs.go rename to vendor/github.com/google/go-github/v82/github/interactions_orgs.go diff --git a/vendor/github.com/google/go-github/v81/github/interactions_repos.go b/vendor/github.com/google/go-github/v82/github/interactions_repos.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/interactions_repos.go rename to vendor/github.com/google/go-github/v82/github/interactions_repos.go diff --git a/vendor/github.com/google/go-github/v81/github/issue_import.go b/vendor/github.com/google/go-github/v82/github/issue_import.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/issue_import.go rename to vendor/github.com/google/go-github/v82/github/issue_import.go diff --git a/vendor/github.com/google/go-github/v81/github/issues.go b/vendor/github.com/google/go-github/v82/github/issues.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/issues.go rename to vendor/github.com/google/go-github/v82/github/issues.go diff --git a/vendor/github.com/google/go-github/v81/github/issues_assignees.go b/vendor/github.com/google/go-github/v82/github/issues_assignees.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/issues_assignees.go rename to vendor/github.com/google/go-github/v82/github/issues_assignees.go diff --git a/vendor/github.com/google/go-github/v81/github/issues_comments.go b/vendor/github.com/google/go-github/v82/github/issues_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/issues_comments.go rename to vendor/github.com/google/go-github/v82/github/issues_comments.go diff --git a/vendor/github.com/google/go-github/v81/github/issues_events.go b/vendor/github.com/google/go-github/v82/github/issues_events.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/issues_events.go rename to vendor/github.com/google/go-github/v82/github/issues_events.go diff --git a/vendor/github.com/google/go-github/v81/github/issues_labels.go b/vendor/github.com/google/go-github/v82/github/issues_labels.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/issues_labels.go rename to vendor/github.com/google/go-github/v82/github/issues_labels.go diff --git a/vendor/github.com/google/go-github/v81/github/issues_milestones.go b/vendor/github.com/google/go-github/v82/github/issues_milestones.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/issues_milestones.go rename to vendor/github.com/google/go-github/v82/github/issues_milestones.go diff --git a/vendor/github.com/google/go-github/v81/github/issues_timeline.go b/vendor/github.com/google/go-github/v82/github/issues_timeline.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/issues_timeline.go rename to vendor/github.com/google/go-github/v82/github/issues_timeline.go diff --git a/vendor/github.com/google/go-github/v81/github/licenses.go b/vendor/github.com/google/go-github/v82/github/licenses.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/licenses.go rename to vendor/github.com/google/go-github/v82/github/licenses.go diff --git a/vendor/github.com/google/go-github/v81/github/markdown.go b/vendor/github.com/google/go-github/v82/github/markdown.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/markdown.go rename to vendor/github.com/google/go-github/v82/github/markdown.go diff --git a/vendor/github.com/google/go-github/v81/github/messages.go b/vendor/github.com/google/go-github/v82/github/messages.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/messages.go rename to vendor/github.com/google/go-github/v82/github/messages.go diff --git a/vendor/github.com/google/go-github/v81/github/meta.go b/vendor/github.com/google/go-github/v82/github/meta.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/meta.go rename to vendor/github.com/google/go-github/v82/github/meta.go diff --git a/vendor/github.com/google/go-github/v81/github/migrations.go b/vendor/github.com/google/go-github/v82/github/migrations.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/migrations.go rename to vendor/github.com/google/go-github/v82/github/migrations.go diff --git a/vendor/github.com/google/go-github/v81/github/migrations_source_import.go b/vendor/github.com/google/go-github/v82/github/migrations_source_import.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/migrations_source_import.go rename to vendor/github.com/google/go-github/v82/github/migrations_source_import.go diff --git a/vendor/github.com/google/go-github/v81/github/migrations_user.go b/vendor/github.com/google/go-github/v82/github/migrations_user.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/migrations_user.go rename to vendor/github.com/google/go-github/v82/github/migrations_user.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs.go b/vendor/github.com/google/go-github/v82/github/orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs.go rename to vendor/github.com/google/go-github/v82/github/orgs.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_actions_allowed.go b/vendor/github.com/google/go-github/v82/github/orgs_actions_allowed.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_actions_allowed.go rename to vendor/github.com/google/go-github/v82/github/orgs_actions_allowed.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_actions_permissions.go b/vendor/github.com/google/go-github/v82/github/orgs_actions_permissions.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_actions_permissions.go rename to vendor/github.com/google/go-github/v82/github/orgs_actions_permissions.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_attestations.go b/vendor/github.com/google/go-github/v82/github/orgs_attestations.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_attestations.go rename to vendor/github.com/google/go-github/v82/github/orgs_attestations.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_audit_log.go b/vendor/github.com/google/go-github/v82/github/orgs_audit_log.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_audit_log.go rename to vendor/github.com/google/go-github/v82/github/orgs_audit_log.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_codesecurity_configurations.go b/vendor/github.com/google/go-github/v82/github/orgs_codesecurity_configurations.go similarity index 95% rename from vendor/github.com/google/go-github/v81/github/orgs_codesecurity_configurations.go rename to vendor/github.com/google/go-github/v82/github/orgs_codesecurity_configurations.go index 788f52ed1b..d1ed6e2579 100644 --- a/vendor/github.com/google/go-github/v81/github/orgs_codesecurity_configurations.go +++ b/vendor/github.com/google/go-github/v82/github/orgs_codesecurity_configurations.go @@ -33,6 +33,19 @@ type RepositoryAttachment struct { Repository *Repository `json:"repository"` } +// SecretScanningDelegatedBypassOptions represents the feature options for the secret scanning delegated bypass. +type SecretScanningDelegatedBypassOptions struct { + Reviewers []*BypassReviewer `json:"reviewers,omitzero"` +} + +// BypassReviewer represents the bypass reviewers for the delegated bypass of a code security configuration. +// SecurityConfigurationID is added by GitHub in responses. +type BypassReviewer struct { + ReviewerID int64 `json:"reviewer_id"` + ReviewerType string `json:"reviewer_type"` + SecurityConfigurationID *int64 `json:"security_configuration_id,omitempty"` +} + // CodeSecurityConfiguration represents a code security configuration. type CodeSecurityConfiguration struct { ID *int64 `json:"id,omitempty"` @@ -52,6 +65,8 @@ type CodeSecurityConfiguration struct { CodeSecurity *string `json:"code_security,omitempty"` SecretScanning *string `json:"secret_scanning,omitempty"` SecretScanningPushProtection *string `json:"secret_scanning_push_protection,omitempty"` + SecretScanningDelegatedBypass *string `json:"secret_scanning_delegated_bypass,omitempty"` + SecretScanningDelegatedBypassOptions *SecretScanningDelegatedBypassOptions `json:"secret_scanning_delegated_bypass_options,omitempty"` SecretScanningValidityChecks *string `json:"secret_scanning_validity_checks,omitempty"` SecretScanningNonProviderPatterns *string `json:"secret_scanning_non_provider_patterns,omitempty"` SecretScanningGenericSecrets *string `json:"secret_scanning_generic_secrets,omitempty"` diff --git a/vendor/github.com/google/go-github/v81/github/orgs_credential_authorizations.go b/vendor/github.com/google/go-github/v82/github/orgs_credential_authorizations.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_credential_authorizations.go rename to vendor/github.com/google/go-github/v82/github/orgs_credential_authorizations.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_custom_repository_roles.go b/vendor/github.com/google/go-github/v82/github/orgs_custom_repository_roles.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_custom_repository_roles.go rename to vendor/github.com/google/go-github/v82/github/orgs_custom_repository_roles.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_hooks.go b/vendor/github.com/google/go-github/v82/github/orgs_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_hooks.go rename to vendor/github.com/google/go-github/v82/github/orgs_hooks.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_hooks_configuration.go b/vendor/github.com/google/go-github/v82/github/orgs_hooks_configuration.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_hooks_configuration.go rename to vendor/github.com/google/go-github/v82/github/orgs_hooks_configuration.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_hooks_deliveries.go b/vendor/github.com/google/go-github/v82/github/orgs_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_hooks_deliveries.go rename to vendor/github.com/google/go-github/v82/github/orgs_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_immutable_releases.go b/vendor/github.com/google/go-github/v82/github/orgs_immutable_releases.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_immutable_releases.go rename to vendor/github.com/google/go-github/v82/github/orgs_immutable_releases.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_issue_types.go b/vendor/github.com/google/go-github/v82/github/orgs_issue_types.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_issue_types.go rename to vendor/github.com/google/go-github/v82/github/orgs_issue_types.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_members.go b/vendor/github.com/google/go-github/v82/github/orgs_members.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_members.go rename to vendor/github.com/google/go-github/v82/github/orgs_members.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_network_configurations.go b/vendor/github.com/google/go-github/v82/github/orgs_network_configurations.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_network_configurations.go rename to vendor/github.com/google/go-github/v82/github/orgs_network_configurations.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_organization_properties.go b/vendor/github.com/google/go-github/v82/github/orgs_organization_properties.go similarity index 85% rename from vendor/github.com/google/go-github/v81/github/orgs_organization_properties.go rename to vendor/github.com/google/go-github/v82/github/orgs_organization_properties.go index ef997ec799..4e4c33c775 100644 --- a/vendor/github.com/google/go-github/v81/github/orgs_organization_properties.go +++ b/vendor/github.com/google/go-github/v82/github/orgs_organization_properties.go @@ -18,7 +18,7 @@ type OrganizationCustomPropertyValues struct { // GetOrganizationCustomPropertyValues returns all custom property names and their values for an organization. // -// GitHub API docs: https://docs.github.com/rest/orgs/custom-properties-for-orgs#get-all-custom-property-values-for-an-organization +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/orgs/custom-properties-for-orgs#get-all-custom-property-values-for-an-organization // //meta:operation GET /organizations/{org}/org-properties/values func (s *OrganizationsService) GetOrganizationCustomPropertyValues(ctx context.Context, org string) ([]*CustomPropertyValue, *Response, error) { @@ -41,7 +41,7 @@ func (s *OrganizationsService) GetOrganizationCustomPropertyValues(ctx context.C // CreateOrUpdateOrganizationCustomPropertyValues creates or updates custom property values for an organization. // To remove a custom property value from an organization, set the property value to null. // -// GitHub API docs: https://docs.github.com/rest/orgs/custom-properties-for-orgs#create-or-update-custom-property-values-for-an-organization +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/orgs/custom-properties-for-orgs#create-or-update-custom-property-values-for-an-organization // //meta:operation PATCH /organizations/{org}/org-properties/values func (s *OrganizationsService) CreateOrUpdateOrganizationCustomPropertyValues(ctx context.Context, org string, values OrganizationCustomPropertyValues) (*Response, error) { diff --git a/vendor/github.com/google/go-github/v81/github/orgs_organization_roles.go b/vendor/github.com/google/go-github/v82/github/orgs_organization_roles.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_organization_roles.go rename to vendor/github.com/google/go-github/v82/github/orgs_organization_roles.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_outside_collaborators.go b/vendor/github.com/google/go-github/v82/github/orgs_outside_collaborators.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_outside_collaborators.go rename to vendor/github.com/google/go-github/v82/github/orgs_outside_collaborators.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_packages.go b/vendor/github.com/google/go-github/v82/github/orgs_packages.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_packages.go rename to vendor/github.com/google/go-github/v82/github/orgs_packages.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_personal_access_tokens.go b/vendor/github.com/google/go-github/v82/github/orgs_personal_access_tokens.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_personal_access_tokens.go rename to vendor/github.com/google/go-github/v82/github/orgs_personal_access_tokens.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_properties.go b/vendor/github.com/google/go-github/v82/github/orgs_properties.go similarity index 83% rename from vendor/github.com/google/go-github/v81/github/orgs_properties.go rename to vendor/github.com/google/go-github/v82/github/orgs_properties.go index 502713b8ba..8b9541bded 100644 --- a/vendor/github.com/google/go-github/v81/github/orgs_properties.go +++ b/vendor/github.com/google/go-github/v82/github/orgs_properties.go @@ -10,15 +10,19 @@ import ( "encoding/json" "errors" "fmt" + "strconv" ) +// PropertyValueType represents the type of a custom property value. +type PropertyValueType string + // Valid values for CustomProperty.ValueType. const ( - PropertyValueTypeString = "string" - PropertyValueTypeSingleSelect = "single_select" - PropertyValueTypeMultiSelect = "multi_select" - PropertyValueTypeTrueFalse = "true_false" - PropertyValueTypeURL = "url" + PropertyValueTypeString PropertyValueType = "string" + PropertyValueTypeSingleSelect PropertyValueType = "single_select" + PropertyValueTypeMultiSelect PropertyValueType = "multi_select" + PropertyValueTypeTrueFalse PropertyValueType = "true_false" + PropertyValueTypeURL PropertyValueType = "url" ) // CustomProperty represents an organization custom property object. @@ -31,11 +35,11 @@ type CustomProperty struct { // SourceType is the source type of the property where it has been created. Can be one of: organization, enterprise. SourceType *string `json:"source_type,omitempty"` // The type of the value for the property. Can be one of: string, single_select, multi_select, true_false, url. - ValueType string `json:"value_type"` + ValueType PropertyValueType `json:"value_type"` // Whether the property is required. Required *bool `json:"required,omitempty"` // Default value of the property. - DefaultValue *string `json:"default_value,omitempty"` + DefaultValue any `json:"default_value,omitempty"` // Short description of the property. Description *string `json:"description,omitempty"` // An ordered list of the allowed values of the property. The property can have up to 200 @@ -45,6 +49,56 @@ type CustomProperty struct { ValuesEditableBy *string `json:"values_editable_by,omitempty"` } +// DefaultValueString returns the DefaultValue as a string if the ValueType is string or single_select or url. +func (cp CustomProperty) DefaultValueString() (string, bool) { + switch cp.ValueType { + case PropertyValueTypeString, PropertyValueTypeSingleSelect, PropertyValueTypeURL: + s, ok := cp.DefaultValue.(string) + return s, ok + default: + return "", false + } +} + +// DefaultValueStrings returns the DefaultValue as a slice of string if the ValueType is multi_select. +func (cp CustomProperty) DefaultValueStrings() ([]string, bool) { + switch cp.ValueType { + case PropertyValueTypeMultiSelect: + switch v := cp.DefaultValue.(type) { + case []string: + return v, true + case []any: + vals := make([]string, len(v)) + for i, item := range v { + s, ok := item.(string) + if !ok { + return nil, false + } + vals[i] = s + } + return vals, true + default: + return nil, false + } + default: + return nil, false + } +} + +// DefaultValueBool returns the DefaultValue as a string if the ValueType is true_false. +func (cp CustomProperty) DefaultValueBool() (bool, bool) { + switch cp.ValueType { + case PropertyValueTypeTrueFalse: + if s, ok := cp.DefaultValue.(string); ok { + b, err := strconv.ParseBool(s) + return b, err == nil + } + return false, false + default: + return false, false + } +} + // RepoCustomPropertyValue represents a repository custom property value. type RepoCustomPropertyValue struct { RepositoryID int64 `json:"repository_id"` diff --git a/vendor/github.com/google/go-github/v81/github/orgs_rules.go b/vendor/github.com/google/go-github/v82/github/orgs_rules.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_rules.go rename to vendor/github.com/google/go-github/v82/github/orgs_rules.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_security_managers.go b/vendor/github.com/google/go-github/v82/github/orgs_security_managers.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_security_managers.go rename to vendor/github.com/google/go-github/v82/github/orgs_security_managers.go diff --git a/vendor/github.com/google/go-github/v81/github/orgs_users_blocking.go b/vendor/github.com/google/go-github/v82/github/orgs_users_blocking.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/orgs_users_blocking.go rename to vendor/github.com/google/go-github/v82/github/orgs_users_blocking.go diff --git a/vendor/github.com/google/go-github/v81/github/packages.go b/vendor/github.com/google/go-github/v82/github/packages.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/packages.go rename to vendor/github.com/google/go-github/v82/github/packages.go diff --git a/vendor/github.com/google/go-github/v81/github/private_registries.go b/vendor/github.com/google/go-github/v82/github/private_registries.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/private_registries.go rename to vendor/github.com/google/go-github/v82/github/private_registries.go diff --git a/vendor/github.com/google/go-github/v81/github/projects.go b/vendor/github.com/google/go-github/v82/github/projects.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/projects.go rename to vendor/github.com/google/go-github/v82/github/projects.go diff --git a/vendor/github.com/google/go-github/v81/github/pulls.go b/vendor/github.com/google/go-github/v82/github/pulls.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/pulls.go rename to vendor/github.com/google/go-github/v82/github/pulls.go diff --git a/vendor/github.com/google/go-github/v81/github/pulls_comments.go b/vendor/github.com/google/go-github/v82/github/pulls_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/pulls_comments.go rename to vendor/github.com/google/go-github/v82/github/pulls_comments.go diff --git a/vendor/github.com/google/go-github/v81/github/pulls_reviewers.go b/vendor/github.com/google/go-github/v82/github/pulls_reviewers.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/pulls_reviewers.go rename to vendor/github.com/google/go-github/v82/github/pulls_reviewers.go diff --git a/vendor/github.com/google/go-github/v81/github/pulls_reviews.go b/vendor/github.com/google/go-github/v82/github/pulls_reviews.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/pulls_reviews.go rename to vendor/github.com/google/go-github/v82/github/pulls_reviews.go diff --git a/vendor/github.com/google/go-github/v81/github/pulls_threads.go b/vendor/github.com/google/go-github/v82/github/pulls_threads.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/pulls_threads.go rename to vendor/github.com/google/go-github/v82/github/pulls_threads.go diff --git a/vendor/github.com/google/go-github/v81/github/rate_limit.go b/vendor/github.com/google/go-github/v82/github/rate_limit.go similarity index 96% rename from vendor/github.com/google/go-github/v81/github/rate_limit.go rename to vendor/github.com/google/go-github/v82/github/rate_limit.go index 6236eba8fb..a26a23c936 100644 --- a/vendor/github.com/google/go-github/v81/github/rate_limit.go +++ b/vendor/github.com/google/go-github/v82/github/rate_limit.go @@ -63,6 +63,7 @@ type RateLimits struct { DependencySnapshots *Rate `json:"dependency_snapshots"` CodeSearch *Rate `json:"code_search"` AuditLog *Rate `json:"audit_log"` + DependencySBOM *Rate `json:"dependency_sbom"` } func (r RateLimits) String() string { @@ -126,6 +127,9 @@ func (s *RateLimitService) Get(ctx context.Context) (*RateLimits, *Response, err if response.Resources.AuditLog != nil { s.client.rateLimits[AuditLogCategory] = *response.Resources.AuditLog } + if response.Resources.DependencySBOM != nil { + s.client.rateLimits[DependencySBOMCategory] = *response.Resources.DependencySBOM + } s.client.rateMu.Unlock() } diff --git a/vendor/github.com/google/go-github/v81/github/reactions.go b/vendor/github.com/google/go-github/v82/github/reactions.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/reactions.go rename to vendor/github.com/google/go-github/v82/github/reactions.go diff --git a/vendor/github.com/google/go-github/v81/github/repos.go b/vendor/github.com/google/go-github/v82/github/repos.go similarity index 93% rename from vendor/github.com/google/go-github/v81/github/repos.go rename to vendor/github.com/google/go-github/v82/github/repos.go index cc04df34a9..d2ded49943 100644 --- a/vendor/github.com/google/go-github/v81/github/repos.go +++ b/vendor/github.com/google/go-github/v82/github/repos.go @@ -27,59 +27,59 @@ type RepositoriesService service // Repository represents a GitHub repository. type Repository struct { - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - Owner *User `json:"owner,omitempty"` - Name *string `json:"name,omitempty"` - FullName *string `json:"full_name,omitempty"` - Description *string `json:"description,omitempty"` - Homepage *string `json:"homepage,omitempty"` - CodeOfConduct *CodeOfConduct `json:"code_of_conduct,omitempty"` - DefaultBranch *string `json:"default_branch,omitempty"` - MasterBranch *string `json:"master_branch,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - PushedAt *Timestamp `json:"pushed_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - CloneURL *string `json:"clone_url,omitempty"` - GitURL *string `json:"git_url,omitempty"` - MirrorURL *string `json:"mirror_url,omitempty"` - SSHURL *string `json:"ssh_url,omitempty"` - SVNURL *string `json:"svn_url,omitempty"` - Language *string `json:"language,omitempty"` - Fork *bool `json:"fork,omitempty"` - ForksCount *int `json:"forks_count,omitempty"` - NetworkCount *int `json:"network_count,omitempty"` - OpenIssuesCount *int `json:"open_issues_count,omitempty"` - OpenIssues *int `json:"open_issues,omitempty"` // Deprecated: Replaced by OpenIssuesCount. For backward compatibility OpenIssues is still populated. - StargazersCount *int `json:"stargazers_count,omitempty"` - SubscribersCount *int `json:"subscribers_count,omitempty"` - WatchersCount *int `json:"watchers_count,omitempty"` // Deprecated: Replaced by StargazersCount. For backward compatibility WatchersCount is still populated. - Watchers *int `json:"watchers,omitempty"` // Deprecated: Replaced by StargazersCount. For backward compatibility Watchers is still populated. - Size *int `json:"size,omitempty"` - AutoInit *bool `json:"auto_init,omitempty"` - Parent *Repository `json:"parent,omitempty"` - Source *Repository `json:"source,omitempty"` - TemplateRepository *Repository `json:"template_repository,omitempty"` - Organization *Organization `json:"organization,omitempty"` - Permissions map[string]bool `json:"permissions,omitempty"` - AllowRebaseMerge *bool `json:"allow_rebase_merge,omitempty"` - AllowUpdateBranch *bool `json:"allow_update_branch,omitempty"` - 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"` - WebCommitSignoffRequired *bool `json:"web_commit_signoff_required,omitempty"` - DeleteBranchOnMerge *bool `json:"delete_branch_on_merge,omitempty"` - UseSquashPRTitleAsDefault *bool `json:"use_squash_pr_title_as_default,omitempty"` - SquashMergeCommitTitle *string `json:"squash_merge_commit_title,omitempty"` // Can be one of: "PR_TITLE", "COMMIT_OR_PR_TITLE" - SquashMergeCommitMessage *string `json:"squash_merge_commit_message,omitempty"` // Can be one of: "PR_BODY", "COMMIT_MESSAGES", "BLANK" - MergeCommitTitle *string `json:"merge_commit_title,omitempty"` // Can be one of: "PR_TITLE", "MERGE_MESSAGE" - MergeCommitMessage *string `json:"merge_commit_message,omitempty"` // Can be one of: "PR_BODY", "PR_TITLE", "BLANK" - Topics []string `json:"topics,omitempty"` - CustomProperties map[string]any `json:"custom_properties,omitempty"` - Archived *bool `json:"archived,omitempty"` - Disabled *bool `json:"disabled,omitempty"` + ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` + Owner *User `json:"owner,omitempty"` + Name *string `json:"name,omitempty"` + FullName *string `json:"full_name,omitempty"` + Description *string `json:"description,omitempty"` + Homepage *string `json:"homepage,omitempty"` + CodeOfConduct *CodeOfConduct `json:"code_of_conduct,omitempty"` + DefaultBranch *string `json:"default_branch,omitempty"` + MasterBranch *string `json:"master_branch,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + PushedAt *Timestamp `json:"pushed_at,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + CloneURL *string `json:"clone_url,omitempty"` + GitURL *string `json:"git_url,omitempty"` + MirrorURL *string `json:"mirror_url,omitempty"` + SSHURL *string `json:"ssh_url,omitempty"` + SVNURL *string `json:"svn_url,omitempty"` + Language *string `json:"language,omitempty"` + Fork *bool `json:"fork,omitempty"` + ForksCount *int `json:"forks_count,omitempty"` + NetworkCount *int `json:"network_count,omitempty"` + OpenIssuesCount *int `json:"open_issues_count,omitempty"` + OpenIssues *int `json:"open_issues,omitempty"` // Deprecated: Replaced by OpenIssuesCount. For backward compatibility OpenIssues is still populated. + StargazersCount *int `json:"stargazers_count,omitempty"` + SubscribersCount *int `json:"subscribers_count,omitempty"` + WatchersCount *int `json:"watchers_count,omitempty"` // Deprecated: Replaced by StargazersCount. For backward compatibility WatchersCount is still populated. + Watchers *int `json:"watchers,omitempty"` // Deprecated: Replaced by StargazersCount. For backward compatibility Watchers is still populated. + Size *int `json:"size,omitempty"` + AutoInit *bool `json:"auto_init,omitempty"` + Parent *Repository `json:"parent,omitempty"` + Source *Repository `json:"source,omitempty"` + TemplateRepository *Repository `json:"template_repository,omitempty"` + Organization *Organization `json:"organization,omitempty"` + Permissions *RepositoryPermissions `json:"permissions,omitempty"` + AllowRebaseMerge *bool `json:"allow_rebase_merge,omitempty"` + AllowUpdateBranch *bool `json:"allow_update_branch,omitempty"` + 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"` + WebCommitSignoffRequired *bool `json:"web_commit_signoff_required,omitempty"` + DeleteBranchOnMerge *bool `json:"delete_branch_on_merge,omitempty"` + UseSquashPRTitleAsDefault *bool `json:"use_squash_pr_title_as_default,omitempty"` + SquashMergeCommitTitle *string `json:"squash_merge_commit_title,omitempty"` // Can be one of: "PR_TITLE", "COMMIT_OR_PR_TITLE" + SquashMergeCommitMessage *string `json:"squash_merge_commit_message,omitempty"` // Can be one of: "PR_BODY", "COMMIT_MESSAGES", "BLANK" + MergeCommitTitle *string `json:"merge_commit_title,omitempty"` // Can be one of: "PR_TITLE", "MERGE_MESSAGE" + MergeCommitMessage *string `json:"merge_commit_message,omitempty"` // Can be one of: "PR_BODY", "PR_TITLE", "BLANK" + Topics []string `json:"topics,omitempty"` + CustomProperties map[string]any `json:"custom_properties,omitempty"` + Archived *bool `json:"archived,omitempty"` + Disabled *bool `json:"disabled,omitempty"` // Only provided when using RepositoriesService.Get while in preview License *License `json:"license,omitempty"` @@ -202,6 +202,15 @@ type SecurityAndAnalysis struct { SecretScanningValidityChecks *SecretScanningValidityChecks `json:"secret_scanning_validity_checks,omitempty"` } +// RepositoryPermissions represents the permissions a user has for a repository. +type RepositoryPermissions struct { + Admin *bool `json:"admin,omitempty"` + Maintain *bool `json:"maintain,omitempty"` + Push *bool `json:"push,omitempty"` + Triage *bool `json:"triage,omitempty"` + Pull *bool `json:"pull,omitempty"` +} + func (s SecurityAndAnalysis) String() string { return Stringify(s) } @@ -501,21 +510,22 @@ type createRepoRequest struct { // Creating an organization repository. Required for non-owners. TeamID *int64 `json:"team_id,omitempty"` - AutoInit *bool `json:"auto_init,omitempty"` - GitignoreTemplate *string `json:"gitignore_template,omitempty"` - LicenseTemplate *string `json:"license_template,omitempty"` - AllowSquashMerge *bool `json:"allow_squash_merge,omitempty"` - AllowMergeCommit *bool `json:"allow_merge_commit,omitempty"` - AllowRebaseMerge *bool `json:"allow_rebase_merge,omitempty"` - AllowUpdateBranch *bool `json:"allow_update_branch,omitempty"` - AllowAutoMerge *bool `json:"allow_auto_merge,omitempty"` - AllowForking *bool `json:"allow_forking,omitempty"` - DeleteBranchOnMerge *bool `json:"delete_branch_on_merge,omitempty"` - UseSquashPRTitleAsDefault *bool `json:"use_squash_pr_title_as_default,omitempty"` - SquashMergeCommitTitle *string `json:"squash_merge_commit_title,omitempty"` - SquashMergeCommitMessage *string `json:"squash_merge_commit_message,omitempty"` - MergeCommitTitle *string `json:"merge_commit_title,omitempty"` - MergeCommitMessage *string `json:"merge_commit_message,omitempty"` + AutoInit *bool `json:"auto_init,omitempty"` + GitignoreTemplate *string `json:"gitignore_template,omitempty"` + LicenseTemplate *string `json:"license_template,omitempty"` + AllowSquashMerge *bool `json:"allow_squash_merge,omitempty"` + AllowMergeCommit *bool `json:"allow_merge_commit,omitempty"` + AllowRebaseMerge *bool `json:"allow_rebase_merge,omitempty"` + AllowUpdateBranch *bool `json:"allow_update_branch,omitempty"` + AllowAutoMerge *bool `json:"allow_auto_merge,omitempty"` + AllowForking *bool `json:"allow_forking,omitempty"` + DeleteBranchOnMerge *bool `json:"delete_branch_on_merge,omitempty"` + UseSquashPRTitleAsDefault *bool `json:"use_squash_pr_title_as_default,omitempty"` + SquashMergeCommitTitle *string `json:"squash_merge_commit_title,omitempty"` + SquashMergeCommitMessage *string `json:"squash_merge_commit_message,omitempty"` + MergeCommitTitle *string `json:"merge_commit_title,omitempty"` + MergeCommitMessage *string `json:"merge_commit_message,omitempty"` + CustomProperties map[string]any `json:"custom_properties,omitempty"` } // Create a new repository. If an organization is specified, the new @@ -575,6 +585,7 @@ func (s *RepositoriesService) Create(ctx context.Context, org string, repo *Repo SquashMergeCommitMessage: repo.SquashMergeCommitMessage, MergeCommitTitle: repo.MergeCommitTitle, MergeCommitMessage: repo.MergeCommitMessage, + CustomProperties: repo.CustomProperties, } req, err := s.client.NewRequest("POST", u, repoReq) diff --git a/vendor/github.com/google/go-github/v81/github/repos_actions_access.go b/vendor/github.com/google/go-github/v82/github/repos_actions_access.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_actions_access.go rename to vendor/github.com/google/go-github/v82/github/repos_actions_access.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_actions_allowed.go b/vendor/github.com/google/go-github/v82/github/repos_actions_allowed.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_actions_allowed.go rename to vendor/github.com/google/go-github/v82/github/repos_actions_allowed.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_actions_permissions.go b/vendor/github.com/google/go-github/v82/github/repos_actions_permissions.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_actions_permissions.go rename to vendor/github.com/google/go-github/v82/github/repos_actions_permissions.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_attestations.go b/vendor/github.com/google/go-github/v82/github/repos_attestations.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_attestations.go rename to vendor/github.com/google/go-github/v82/github/repos_attestations.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_autolinks.go b/vendor/github.com/google/go-github/v82/github/repos_autolinks.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_autolinks.go rename to vendor/github.com/google/go-github/v82/github/repos_autolinks.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_codeowners.go b/vendor/github.com/google/go-github/v82/github/repos_codeowners.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_codeowners.go rename to vendor/github.com/google/go-github/v82/github/repos_codeowners.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_collaborators.go b/vendor/github.com/google/go-github/v82/github/repos_collaborators.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_collaborators.go rename to vendor/github.com/google/go-github/v82/github/repos_collaborators.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_comments.go b/vendor/github.com/google/go-github/v82/github/repos_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_comments.go rename to vendor/github.com/google/go-github/v82/github/repos_comments.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_commits.go b/vendor/github.com/google/go-github/v82/github/repos_commits.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_commits.go rename to vendor/github.com/google/go-github/v82/github/repos_commits.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_community_health.go b/vendor/github.com/google/go-github/v82/github/repos_community_health.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_community_health.go rename to vendor/github.com/google/go-github/v82/github/repos_community_health.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_contents.go b/vendor/github.com/google/go-github/v82/github/repos_contents.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_contents.go rename to vendor/github.com/google/go-github/v82/github/repos_contents.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_deployment_branch_policies.go b/vendor/github.com/google/go-github/v82/github/repos_deployment_branch_policies.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_deployment_branch_policies.go rename to vendor/github.com/google/go-github/v82/github/repos_deployment_branch_policies.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_deployment_protection_rules.go b/vendor/github.com/google/go-github/v82/github/repos_deployment_protection_rules.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_deployment_protection_rules.go rename to vendor/github.com/google/go-github/v82/github/repos_deployment_protection_rules.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_deployments.go b/vendor/github.com/google/go-github/v82/github/repos_deployments.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_deployments.go rename to vendor/github.com/google/go-github/v82/github/repos_deployments.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_environments.go b/vendor/github.com/google/go-github/v82/github/repos_environments.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_environments.go rename to vendor/github.com/google/go-github/v82/github/repos_environments.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_forks.go b/vendor/github.com/google/go-github/v82/github/repos_forks.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_forks.go rename to vendor/github.com/google/go-github/v82/github/repos_forks.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_hooks.go b/vendor/github.com/google/go-github/v82/github/repos_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_hooks.go rename to vendor/github.com/google/go-github/v82/github/repos_hooks.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_hooks_configuration.go b/vendor/github.com/google/go-github/v82/github/repos_hooks_configuration.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_hooks_configuration.go rename to vendor/github.com/google/go-github/v82/github/repos_hooks_configuration.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_hooks_deliveries.go b/vendor/github.com/google/go-github/v82/github/repos_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_hooks_deliveries.go rename to vendor/github.com/google/go-github/v82/github/repos_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_invitations.go b/vendor/github.com/google/go-github/v82/github/repos_invitations.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_invitations.go rename to vendor/github.com/google/go-github/v82/github/repos_invitations.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_keys.go b/vendor/github.com/google/go-github/v82/github/repos_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_keys.go rename to vendor/github.com/google/go-github/v82/github/repos_keys.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_lfs.go b/vendor/github.com/google/go-github/v82/github/repos_lfs.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_lfs.go rename to vendor/github.com/google/go-github/v82/github/repos_lfs.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_merging.go b/vendor/github.com/google/go-github/v82/github/repos_merging.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_merging.go rename to vendor/github.com/google/go-github/v82/github/repos_merging.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_pages.go b/vendor/github.com/google/go-github/v82/github/repos_pages.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_pages.go rename to vendor/github.com/google/go-github/v82/github/repos_pages.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_prereceive_hooks.go b/vendor/github.com/google/go-github/v82/github/repos_prereceive_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_prereceive_hooks.go rename to vendor/github.com/google/go-github/v82/github/repos_prereceive_hooks.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_properties.go b/vendor/github.com/google/go-github/v82/github/repos_properties.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_properties.go rename to vendor/github.com/google/go-github/v82/github/repos_properties.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_releases.go b/vendor/github.com/google/go-github/v82/github/repos_releases.go similarity index 98% rename from vendor/github.com/google/go-github/v81/github/repos_releases.go rename to vendor/github.com/google/go-github/v82/github/repos_releases.go index b4668842b9..ba35d80412 100644 --- a/vendor/github.com/google/go-github/v81/github/repos_releases.go +++ b/vendor/github.com/google/go-github/v82/github/repos_releases.go @@ -60,9 +60,10 @@ type RepositoryReleaseNotes struct { // GenerateNotesOptions represents the options to generate release notes. type GenerateNotesOptions struct { - TagName string `json:"tag_name"` - PreviousTagName *string `json:"previous_tag_name,omitempty"` - TargetCommitish *string `json:"target_commitish,omitempty"` + TagName string `json:"tag_name"` + PreviousTagName *string `json:"previous_tag_name,omitempty"` + TargetCommitish *string `json:"target_commitish,omitempty"` + ConfigurationFilePath *string `json:"configuration_file_path,omitempty"` } // ReleaseAsset represents a GitHub release asset in a repository. diff --git a/vendor/github.com/google/go-github/v81/github/repos_rules.go b/vendor/github.com/google/go-github/v82/github/repos_rules.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_rules.go rename to vendor/github.com/google/go-github/v82/github/repos_rules.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_stats.go b/vendor/github.com/google/go-github/v82/github/repos_stats.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_stats.go rename to vendor/github.com/google/go-github/v82/github/repos_stats.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_statuses.go b/vendor/github.com/google/go-github/v82/github/repos_statuses.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_statuses.go rename to vendor/github.com/google/go-github/v82/github/repos_statuses.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_tags.go b/vendor/github.com/google/go-github/v82/github/repos_tags.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_tags.go rename to vendor/github.com/google/go-github/v82/github/repos_tags.go diff --git a/vendor/github.com/google/go-github/v81/github/repos_traffic.go b/vendor/github.com/google/go-github/v82/github/repos_traffic.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/repos_traffic.go rename to vendor/github.com/google/go-github/v82/github/repos_traffic.go diff --git a/vendor/github.com/google/go-github/v81/github/rules.go b/vendor/github.com/google/go-github/v82/github/rules.go similarity index 99% rename from vendor/github.com/google/go-github/v81/github/rules.go rename to vendor/github.com/google/go-github/v82/github/rules.go index 99b4c3aa2a..009a5033f9 100644 --- a/vendor/github.com/google/go-github/v81/github/rules.go +++ b/vendor/github.com/google/go-github/v82/github/rules.go @@ -464,7 +464,7 @@ type RequiredDeploymentsRuleParameters struct { // PullRequestRuleParameters represents the pull_request rule parameters. type PullRequestRuleParameters struct { - AllowedMergeMethods []PullRequestMergeMethod `json:"allowed_merge_methods"` + AllowedMergeMethods []PullRequestMergeMethod `json:"allowed_merge_methods,omitempty"` DismissStaleReviewsOnPush bool `json:"dismiss_stale_reviews_on_push"` RequireCodeOwnerReview bool `json:"require_code_owner_review"` RequireLastPushApproval bool `json:"require_last_push_approval"` diff --git a/vendor/github.com/google/go-github/v81/github/scim.go b/vendor/github.com/google/go-github/v82/github/scim.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/scim.go rename to vendor/github.com/google/go-github/v82/github/scim.go diff --git a/vendor/github.com/google/go-github/v81/github/search.go b/vendor/github.com/google/go-github/v82/github/search.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/search.go rename to vendor/github.com/google/go-github/v82/github/search.go diff --git a/vendor/github.com/google/go-github/v81/github/secret_scanning.go b/vendor/github.com/google/go-github/v82/github/secret_scanning.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/secret_scanning.go rename to vendor/github.com/google/go-github/v82/github/secret_scanning.go diff --git a/vendor/github.com/google/go-github/v81/github/secret_scanning_pattern_configs.go b/vendor/github.com/google/go-github/v82/github/secret_scanning_pattern_configs.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/secret_scanning_pattern_configs.go rename to vendor/github.com/google/go-github/v82/github/secret_scanning_pattern_configs.go diff --git a/vendor/github.com/google/go-github/v81/github/security_advisories.go b/vendor/github.com/google/go-github/v82/github/security_advisories.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/security_advisories.go rename to vendor/github.com/google/go-github/v82/github/security_advisories.go diff --git a/vendor/github.com/google/go-github/v81/github/strings.go b/vendor/github.com/google/go-github/v82/github/strings.go similarity index 67% rename from vendor/github.com/google/go-github/v81/github/strings.go rename to vendor/github.com/google/go-github/v82/github/strings.go index 0158c9a1fd..dfbe3c685f 100644 --- a/vendor/github.com/google/go-github/v81/github/strings.go +++ b/vendor/github.com/google/go-github/v82/github/strings.go @@ -9,17 +9,30 @@ import ( "bytes" "fmt" "reflect" + "strconv" + "sync" ) var timestampType = reflect.TypeFor[Timestamp]() +var bufferPool = sync.Pool{ + New: func() any { + return new(bytes.Buffer) + }, +} + // Stringify attempts to create a reasonable string representation of types in // the GitHub library. It does things like resolve pointers to their values // and omits struct fields with nil values. func Stringify(message any) string { - var buf bytes.Buffer + buf := bufferPool.Get().(*bytes.Buffer) + defer func() { + buf.Reset() + bufferPool.Put(buf) + }() + v := reflect.ValueOf(message) - stringifyValue(&buf, v) + stringifyValue(buf, v) return buf.String() } @@ -34,8 +47,20 @@ func stringifyValue(w *bytes.Buffer, val reflect.Value) { v := reflect.Indirect(val) switch v.Kind() { + case reflect.Bool: + w.Write(strconv.AppendBool(w.Bytes(), v.Bool())[w.Len():]) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + w.Write(strconv.AppendInt(w.Bytes(), v.Int(), 10)[w.Len():]) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + w.Write(strconv.AppendUint(w.Bytes(), v.Uint(), 10)[w.Len():]) + case reflect.Float32: + w.Write(strconv.AppendFloat(w.Bytes(), v.Float(), 'g', -1, 32)[w.Len():]) + case reflect.Float64: + w.Write(strconv.AppendFloat(w.Bytes(), v.Float(), 'g', -1, 64)[w.Len():]) case reflect.String: - fmt.Fprintf(w, `"%v"`, v) + w.WriteByte('"') + w.WriteString(v.String()) + w.WriteByte('"') case reflect.Slice: w.WriteByte('[') for i := range v.Len() { diff --git a/vendor/github.com/google/go-github/v81/github/sub_issue.go b/vendor/github.com/google/go-github/v82/github/sub_issue.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/sub_issue.go rename to vendor/github.com/google/go-github/v82/github/sub_issue.go diff --git a/vendor/github.com/google/go-github/v81/github/teams.go b/vendor/github.com/google/go-github/v82/github/teams.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/teams.go rename to vendor/github.com/google/go-github/v82/github/teams.go diff --git a/vendor/github.com/google/go-github/v81/github/teams_discussion_comments.go b/vendor/github.com/google/go-github/v82/github/teams_discussion_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/teams_discussion_comments.go rename to vendor/github.com/google/go-github/v82/github/teams_discussion_comments.go diff --git a/vendor/github.com/google/go-github/v81/github/teams_discussions.go b/vendor/github.com/google/go-github/v82/github/teams_discussions.go similarity index 89% rename from vendor/github.com/google/go-github/v81/github/teams_discussions.go rename to vendor/github.com/google/go-github/v82/github/teams_discussions.go index b056525f4e..a06adecf5b 100644 --- a/vendor/github.com/google/go-github/v81/github/teams_discussions.go +++ b/vendor/github.com/google/go-github/v82/github/teams_discussions.go @@ -49,7 +49,7 @@ type DiscussionListOptions struct { // ListDiscussionsByID lists all discussions on team's page given Organization and Team ID. // Authenticated user must grant read:discussion scope. // -// GitHub API docs: https://docs.github.com/rest/teams/discussions#list-discussions +// GitHub API docs: https://docs.github.com/enterprise-server@3.13/rest/teams/discussions#list-discussions // //meta:operation GET /orgs/{org}/teams/{team_slug}/discussions func (s *TeamsService) ListDiscussionsByID(ctx context.Context, orgID, teamID int64, opts *DiscussionListOptions) ([]*TeamDiscussion, *Response, error) { @@ -76,7 +76,7 @@ func (s *TeamsService) ListDiscussionsByID(ctx context.Context, orgID, teamID in // ListDiscussionsBySlug lists all discussions on team's page given Organization name and Team's slug. // Authenticated user must grant read:discussion scope. // -// GitHub API docs: https://docs.github.com/rest/teams/discussions#list-discussions +// GitHub API docs: https://docs.github.com/enterprise-server@3.13/rest/teams/discussions#list-discussions // //meta:operation GET /orgs/{org}/teams/{team_slug}/discussions func (s *TeamsService) ListDiscussionsBySlug(ctx context.Context, org, slug string, opts *DiscussionListOptions) ([]*TeamDiscussion, *Response, error) { @@ -103,7 +103,7 @@ func (s *TeamsService) ListDiscussionsBySlug(ctx context.Context, org, slug stri // GetDiscussionByID gets a specific discussion on a team's page given Organization and Team ID. // Authenticated user must grant read:discussion scope. // -// GitHub API docs: https://docs.github.com/rest/teams/discussions#get-a-discussion +// GitHub API docs: https://docs.github.com/enterprise-server@3.13/rest/teams/discussions#get-a-discussion // //meta:operation GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number} func (s *TeamsService) GetDiscussionByID(ctx context.Context, orgID, teamID int64, discussionNumber int) (*TeamDiscussion, *Response, error) { @@ -125,7 +125,7 @@ func (s *TeamsService) GetDiscussionByID(ctx context.Context, orgID, teamID int6 // GetDiscussionBySlug gets a specific discussion on a team's page given Organization name and Team's slug. // Authenticated user must grant read:discussion scope. // -// GitHub API docs: https://docs.github.com/rest/teams/discussions#get-a-discussion +// GitHub API docs: https://docs.github.com/enterprise-server@3.13/rest/teams/discussions#get-a-discussion // //meta:operation GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number} func (s *TeamsService) GetDiscussionBySlug(ctx context.Context, org, slug string, discussionNumber int) (*TeamDiscussion, *Response, error) { @@ -147,7 +147,7 @@ func (s *TeamsService) GetDiscussionBySlug(ctx context.Context, org, slug string // CreateDiscussionByID creates a new discussion post on a team's page given Organization and Team ID. // Authenticated user must grant write:discussion scope. // -// GitHub API docs: https://docs.github.com/rest/teams/discussions#create-a-discussion +// GitHub API docs: https://docs.github.com/enterprise-server@3.13/rest/teams/discussions#create-a-discussion // //meta:operation POST /orgs/{org}/teams/{team_slug}/discussions func (s *TeamsService) CreateDiscussionByID(ctx context.Context, orgID, teamID int64, discussion TeamDiscussion) (*TeamDiscussion, *Response, error) { @@ -169,7 +169,7 @@ func (s *TeamsService) CreateDiscussionByID(ctx context.Context, orgID, teamID i // CreateDiscussionBySlug creates a new discussion post on a team's page given Organization name and Team's slug. // Authenticated user must grant write:discussion scope. // -// GitHub API docs: https://docs.github.com/rest/teams/discussions#create-a-discussion +// GitHub API docs: https://docs.github.com/enterprise-server@3.13/rest/teams/discussions#create-a-discussion // //meta:operation POST /orgs/{org}/teams/{team_slug}/discussions func (s *TeamsService) CreateDiscussionBySlug(ctx context.Context, org, slug string, discussion TeamDiscussion) (*TeamDiscussion, *Response, error) { @@ -192,7 +192,7 @@ func (s *TeamsService) CreateDiscussionBySlug(ctx context.Context, org, slug str // Authenticated user must grant write:discussion scope. // User is allowed to change Title and Body of a discussion only. // -// GitHub API docs: https://docs.github.com/rest/teams/discussions#update-a-discussion +// GitHub API docs: https://docs.github.com/enterprise-server@3.13/rest/teams/discussions#update-a-discussion // //meta:operation PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number} func (s *TeamsService) EditDiscussionByID(ctx context.Context, orgID, teamID int64, discussionNumber int, discussion TeamDiscussion) (*TeamDiscussion, *Response, error) { @@ -215,7 +215,7 @@ func (s *TeamsService) EditDiscussionByID(ctx context.Context, orgID, teamID int // Authenticated user must grant write:discussion scope. // User is allowed to change Title and Body of a discussion only. // -// GitHub API docs: https://docs.github.com/rest/teams/discussions#update-a-discussion +// GitHub API docs: https://docs.github.com/enterprise-server@3.13/rest/teams/discussions#update-a-discussion // //meta:operation PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number} func (s *TeamsService) EditDiscussionBySlug(ctx context.Context, org, slug string, discussionNumber int, discussion TeamDiscussion) (*TeamDiscussion, *Response, error) { @@ -237,7 +237,7 @@ func (s *TeamsService) EditDiscussionBySlug(ctx context.Context, org, slug strin // DeleteDiscussionByID deletes a discussion from team's page given Organization and Team ID. // Authenticated user must grant write:discussion scope. // -// GitHub API docs: https://docs.github.com/rest/teams/discussions#delete-a-discussion +// GitHub API docs: https://docs.github.com/enterprise-server@3.13/rest/teams/discussions#delete-a-discussion // //meta:operation DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number} func (s *TeamsService) DeleteDiscussionByID(ctx context.Context, orgID, teamID int64, discussionNumber int) (*Response, error) { @@ -253,7 +253,7 @@ func (s *TeamsService) DeleteDiscussionByID(ctx context.Context, orgID, teamID i // DeleteDiscussionBySlug deletes a discussion from team's page given Organization name and Team's slug. // Authenticated user must grant write:discussion scope. // -// GitHub API docs: https://docs.github.com/rest/teams/discussions#delete-a-discussion +// GitHub API docs: https://docs.github.com/enterprise-server@3.13/rest/teams/discussions#delete-a-discussion // //meta:operation DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number} func (s *TeamsService) DeleteDiscussionBySlug(ctx context.Context, org, slug string, discussionNumber int) (*Response, error) { diff --git a/vendor/github.com/google/go-github/v81/github/teams_members.go b/vendor/github.com/google/go-github/v82/github/teams_members.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/teams_members.go rename to vendor/github.com/google/go-github/v82/github/teams_members.go diff --git a/vendor/github.com/google/go-github/v81/github/timestamp.go b/vendor/github.com/google/go-github/v82/github/timestamp.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/timestamp.go rename to vendor/github.com/google/go-github/v82/github/timestamp.go diff --git a/vendor/github.com/google/go-github/v81/github/users.go b/vendor/github.com/google/go-github/v82/github/users.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/users.go rename to vendor/github.com/google/go-github/v82/github/users.go diff --git a/vendor/github.com/google/go-github/v81/github/users_administration.go b/vendor/github.com/google/go-github/v82/github/users_administration.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/users_administration.go rename to vendor/github.com/google/go-github/v82/github/users_administration.go diff --git a/vendor/github.com/google/go-github/v81/github/users_attestations.go b/vendor/github.com/google/go-github/v82/github/users_attestations.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/users_attestations.go rename to vendor/github.com/google/go-github/v82/github/users_attestations.go diff --git a/vendor/github.com/google/go-github/v81/github/users_blocking.go b/vendor/github.com/google/go-github/v82/github/users_blocking.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/users_blocking.go rename to vendor/github.com/google/go-github/v82/github/users_blocking.go diff --git a/vendor/github.com/google/go-github/v81/github/users_emails.go b/vendor/github.com/google/go-github/v82/github/users_emails.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/users_emails.go rename to vendor/github.com/google/go-github/v82/github/users_emails.go diff --git a/vendor/github.com/google/go-github/v81/github/users_followers.go b/vendor/github.com/google/go-github/v82/github/users_followers.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/users_followers.go rename to vendor/github.com/google/go-github/v82/github/users_followers.go diff --git a/vendor/github.com/google/go-github/v81/github/users_gpg_keys.go b/vendor/github.com/google/go-github/v82/github/users_gpg_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/users_gpg_keys.go rename to vendor/github.com/google/go-github/v82/github/users_gpg_keys.go diff --git a/vendor/github.com/google/go-github/v81/github/users_keys.go b/vendor/github.com/google/go-github/v82/github/users_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/users_keys.go rename to vendor/github.com/google/go-github/v82/github/users_keys.go diff --git a/vendor/github.com/google/go-github/v81/github/users_packages.go b/vendor/github.com/google/go-github/v82/github/users_packages.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/users_packages.go rename to vendor/github.com/google/go-github/v82/github/users_packages.go diff --git a/vendor/github.com/google/go-github/v81/github/users_social_accounts.go b/vendor/github.com/google/go-github/v82/github/users_social_accounts.go similarity index 88% rename from vendor/github.com/google/go-github/v81/github/users_social_accounts.go rename to vendor/github.com/google/go-github/v82/github/users_social_accounts.go index 30927cd8db..e7642c6d6e 100644 --- a/vendor/github.com/google/go-github/v81/github/users_social_accounts.go +++ b/vendor/github.com/google/go-github/v82/github/users_social_accounts.go @@ -16,6 +16,11 @@ type SocialAccount struct { URL *string `json:"url,omitempty"` } +// socialAccountsRequest represents the request body for adding or deleting social accounts. +type socialAccountsRequest struct { + AccountURLs []string `json:"account_urls"` +} + // ListSocialAccounts lists all social accounts for the authenticated user. // // GitHub API docs: https://docs.github.com/rest/users/social-accounts#list-social-accounts-for-the-authenticated-user @@ -49,7 +54,7 @@ func (s *UsersService) ListSocialAccounts(ctx context.Context, opts *ListOptions //meta:operation POST /user/social_accounts func (s *UsersService) AddSocialAccounts(ctx context.Context, accountURLs []string) ([]*SocialAccount, *Response, error) { u := "user/social_accounts" - req, err := s.client.NewRequest("POST", u, accountURLs) + req, err := s.client.NewRequest("POST", u, &socialAccountsRequest{AccountURLs: accountURLs}) if err != nil { return nil, nil, err } @@ -70,7 +75,7 @@ func (s *UsersService) AddSocialAccounts(ctx context.Context, accountURLs []stri //meta:operation DELETE /user/social_accounts func (s *UsersService) DeleteSocialAccounts(ctx context.Context, accountURLs []string) (*Response, error) { u := "user/social_accounts" - req, err := s.client.NewRequest("DELETE", u, accountURLs) + req, err := s.client.NewRequest("DELETE", u, &socialAccountsRequest{AccountURLs: accountURLs}) if err != nil { return nil, err } diff --git a/vendor/github.com/google/go-github/v81/github/users_ssh_signing_keys.go b/vendor/github.com/google/go-github/v82/github/users_ssh_signing_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/users_ssh_signing_keys.go rename to vendor/github.com/google/go-github/v82/github/users_ssh_signing_keys.go diff --git a/vendor/github.com/google/go-github/v81/github/with_appengine.go b/vendor/github.com/google/go-github/v82/github/with_appengine.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/with_appengine.go rename to vendor/github.com/google/go-github/v82/github/with_appengine.go diff --git a/vendor/github.com/google/go-github/v81/github/without_appengine.go b/vendor/github.com/google/go-github/v82/github/without_appengine.go similarity index 100% rename from vendor/github.com/google/go-github/v81/github/without_appengine.go rename to vendor/github.com/google/go-github/v82/github/without_appengine.go diff --git a/vendor/github.com/google/go-querystring/query/encode.go b/vendor/github.com/google/go-querystring/query/encode.go index 91198f819a..c936954033 100644 --- a/vendor/github.com/google/go-querystring/query/encode.go +++ b/vendor/github.com/google/go-querystring/query/encode.go @@ -6,22 +6,21 @@ // // As a simple example: // -// type Options struct { -// Query string `url:"q"` -// ShowAll bool `url:"all"` -// Page int `url:"page"` -// } +// type Options struct { +// Query string `url:"q"` +// ShowAll bool `url:"all"` +// Page int `url:"page"` +// } // -// opt := Options{ "foo", true, 2 } -// v, _ := query.Values(opt) -// fmt.Print(v.Encode()) // will output: "q=foo&all=true&page=2" +// opt := Options{ "foo", true, 2 } +// v, _ := query.Values(opt) +// fmt.Print(v.Encode()) // will output: "q=foo&all=true&page=2" // // The exact mapping between Go values and url.Values is described in the // documentation for the Values() function. package query import ( - "bytes" "fmt" "net/url" "reflect" @@ -47,8 +46,8 @@ type Encoder interface { // // Each exported struct field is encoded as a URL parameter unless // -// - the field's tag is "-", or -// - the field is empty and its tag specifies the "omitempty" option +// - the field's tag is "-", or +// - the field is empty and its tag specifies the "omitempty" option // // The empty values are false, 0, any nil pointer or interface value, any array // slice, map, or string of length zero, and any type (such as time.Time) that @@ -59,19 +58,19 @@ type Encoder interface { // field's tag value is the key name, followed by an optional comma and // options. For example: // -// // Field is ignored by this package. -// Field int `url:"-"` +// // Field is ignored by this package. +// Field int `url:"-"` // -// // Field appears as URL parameter "myName". -// Field int `url:"myName"` +// // Field appears as URL parameter "myName". +// Field int `url:"myName"` // -// // Field appears as URL parameter "myName" and the field is omitted if -// // its value is empty -// Field int `url:"myName,omitempty"` +// // Field appears as URL parameter "myName" and the field is omitted if +// // its value is empty +// Field int `url:"myName,omitempty"` // -// // Field appears as URL parameter "Field" (the default), but the field -// // is skipped if empty. Note the leading comma. -// Field int `url:",omitempty"` +// // Field appears as URL parameter "Field" (the default), but the field +// // is skipped if empty. Note the leading comma. +// Field int `url:",omitempty"` // // For encoding individual field values, the following type-dependent rules // apply: @@ -88,8 +87,8 @@ type Encoder interface { // "url" tag) will use the value of the "layout" tag as a layout passed to // time.Format. For example: // -// // Encode a time.Time as YYYY-MM-DD -// Field time.Time `layout:"2006-01-02"` +// // Encode a time.Time as YYYY-MM-DD +// Field time.Time `layout:"2006-01-02"` // // Slice and Array values default to encoding as multiple URL values of the // same name. Including the "comma" option signals that the field should be @@ -103,9 +102,9 @@ type Encoder interface { // from the "url" tag) will use the value of the "del" tag as the delimiter. // For example: // -// // Encode a slice of bools as ints ("1" for true, "0" for false), -// // separated by exclamation points "!". -// Field []bool `url:",int" del:"!"` +// // Encode a slice of bools as ints ("1" for true, "0" for false), +// // separated by exclamation points "!". +// Field []bool `url:",int" del:"!"` // // Anonymous struct fields are usually encoded as if their inner exported // fields were fields in the outer struct, subject to the standard Go @@ -114,10 +113,10 @@ type Encoder interface { // // Non-nil pointer values are encoded as the value pointed to. // -// Nested structs are encoded including parent fields in value names for -// scoping. e.g: +// Nested structs have their fields processed recursively and are encoded +// including parent fields in value names for scoping. For example, // -// "user[name]=acme&user[addr][postcode]=1234&user[addr][city]=SFO" +// "user[name]=acme&user[addr][postcode]=1234&user[addr][city]=SFO" // // All other values are encoded using their default string representation. // @@ -125,6 +124,11 @@ type Encoder interface { // as multiple URL values of the same name. func Values(v interface{}) (url.Values, error) { values := make(url.Values) + + if v == nil { + return values, nil + } + val := reflect.ValueOf(v) for val.Kind() == reflect.Ptr { if val.IsNil() { @@ -133,10 +137,6 @@ func Values(v interface{}) (url.Values, error) { val = val.Elem() } - if v == nil { - return values, nil - } - if val.Kind() != reflect.Struct { return nil, fmt.Errorf("query: Values() expects struct input. Got %v", val.Kind()) } @@ -209,6 +209,11 @@ func reflectValue(values url.Values, val reflect.Value, scope string) error { } if sv.Kind() == reflect.Slice || sv.Kind() == reflect.Array { + if sv.Len() == 0 { + // skip if slice or array is empty + continue + } + var del string if opts.Contains("comma") { del = "," @@ -223,7 +228,7 @@ func reflectValue(values url.Values, val reflect.Value, scope string) error { } if del != "" { - s := new(bytes.Buffer) + s := new(strings.Builder) first := true for i := 0; i < sv.Len(); i++ { if first { diff --git a/vendor/modules.txt b/vendor/modules.txt index efdf9c37b7..ed2f1fe6cc 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -65,11 +65,11 @@ 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/v81 v81.0.0 +# github.com/google/go-github/v82 v82.0.0 ## explicit; go 1.24.0 -github.com/google/go-github/v81/github -# github.com/google/go-querystring v1.1.0 -## explicit; go 1.10 +github.com/google/go-github/v82/github +# github.com/google/go-querystring v1.2.0 +## explicit; go 1.13 github.com/google/go-querystring/query # github.com/google/uuid v1.6.0 ## explicit