From c2f019afd84f428efc9c1b29822a9e8c5b2a5122 Mon Sep 17 00:00:00 2001 From: Garrett Heel Date: Wed, 24 Aug 2022 17:29:30 -0400 Subject: [PATCH] Add support for default merge commit params --- github/config.go | 2 +- github/data_source_github_branch.go | 2 +- github/data_source_github_collaborators.go | 2 +- github/data_source_github_external_groups.go | 2 +- github/data_source_github_organization.go | 2 +- ...ce_github_organization_team_sync_groups.go | 2 +- github/data_source_github_ref.go | 2 +- github/data_source_github_release.go | 2 +- github/data_source_github_repositories.go | 2 +- github/data_source_github_repository.go | 22 +++++- github/data_source_github_repository_file.go | 2 +- ..._source_github_repository_pull_requests.go | 2 +- github/data_source_github_team.go | 2 +- github/repository_utils.go | 2 +- ...ource_github_actions_environment_secret.go | 2 +- ...github_actions_organization_permissions.go | 2 +- ...urce_github_actions_organization_secret.go | 2 +- ...ctions_organization_secret_repositories.go | 2 +- .../resource_github_actions_runner_group.go | 2 +- github/resource_github_actions_secret.go | 2 +- ...urce_github_app_installation_repository.go | 2 +- github/resource_github_branch.go | 2 +- github/resource_github_branch_default.go | 2 +- .../resource_github_branch_protection_v3.go | 2 +- ...ource_github_branch_protection_v3_utils.go | 2 +- ...e_github_dependabot_organization_secret.go | 2 +- ...ndabot_organization_secret_repositories.go | 2 +- github/resource_github_dependabot_secret.go | 2 +- github/resource_github_emu_group_mapping.go | 2 +- github/resource_github_issue.go | 2 +- github/resource_github_issue_label.go | 2 +- github/resource_github_membership.go | 2 +- github/resource_github_membership_test.go | 2 +- .../resource_github_organization_project.go | 2 +- ...source_github_organization_project_test.go | 2 +- .../resource_github_organization_webhook.go | 2 +- github/resource_github_project_card.go | 2 +- github/resource_github_project_column.go | 2 +- github/resource_github_project_column_test.go | 2 +- github/resource_github_repository.go | 68 +++++++++++++------ ...ce_github_repository_autolink_reference.go | 2 +- ...resource_github_repository_collaborator.go | 2 +- .../resource_github_repository_deploy_key.go | 2 +- .../resource_github_repository_environment.go | 2 +- github/resource_github_repository_file.go | 2 +- .../resource_github_repository_milestone.go | 2 +- github/resource_github_repository_project.go | 2 +- ...resource_github_repository_pull_request.go | 2 +- github/resource_github_repository_test.go | 22 +++--- github/resource_github_repository_webhook.go | 2 +- github/resource_github_team.go | 2 +- github/resource_github_team_members.go | 2 +- github/resource_github_team_members_test.go | 2 +- github/resource_github_team_membership.go | 2 +- .../resource_github_team_membership_test.go | 2 +- github/resource_github_team_repository.go | 2 +- ...resource_github_team_sync_group_mapping.go | 2 +- ...rce_github_team_sync_group_mapping_test.go | 2 +- github/resource_github_user_gpg_key.go | 2 +- github/resource_github_user_ssh_key.go | 2 +- github/resource_organization_block.go | 2 +- github/transport.go | 2 +- github/transport_test.go | 2 +- github/util_permissions.go | 2 +- go.mod | 2 +- go.sum | 4 +- .../google/go-github/{v46 => v47}/AUTHORS | 0 .../google/go-github/{v46 => v47}/LICENSE | 0 .../go-github/{v46 => v47}/github/actions.go | 0 .../{v46 => v47}/github/actions_artifacts.go | 0 .../github/actions_runner_groups.go | 0 .../{v46 => v47}/github/actions_runners.go | 0 .../{v46 => v47}/github/actions_secrets.go | 0 .../github/actions_workflow_jobs.go | 0 .../github/actions_workflow_runs.go | 0 .../{v46 => v47}/github/actions_workflows.go | 0 .../go-github/{v46 => v47}/github/activity.go | 0 .../{v46 => v47}/github/activity_events.go | 0 .../github/activity_notifications.go | 0 .../{v46 => v47}/github/activity_star.go | 0 .../{v46 => v47}/github/activity_watching.go | 0 .../go-github/{v46 => v47}/github/admin.go | 0 .../{v46 => v47}/github/admin_orgs.go | 0 .../{v46 => v47}/github/admin_stats.go | 0 .../{v46 => v47}/github/admin_users.go | 0 .../go-github/{v46 => v47}/github/apps.go | 0 .../{v46 => v47}/github/apps_hooks.go | 0 .../github/apps_hooks_deliveries.go | 0 .../{v46 => v47}/github/apps_installation.go | 0 .../{v46 => v47}/github/apps_manifest.go | 0 .../{v46 => v47}/github/apps_marketplace.go | 0 .../{v46 => v47}/github/authorizations.go | 0 .../go-github/{v46 => v47}/github/billing.go | 0 .../go-github/{v46 => v47}/github/checks.go | 0 .../{v46 => v47}/github/code-scanning.go | 0 .../{v46 => v47}/github/dependabot.go | 0 .../{v46 => v47}/github/dependabot_secrets.go | 0 .../go-github/{v46 => v47}/github/doc.go | 2 +- .../{v46 => v47}/github/enterprise.go | 0 .../github/enterprise_actions_runners.go | 0 .../github/enterprise_audit_log.go | 0 .../go-github/{v46 => v47}/github/event.go | 0 .../{v46 => v47}/github/event_types.go | 0 .../go-github/{v46 => v47}/github/gists.go | 0 .../{v46 => v47}/github/gists_comments.go | 0 .../go-github/{v46 => v47}/github/git.go | 0 .../{v46 => v47}/github/git_blobs.go | 0 .../{v46 => v47}/github/git_commits.go | 0 .../go-github/{v46 => v47}/github/git_refs.go | 0 .../go-github/{v46 => v47}/github/git_tags.go | 0 .../{v46 => v47}/github/git_trees.go | 0 .../{v46 => v47}/github/github-accessors.go | 32 +++++++++ .../go-github/{v46 => v47}/github/github.go | 29 +++++++- .../{v46 => v47}/github/gitignore.go | 0 .../{v46 => v47}/github/interactions.go | 0 .../{v46 => v47}/github/interactions_orgs.go | 0 .../{v46 => v47}/github/interactions_repos.go | 0 .../{v46 => v47}/github/issue_import.go | 0 .../go-github/{v46 => v47}/github/issues.go | 0 .../{v46 => v47}/github/issues_assignees.go | 0 .../{v46 => v47}/github/issues_comments.go | 0 .../{v46 => v47}/github/issues_events.go | 0 .../{v46 => v47}/github/issues_labels.go | 0 .../{v46 => v47}/github/issues_milestones.go | 0 .../{v46 => v47}/github/issues_timeline.go | 0 .../go-github/{v46 => v47}/github/licenses.go | 0 .../go-github/{v46 => v47}/github/messages.go | 0 .../{v46 => v47}/github/migrations.go | 0 .../github/migrations_source_import.go | 0 .../{v46 => v47}/github/migrations_user.go | 6 +- .../go-github/{v46 => v47}/github/misc.go | 0 .../go-github/{v46 => v47}/github/orgs.go | 0 .../github/orgs_actions_allowed.go | 0 .../github/orgs_actions_permissions.go | 0 .../{v46 => v47}/github/orgs_audit_log.go | 0 .../{v46 => v47}/github/orgs_custom_roles.go | 0 .../{v46 => v47}/github/orgs_hooks.go | 0 .../github/orgs_hooks_deliveries.go | 0 .../{v46 => v47}/github/orgs_members.go | 0 .../github/orgs_outside_collaborators.go | 0 .../{v46 => v47}/github/orgs_packages.go | 0 .../{v46 => v47}/github/orgs_projects.go | 0 .../github/orgs_users_blocking.go | 0 .../go-github/{v46 => v47}/github/packages.go | 0 .../go-github/{v46 => v47}/github/projects.go | 0 .../go-github/{v46 => v47}/github/pulls.go | 0 .../{v46 => v47}/github/pulls_comments.go | 0 .../{v46 => v47}/github/pulls_reviewers.go | 0 .../{v46 => v47}/github/pulls_reviews.go | 0 .../{v46 => v47}/github/pulls_threads.go | 0 .../{v46 => v47}/github/reactions.go | 0 .../go-github/{v46 => v47}/github/repos.go | 12 ++++ .../github/repos_actions_allowed.go | 0 .../github/repos_actions_permissions.go | 0 .../{v46 => v47}/github/repos_autolinks.go | 0 .../{v46 => v47}/github/repos_codeowners.go | 0 .../github/repos_collaborators.go | 0 .../{v46 => v47}/github/repos_comments.go | 0 .../{v46 => v47}/github/repos_commits.go | 0 .../github/repos_community_health.go | 0 .../{v46 => v47}/github/repos_contents.go | 0 .../{v46 => v47}/github/repos_deployments.go | 0 .../{v46 => v47}/github/repos_environments.go | 0 .../{v46 => v47}/github/repos_forks.go | 0 .../{v46 => v47}/github/repos_hooks.go | 55 +++++++++++++++ .../github/repos_hooks_deliveries.go | 0 .../{v46 => v47}/github/repos_invitations.go | 0 .../{v46 => v47}/github/repos_keys.go | 0 .../{v46 => v47}/github/repos_lfs.go | 0 .../{v46 => v47}/github/repos_merging.go | 0 .../{v46 => v47}/github/repos_pages.go | 0 .../github/repos_prereceive_hooks.go | 0 .../{v46 => v47}/github/repos_projects.go | 0 .../{v46 => v47}/github/repos_releases.go | 0 .../{v46 => v47}/github/repos_stats.go | 0 .../{v46 => v47}/github/repos_statuses.go | 0 .../{v46 => v47}/github/repos_tags.go | 0 .../{v46 => v47}/github/repos_traffic.go | 0 .../go-github/{v46 => v47}/github/scim.go | 0 .../go-github/{v46 => v47}/github/search.go | 0 .../{v46 => v47}/github/secret_scanning.go | 0 .../go-github/{v46 => v47}/github/strings.go | 0 .../go-github/{v46 => v47}/github/teams.go | 0 .../github/teams_discussion_comments.go | 0 .../{v46 => v47}/github/teams_discussions.go | 0 .../{v46 => v47}/github/teams_members.go | 0 .../{v46 => v47}/github/timestamp.go | 0 .../go-github/{v46 => v47}/github/users.go | 0 .../github/users_administration.go | 0 .../{v46 => v47}/github/users_blocking.go | 0 .../{v46 => v47}/github/users_emails.go | 0 .../{v46 => v47}/github/users_followers.go | 0 .../{v46 => v47}/github/users_gpg_keys.go | 0 .../{v46 => v47}/github/users_keys.go | 0 .../{v46 => v47}/github/users_packages.go | 0 .../{v46 => v47}/github/users_projects.go | 0 .../{v46 => v47}/github/with_appengine.go | 0 .../{v46 => v47}/github/without_appengine.go | 0 vendor/modules.txt | 4 +- website/docs/d/repository.html.markdown | 8 +++ website/docs/r/repository.html.markdown | 8 +++ 201 files changed, 298 insertions(+), 98 deletions(-) rename vendor/github.com/google/go-github/{v46 => v47}/AUTHORS (100%) rename vendor/github.com/google/go-github/{v46 => v47}/LICENSE (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/actions.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/actions_artifacts.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/actions_runner_groups.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/actions_runners.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/actions_secrets.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/actions_workflow_jobs.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/actions_workflow_runs.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/actions_workflows.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/activity.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/activity_events.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/activity_notifications.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/activity_star.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/activity_watching.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/admin.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/admin_orgs.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/admin_stats.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/admin_users.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/apps.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/apps_hooks.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/apps_hooks_deliveries.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/apps_installation.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/apps_manifest.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/apps_marketplace.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/authorizations.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/billing.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/checks.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/code-scanning.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/dependabot.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/dependabot_secrets.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/doc.go (99%) rename vendor/github.com/google/go-github/{v46 => v47}/github/enterprise.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/enterprise_actions_runners.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/enterprise_audit_log.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/event.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/event_types.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/gists.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/gists_comments.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/git.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/git_blobs.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/git_commits.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/git_refs.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/git_tags.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/git_trees.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/github-accessors.go (99%) rename vendor/github.com/google/go-github/{v46 => v47}/github/github.go (98%) rename vendor/github.com/google/go-github/{v46 => v47}/github/gitignore.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/interactions.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/interactions_orgs.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/interactions_repos.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/issue_import.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/issues.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/issues_assignees.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/issues_comments.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/issues_events.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/issues_labels.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/issues_milestones.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/issues_timeline.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/licenses.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/messages.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/migrations.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/migrations_source_import.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/migrations_user.go (98%) rename vendor/github.com/google/go-github/{v46 => v47}/github/misc.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/orgs.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/orgs_actions_allowed.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/orgs_actions_permissions.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/orgs_audit_log.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/orgs_custom_roles.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/orgs_hooks.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/orgs_hooks_deliveries.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/orgs_members.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/orgs_outside_collaborators.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/orgs_packages.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/orgs_projects.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/orgs_users_blocking.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/packages.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/projects.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/pulls.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/pulls_comments.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/pulls_reviewers.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/pulls_reviews.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/pulls_threads.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/reactions.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos.go (98%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_actions_allowed.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_actions_permissions.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_autolinks.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_codeowners.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_collaborators.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_comments.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_commits.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_community_health.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_contents.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_deployments.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_environments.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_forks.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_hooks.go (79%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_hooks_deliveries.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_invitations.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_keys.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_lfs.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_merging.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_pages.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_prereceive_hooks.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_projects.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_releases.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_stats.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_statuses.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_tags.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/repos_traffic.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/scim.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/search.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/secret_scanning.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/strings.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/teams.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/teams_discussion_comments.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/teams_discussions.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/teams_members.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/timestamp.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/users.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/users_administration.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/users_blocking.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/users_emails.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/users_followers.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/users_gpg_keys.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/users_keys.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/users_packages.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/users_projects.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/with_appengine.go (100%) rename vendor/github.com/google/go-github/{v46 => v47}/github/without_appengine.go (100%) diff --git a/github/config.go b/github/config.go index b1bb1e79f7..0c48f736fc 100644 --- a/github/config.go +++ b/github/config.go @@ -8,7 +8,7 @@ import ( "path" "time" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/logging" "github.com/shurcooL/githubv4" "golang.org/x/oauth2" diff --git a/github/data_source_github_branch.go b/github/data_source_github_branch.go index 06c5b25185..52ee8c5408 100644 --- a/github/data_source_github_branch.go +++ b/github/data_source_github_branch.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/data_source_github_collaborators.go b/github/data_source_github_collaborators.go index d083a3a03a..49bd90571d 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/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/data_source_github_external_groups.go b/github/data_source_github_external_groups.go index af295fd28c..76904787dc 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/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/data_source_github_organization.go b/github/data_source_github_organization.go index 279c5a461a..d181ee3ea0 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/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/data_source_github_organization_team_sync_groups.go b/github/data_source_github_organization_team_sync_groups.go index 9750a8b254..776025d588 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/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/data_source_github_ref.go b/github/data_source_github_ref.go index b978f7dff2..4143f53c1c 100644 --- a/github/data_source_github_ref.go +++ b/github/data_source_github_ref.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/data_source_github_release.go b/github/data_source_github_release.go index 64e018506d..e87893dd13 100644 --- a/github/data_source_github_release.go +++ b/github/data_source_github_release.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/validation" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/data_source_github_repositories.go b/github/data_source_github_repositories.go index 9810b20cc1..ac83fd02a7 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/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/data_source_github_repository.go b/github/data_source_github_repository.go index 7d4ed4332d..a651eda8d9 100644 --- a/github/data_source_github_repository.go +++ b/github/data_source_github_repository.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) @@ -84,6 +84,22 @@ func dataSourceGithubRepository() *schema.Resource { Type: schema.TypeBool, Computed: true, }, + "squash_merge_commit_title": { + Type: schema.TypeString, + Computed: true, + }, + "squash_merge_commit_message": { + Type: schema.TypeString, + Computed: true, + }, + "merge_commit_title": { + Type: schema.TypeString, + Computed: true, + }, + "merge_commit_message": { + Type: schema.TypeString, + Computed: true, + }, "default_branch": { Type: schema.TypeString, Computed: true, @@ -234,6 +250,10 @@ func dataSourceGithubRepositoryRead(d *schema.ResourceData, meta interface{}) er d.Set("allow_squash_merge", repo.GetAllowSquashMerge()) d.Set("allow_rebase_merge", repo.GetAllowRebaseMerge()) d.Set("allow_auto_merge", repo.GetAllowAutoMerge()) + d.Set("squash_merge_commit_title", repo.GetSquashMergeCommitTitle()) + d.Set("squash_merge_commit_message", repo.GetSquashMergeCommitMessage()) + d.Set("merge_commit_title", repo.GetMergeCommitTitle()) + d.Set("merge_commit_message", repo.GetMergeCommitMessage()) d.Set("has_downloads", repo.GetHasDownloads()) d.Set("full_name", repo.GetFullName()) d.Set("default_branch", repo.GetDefaultBranch()) diff --git a/github/data_source_github_repository_file.go b/github/data_source_github_repository_file.go index 4217081a72..59b7b340e6 100644 --- a/github/data_source_github_repository_file.go +++ b/github/data_source_github_repository_file.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/data_source_github_repository_pull_requests.go b/github/data_source_github_repository_pull_requests.go index a2b33f1aba..782d834e9a 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/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/data_source_github_team.go b/github/data_source_github_team.go index 707519d268..c6608beb4c 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/v46/github" + "github.com/google/go-github/v47/github" "github.com/shurcooL/githubv4" diff --git a/github/repository_utils.go b/github/repository_utils.go index c58e68ead5..a272f264e9 100644 --- a/github/repository_utils.go +++ b/github/repository_utils.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/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 d6080c533b..75b68b0599 100644 --- a/github/resource_github_actions_environment_secret.go +++ b/github/resource_github_actions_environment_secret.go @@ -6,7 +6,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_actions_organization_permissions.go b/github/resource_github_actions_organization_permissions.go index 0af74192fe..d42790139b 100644 --- a/github/resource_github_actions_organization_permissions.go +++ b/github/resource_github_actions_organization_permissions.go @@ -4,7 +4,7 @@ import ( "context" "errors" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_actions_organization_secret.go b/github/resource_github_actions_organization_secret.go index 9f7526d246..01d7da0dc5 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/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_actions_organization_secret_repositories.go b/github/resource_github_actions_organization_secret_repositories.go index e347c5acf5..8a4f46c696 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/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_actions_runner_group.go b/github/resource_github_actions_runner_group.go index b88d5b115a..ec3a376d19 100644 --- a/github/resource_github_actions_runner_group.go +++ b/github/resource_github_actions_runner_group.go @@ -7,7 +7,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_actions_secret.go b/github/resource_github_actions_secret.go index 40992ffd62..9b62fb300f 100644 --- a/github/resource_github_actions_secret.go +++ b/github/resource_github_actions_secret.go @@ -7,7 +7,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "golang.org/x/crypto/nacl/box" ) diff --git a/github/resource_github_app_installation_repository.go b/github/resource_github_app_installation_repository.go index 982c128ed7..a44c74fef3 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/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_branch.go b/github/resource_github_branch.go index 9a3d0731fa..dece28ef27 100644 --- a/github/resource_github_branch.go +++ b/github/resource_github_branch.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_branch_default.go b/github/resource_github_branch_default.go index 2906ad66ce..880973b90f 100644 --- a/github/resource_github_branch_default.go +++ b/github/resource_github_branch_default.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_branch_protection_v3.go b/github/resource_github_branch_protection_v3.go index 00e750ef7a..7dc979701d 100644 --- a/github/resource_github_branch_protection_v3.go +++ b/github/resource_github_branch_protection_v3.go @@ -6,7 +6,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_branch_protection_v3_utils.go b/github/resource_github_branch_protection_v3_utils.go index 4e68a0fff9..6368fd8b70 100644 --- a/github/resource_github_branch_protection_v3_utils.go +++ b/github/resource_github_branch_protection_v3_utils.go @@ -7,7 +7,7 @@ import ( "log" "strings" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_dependabot_organization_secret.go b/github/resource_github_dependabot_organization_secret.go index 70a697d817..49c899a8f6 100644 --- a/github/resource_github_dependabot_organization_secret.go +++ b/github/resource_github_dependabot_organization_secret.go @@ -7,7 +7,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_dependabot_organization_secret_repositories.go b/github/resource_github_dependabot_organization_secret_repositories.go index d066126d01..9d8aa7c437 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/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_dependabot_secret.go b/github/resource_github_dependabot_secret.go index b6710a9847..d55d78231e 100644 --- a/github/resource_github_dependabot_secret.go +++ b/github/resource_github_dependabot_secret.go @@ -7,7 +7,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/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 33a2dd33f9..85de4d1a2f 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/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_issue.go b/github/resource_github_issue.go index 0fe824a281..2d31ab2c64 100644 --- a/github/resource_github_issue.go +++ b/github/resource_github_issue.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_issue_label.go b/github/resource_github_issue_label.go index 62c3a1a9bc..4aa900bee0 100644 --- a/github/resource_github_issue_label.go +++ b/github/resource_github_issue_label.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_membership.go b/github/resource_github_membership.go index 5af66cf722..4b42efaa84 100644 --- a/github/resource_github_membership.go +++ b/github/resource_github_membership.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_membership_test.go b/github/resource_github_membership_test.go index b3d8519340..f7530f3a6e 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/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) diff --git a/github/resource_github_organization_project.go b/github/resource_github_organization_project.go index 6a179ee396..6132e9a132 100644 --- a/github/resource_github_organization_project.go +++ b/github/resource_github_organization_project.go @@ -7,7 +7,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_organization_project_test.go b/github/resource_github_organization_project_test.go index 22bdb45129..f50f98ed90 100644 --- a/github/resource_github_organization_project_test.go +++ b/github/resource_github_organization_project_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) diff --git a/github/resource_github_organization_webhook.go b/github/resource_github_organization_webhook.go index 642e8655d4..aaab5a67f5 100644 --- a/github/resource_github_organization_webhook.go +++ b/github/resource_github_organization_webhook.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_project_card.go b/github/resource_github_project_card.go index 7fc7705f3c..d83cf02421 100644 --- a/github/resource_github_project_card.go +++ b/github/resource_github_project_card.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_project_column.go b/github/resource_github_project_column.go index ee9d99a4c9..58c14bd0b8 100644 --- a/github/resource_github_project_column.go +++ b/github/resource_github_project_column.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_project_column_test.go b/github/resource_github_project_column_test.go index 6bb864fbed..20e9ef122d 100644 --- a/github/resource_github_project_column_test.go +++ b/github/resource_github_project_column_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) diff --git a/github/resource_github_repository.go b/github/resource_github_repository.go index 691e7f9928..314fb12b28 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/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) @@ -94,6 +94,26 @@ func resourceGithubRepository() *schema.Resource { Optional: true, Default: false, }, + "squash_merge_commit_title": { + Type: schema.TypeString, + Optional: true, + Default: "COMMIT_OR_PR_TITLE", + }, + "squash_merge_commit_message": { + Type: schema.TypeString, + Optional: true, + Default: "COMMIT_MESSAGES", + }, + "merge_commit_title": { + Type: schema.TypeString, + Optional: true, + Default: "MERGE_MESSAGE", + }, + "merge_commit_message": { + Type: schema.TypeString, + Optional: true, + Default: "PR_TITLE", + }, "delete_branch_on_merge": { Type: schema.TypeBool, Optional: true, @@ -282,25 +302,29 @@ func calculateVisibility(d *schema.ResourceData) string { func resourceGithubRepositoryObject(d *schema.ResourceData) *github.Repository { return &github.Repository{ - Name: github.String(d.Get("name").(string)), - Description: github.String(d.Get("description").(string)), - Homepage: github.String(d.Get("homepage_url").(string)), - Visibility: github.String(calculateVisibility(d)), - HasDownloads: github.Bool(d.Get("has_downloads").(bool)), - HasIssues: github.Bool(d.Get("has_issues").(bool)), - HasProjects: github.Bool(d.Get("has_projects").(bool)), - HasWiki: github.Bool(d.Get("has_wiki").(bool)), - IsTemplate: github.Bool(d.Get("is_template").(bool)), - AllowMergeCommit: github.Bool(d.Get("allow_merge_commit").(bool)), - AllowSquashMerge: github.Bool(d.Get("allow_squash_merge").(bool)), - AllowRebaseMerge: github.Bool(d.Get("allow_rebase_merge").(bool)), - AllowAutoMerge: github.Bool(d.Get("allow_auto_merge").(bool)), - DeleteBranchOnMerge: github.Bool(d.Get("delete_branch_on_merge").(bool)), - AutoInit: github.Bool(d.Get("auto_init").(bool)), - LicenseTemplate: github.String(d.Get("license_template").(string)), - GitignoreTemplate: github.String(d.Get("gitignore_template").(string)), - Archived: github.Bool(d.Get("archived").(bool)), - Topics: expandStringList(d.Get("topics").(*schema.Set).List()), + Name: github.String(d.Get("name").(string)), + Description: github.String(d.Get("description").(string)), + Homepage: github.String(d.Get("homepage_url").(string)), + Visibility: github.String(calculateVisibility(d)), + HasDownloads: github.Bool(d.Get("has_downloads").(bool)), + HasIssues: github.Bool(d.Get("has_issues").(bool)), + HasProjects: github.Bool(d.Get("has_projects").(bool)), + HasWiki: github.Bool(d.Get("has_wiki").(bool)), + IsTemplate: github.Bool(d.Get("is_template").(bool)), + AllowMergeCommit: github.Bool(d.Get("allow_merge_commit").(bool)), + AllowSquashMerge: github.Bool(d.Get("allow_squash_merge").(bool)), + AllowRebaseMerge: github.Bool(d.Get("allow_rebase_merge").(bool)), + AllowAutoMerge: github.Bool(d.Get("allow_auto_merge").(bool)), + SquashMergeCommitTitle: github.String(d.Get("squash_merge_commit_title").(string)), + SquashMergeCommitMessage: github.String(d.Get("squash_merge_commit_message").(string)), + MergeCommitTitle: github.String(d.Get("merge_commit_title").(string)), + MergeCommitMessage: github.String(d.Get("merge_commit_message").(string)), + DeleteBranchOnMerge: github.Bool(d.Get("delete_branch_on_merge").(bool)), + AutoInit: github.Bool(d.Get("auto_init").(bool)), + LicenseTemplate: github.String(d.Get("license_template").(string)), + GitignoreTemplate: github.String(d.Get("gitignore_template").(string)), + Archived: github.Bool(d.Get("archived").(bool)), + Topics: expandStringList(d.Get("topics").(*schema.Set).List()), } } @@ -440,6 +464,10 @@ func resourceGithubRepositoryRead(d *schema.ResourceData, meta interface{}) erro d.Set("allow_squash_merge", repo.GetAllowSquashMerge()) d.Set("allow_rebase_merge", repo.GetAllowRebaseMerge()) d.Set("allow_auto_merge", repo.GetAllowAutoMerge()) + d.Set("squash_merge_commit_title", repo.GetSquashMergeCommitTitle()) + d.Set("squash_merge_commit_message", repo.GetSquashMergeCommitMessage()) + d.Set("merge_commit_title", repo.GetMergeCommitTitle()) + d.Set("merge_commit_message", repo.GetMergeCommitMessage()) d.Set("delete_branch_on_merge", repo.GetDeleteBranchOnMerge()) d.Set("has_downloads", repo.GetHasDownloads()) d.Set("full_name", repo.GetFullName()) diff --git a/github/resource_github_repository_autolink_reference.go b/github/resource_github_repository_autolink_reference.go index 277c00e394..9b55ec47d3 100644 --- a/github/resource_github_repository_autolink_reference.go +++ b/github/resource_github_repository_autolink_reference.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_repository_collaborator.go b/github/resource_github_repository_collaborator.go index 133025528c..7b59238e2f 100644 --- a/github/resource_github_repository_collaborator.go +++ b/github/resource_github_repository_collaborator.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_repository_deploy_key.go b/github/resource_github_repository_deploy_key.go index 17472a817b..77c670c6b8 100644 --- a/github/resource_github_repository_deploy_key.go +++ b/github/resource_github_repository_deploy_key.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_repository_environment.go b/github/resource_github_repository_environment.go index 819b26968c..90e33a29f8 100644 --- a/github/resource_github_repository_environment.go +++ b/github/resource_github_repository_environment.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_repository_file.go b/github/resource_github_repository_file.go index f0d91e7c7d..d83e499371 100644 --- a/github/resource_github_repository_file.go +++ b/github/resource_github_repository_file.go @@ -7,7 +7,7 @@ import ( "fmt" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_repository_milestone.go b/github/resource_github_repository_milestone.go index 249f5bb565..18247afa85 100644 --- a/github/resource_github_repository_milestone.go +++ b/github/resource_github_repository_milestone.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) diff --git a/github/resource_github_repository_project.go b/github/resource_github_repository_project.go index d0768b7931..7dc1f2b8e3 100644 --- a/github/resource_github_repository_project.go +++ b/github/resource_github_repository_project.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_repository_pull_request.go b/github/resource_github_repository_pull_request.go index f28d65297a..657d020b61 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/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_repository_test.go b/github/resource_github_repository_test.go index 8814659406..3d9144e258 100644 --- a/github/resource_github_repository_test.go +++ b/github/resource_github_repository_test.go @@ -24,14 +24,16 @@ func TestAccGithubRepositories(t *testing.T) { name = "tf-acc-test-create-%[1]s" description = "Terraform acceptance tests %[1]s" - has_issues = true - has_wiki = true - has_downloads = true - allow_merge_commit = true - allow_squash_merge = false - allow_rebase_merge = false - allow_auto_merge = true - auto_init = false + has_issues = true + has_wiki = true + has_downloads = true + allow_merge_commit = true + allow_squash_merge = false + allow_rebase_merge = false + allow_auto_merge = true + merge_commit_title = "MERGE_MESSAGE" + merge_commit_message = "PR_TITLE" + auto_init = false } `, randomID) @@ -45,6 +47,10 @@ func TestAccGithubRepositories(t *testing.T) { "github_repository.test", "allow_auto_merge", "true", ), + resource.TestCheckResourceAttr( + "github_repository.test", "merge_commit_title", + "MERGE_MESSAGE", + ), ) testCase := func(t *testing.T, mode string) { diff --git a/github/resource_github_repository_webhook.go b/github/resource_github_repository_webhook.go index cadb74f530..68cfe5f5b4 100644 --- a/github/resource_github_repository_webhook.go +++ b/github/resource_github_repository_webhook.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_team.go b/github/resource_github_team.go index d19ce59916..00503eb930 100644 --- a/github/resource_github_team.go +++ b/github/resource_github_team.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/shurcooL/githubv4" diff --git a/github/resource_github_team_members.go b/github/resource_github_team_members.go index 033fb51fd3..785fc6067e 100644 --- a/github/resource_github_team_members.go +++ b/github/resource_github_team_members.go @@ -6,7 +6,7 @@ import ( "reflect" "strconv" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_team_members_test.go b/github/resource_github_team_members_test.go index f5e8fd4970..432e658afa 100644 --- a/github/resource_github_team_members_test.go +++ b/github/resource_github_team_members_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" diff --git a/github/resource_github_team_membership.go b/github/resource_github_team_membership.go index dc0c0b1253..b2ca60ee58 100644 --- a/github/resource_github_team_membership.go +++ b/github/resource_github_team_membership.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_team_membership_test.go b/github/resource_github_team_membership_test.go index e84043924b..d49b971953 100644 --- a/github/resource_github_team_membership_test.go +++ b/github/resource_github_team_membership_test.go @@ -7,7 +7,7 @@ import ( "strconv" "testing" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" diff --git a/github/resource_github_team_repository.go b/github/resource_github_team_repository.go index 05d94bfd6d..ba2c10080e 100644 --- a/github/resource_github_team_repository.go +++ b/github/resource_github_team_repository.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_team_sync_group_mapping.go b/github/resource_github_team_sync_group_mapping.go index a583b310d3..c39fd28e66 100644 --- a/github/resource_github_team_sync_group_mapping.go +++ b/github/resource_github_team_sync_group_mapping.go @@ -6,7 +6,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_team_sync_group_mapping_test.go b/github/resource_github_team_sync_group_mapping_test.go index 3b5240a831..9f72334cab 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/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" diff --git a/github/resource_github_user_gpg_key.go b/github/resource_github_user_gpg_key.go index a2e6c6531b..ac0ea8d70c 100644 --- a/github/resource_github_user_gpg_key.go +++ b/github/resource_github_user_gpg_key.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_github_user_ssh_key.go b/github/resource_github_user_ssh_key.go index 1f03b04e86..5f46963f53 100644 --- a/github/resource_github_user_ssh_key.go +++ b/github/resource_github_user_ssh_key.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/resource_organization_block.go b/github/resource_organization_block.go index dbe190312a..b85cd42318 100644 --- a/github/resource_organization_block.go +++ b/github/resource_organization_block.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) diff --git a/github/transport.go b/github/transport.go index cf02699b9e..ad06c7d5ad 100644 --- a/github/transport.go +++ b/github/transport.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" ) const ( diff --git a/github/transport_test.go b/github/transport_test.go index a4a9967250..c07cbbcc44 100644 --- a/github/transport_test.go +++ b/github/transport_test.go @@ -10,7 +10,7 @@ import ( "net/url" "testing" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" ) func TestEtagTransport(t *testing.T) { diff --git a/github/util_permissions.go b/github/util_permissions.go index c8620df6ce..003ecea17c 100644 --- a/github/util_permissions.go +++ b/github/util_permissions.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/google/go-github/v46/github" + "github.com/google/go-github/v47/github" ) const ( diff --git a/go.mod b/go.mod index 3fb3578fe5..ef3120c117 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.16 require ( github.com/client9/misspell v0.3.4 github.com/golangci/golangci-lint v1.25.1 - github.com/google/go-github/v46 v46.0.0 + github.com/google/go-github/v47 v47.0.0 github.com/hashicorp/go-getter v1.4.2-0.20200106182914-9813cbd4eb02 // indirect github.com/hashicorp/hcl/v2 v2.3.0 // indirect github.com/hashicorp/terraform-config-inspect v0.0.0-20191212124732-c6ae6269b9d7 // indirect diff --git a/go.sum b/go.sum index fd3d863946..101ebac26e 100644 --- a/go.sum +++ b/go.sum @@ -157,8 +157,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-github/v46 v46.0.0 h1:5TZiEw0Is5D9CPld0TSLPjShGr42L7PoyhUSl6KPMKM= -github.com/google/go-github/v46 v46.0.0/go.mod h1:l+/Ml209okuXUAjbvFnGZ2ntokVAhTtXvYWP8Di7OpU= +github.com/google/go-github/v47 v47.0.0 h1:eQap5bIRZibukP0VhngWgpuM0zhY4xntqOzn6DhdkE4= +github.com/google/go-github/v47 v47.0.0/go.mod h1:DRjdvizXE876j0YOZwInB1ESpOcU/xFBClNiQLSdorE= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= diff --git a/vendor/github.com/google/go-github/v46/AUTHORS b/vendor/github.com/google/go-github/v47/AUTHORS similarity index 100% rename from vendor/github.com/google/go-github/v46/AUTHORS rename to vendor/github.com/google/go-github/v47/AUTHORS diff --git a/vendor/github.com/google/go-github/v46/LICENSE b/vendor/github.com/google/go-github/v47/LICENSE similarity index 100% rename from vendor/github.com/google/go-github/v46/LICENSE rename to vendor/github.com/google/go-github/v47/LICENSE diff --git a/vendor/github.com/google/go-github/v46/github/actions.go b/vendor/github.com/google/go-github/v47/github/actions.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/actions.go rename to vendor/github.com/google/go-github/v47/github/actions.go diff --git a/vendor/github.com/google/go-github/v46/github/actions_artifacts.go b/vendor/github.com/google/go-github/v47/github/actions_artifacts.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/actions_artifacts.go rename to vendor/github.com/google/go-github/v47/github/actions_artifacts.go diff --git a/vendor/github.com/google/go-github/v46/github/actions_runner_groups.go b/vendor/github.com/google/go-github/v47/github/actions_runner_groups.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/actions_runner_groups.go rename to vendor/github.com/google/go-github/v47/github/actions_runner_groups.go diff --git a/vendor/github.com/google/go-github/v46/github/actions_runners.go b/vendor/github.com/google/go-github/v47/github/actions_runners.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/actions_runners.go rename to vendor/github.com/google/go-github/v47/github/actions_runners.go diff --git a/vendor/github.com/google/go-github/v46/github/actions_secrets.go b/vendor/github.com/google/go-github/v47/github/actions_secrets.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/actions_secrets.go rename to vendor/github.com/google/go-github/v47/github/actions_secrets.go diff --git a/vendor/github.com/google/go-github/v46/github/actions_workflow_jobs.go b/vendor/github.com/google/go-github/v47/github/actions_workflow_jobs.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/actions_workflow_jobs.go rename to vendor/github.com/google/go-github/v47/github/actions_workflow_jobs.go diff --git a/vendor/github.com/google/go-github/v46/github/actions_workflow_runs.go b/vendor/github.com/google/go-github/v47/github/actions_workflow_runs.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/actions_workflow_runs.go rename to vendor/github.com/google/go-github/v47/github/actions_workflow_runs.go diff --git a/vendor/github.com/google/go-github/v46/github/actions_workflows.go b/vendor/github.com/google/go-github/v47/github/actions_workflows.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/actions_workflows.go rename to vendor/github.com/google/go-github/v47/github/actions_workflows.go diff --git a/vendor/github.com/google/go-github/v46/github/activity.go b/vendor/github.com/google/go-github/v47/github/activity.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/activity.go rename to vendor/github.com/google/go-github/v47/github/activity.go diff --git a/vendor/github.com/google/go-github/v46/github/activity_events.go b/vendor/github.com/google/go-github/v47/github/activity_events.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/activity_events.go rename to vendor/github.com/google/go-github/v47/github/activity_events.go diff --git a/vendor/github.com/google/go-github/v46/github/activity_notifications.go b/vendor/github.com/google/go-github/v47/github/activity_notifications.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/activity_notifications.go rename to vendor/github.com/google/go-github/v47/github/activity_notifications.go diff --git a/vendor/github.com/google/go-github/v46/github/activity_star.go b/vendor/github.com/google/go-github/v47/github/activity_star.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/activity_star.go rename to vendor/github.com/google/go-github/v47/github/activity_star.go diff --git a/vendor/github.com/google/go-github/v46/github/activity_watching.go b/vendor/github.com/google/go-github/v47/github/activity_watching.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/activity_watching.go rename to vendor/github.com/google/go-github/v47/github/activity_watching.go diff --git a/vendor/github.com/google/go-github/v46/github/admin.go b/vendor/github.com/google/go-github/v47/github/admin.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/admin.go rename to vendor/github.com/google/go-github/v47/github/admin.go diff --git a/vendor/github.com/google/go-github/v46/github/admin_orgs.go b/vendor/github.com/google/go-github/v47/github/admin_orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/admin_orgs.go rename to vendor/github.com/google/go-github/v47/github/admin_orgs.go diff --git a/vendor/github.com/google/go-github/v46/github/admin_stats.go b/vendor/github.com/google/go-github/v47/github/admin_stats.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/admin_stats.go rename to vendor/github.com/google/go-github/v47/github/admin_stats.go diff --git a/vendor/github.com/google/go-github/v46/github/admin_users.go b/vendor/github.com/google/go-github/v47/github/admin_users.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/admin_users.go rename to vendor/github.com/google/go-github/v47/github/admin_users.go diff --git a/vendor/github.com/google/go-github/v46/github/apps.go b/vendor/github.com/google/go-github/v47/github/apps.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/apps.go rename to vendor/github.com/google/go-github/v47/github/apps.go diff --git a/vendor/github.com/google/go-github/v46/github/apps_hooks.go b/vendor/github.com/google/go-github/v47/github/apps_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/apps_hooks.go rename to vendor/github.com/google/go-github/v47/github/apps_hooks.go diff --git a/vendor/github.com/google/go-github/v46/github/apps_hooks_deliveries.go b/vendor/github.com/google/go-github/v47/github/apps_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/apps_hooks_deliveries.go rename to vendor/github.com/google/go-github/v47/github/apps_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v46/github/apps_installation.go b/vendor/github.com/google/go-github/v47/github/apps_installation.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/apps_installation.go rename to vendor/github.com/google/go-github/v47/github/apps_installation.go diff --git a/vendor/github.com/google/go-github/v46/github/apps_manifest.go b/vendor/github.com/google/go-github/v47/github/apps_manifest.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/apps_manifest.go rename to vendor/github.com/google/go-github/v47/github/apps_manifest.go diff --git a/vendor/github.com/google/go-github/v46/github/apps_marketplace.go b/vendor/github.com/google/go-github/v47/github/apps_marketplace.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/apps_marketplace.go rename to vendor/github.com/google/go-github/v47/github/apps_marketplace.go diff --git a/vendor/github.com/google/go-github/v46/github/authorizations.go b/vendor/github.com/google/go-github/v47/github/authorizations.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/authorizations.go rename to vendor/github.com/google/go-github/v47/github/authorizations.go diff --git a/vendor/github.com/google/go-github/v46/github/billing.go b/vendor/github.com/google/go-github/v47/github/billing.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/billing.go rename to vendor/github.com/google/go-github/v47/github/billing.go diff --git a/vendor/github.com/google/go-github/v46/github/checks.go b/vendor/github.com/google/go-github/v47/github/checks.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/checks.go rename to vendor/github.com/google/go-github/v47/github/checks.go diff --git a/vendor/github.com/google/go-github/v46/github/code-scanning.go b/vendor/github.com/google/go-github/v47/github/code-scanning.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/code-scanning.go rename to vendor/github.com/google/go-github/v47/github/code-scanning.go diff --git a/vendor/github.com/google/go-github/v46/github/dependabot.go b/vendor/github.com/google/go-github/v47/github/dependabot.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/dependabot.go rename to vendor/github.com/google/go-github/v47/github/dependabot.go diff --git a/vendor/github.com/google/go-github/v46/github/dependabot_secrets.go b/vendor/github.com/google/go-github/v47/github/dependabot_secrets.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/dependabot_secrets.go rename to vendor/github.com/google/go-github/v47/github/dependabot_secrets.go diff --git a/vendor/github.com/google/go-github/v46/github/doc.go b/vendor/github.com/google/go-github/v47/github/doc.go similarity index 99% rename from vendor/github.com/google/go-github/v46/github/doc.go rename to vendor/github.com/google/go-github/v47/github/doc.go index e6f1a56398..9ab7f55875 100644 --- a/vendor/github.com/google/go-github/v46/github/doc.go +++ b/vendor/github.com/google/go-github/v47/github/doc.go @@ -8,7 +8,7 @@ Package github provides a client for using the GitHub API. Usage: - import "github.com/google/go-github/v46/github" // with go modules enabled (GO111MODULE=on or outside GOPATH) + import "github.com/google/go-github/v47/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/v46/github/enterprise.go b/vendor/github.com/google/go-github/v47/github/enterprise.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/enterprise.go rename to vendor/github.com/google/go-github/v47/github/enterprise.go diff --git a/vendor/github.com/google/go-github/v46/github/enterprise_actions_runners.go b/vendor/github.com/google/go-github/v47/github/enterprise_actions_runners.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/enterprise_actions_runners.go rename to vendor/github.com/google/go-github/v47/github/enterprise_actions_runners.go diff --git a/vendor/github.com/google/go-github/v46/github/enterprise_audit_log.go b/vendor/github.com/google/go-github/v47/github/enterprise_audit_log.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/enterprise_audit_log.go rename to vendor/github.com/google/go-github/v47/github/enterprise_audit_log.go diff --git a/vendor/github.com/google/go-github/v46/github/event.go b/vendor/github.com/google/go-github/v47/github/event.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/event.go rename to vendor/github.com/google/go-github/v47/github/event.go diff --git a/vendor/github.com/google/go-github/v46/github/event_types.go b/vendor/github.com/google/go-github/v47/github/event_types.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/event_types.go rename to vendor/github.com/google/go-github/v47/github/event_types.go diff --git a/vendor/github.com/google/go-github/v46/github/gists.go b/vendor/github.com/google/go-github/v47/github/gists.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/gists.go rename to vendor/github.com/google/go-github/v47/github/gists.go diff --git a/vendor/github.com/google/go-github/v46/github/gists_comments.go b/vendor/github.com/google/go-github/v47/github/gists_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/gists_comments.go rename to vendor/github.com/google/go-github/v47/github/gists_comments.go diff --git a/vendor/github.com/google/go-github/v46/github/git.go b/vendor/github.com/google/go-github/v47/github/git.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/git.go rename to vendor/github.com/google/go-github/v47/github/git.go diff --git a/vendor/github.com/google/go-github/v46/github/git_blobs.go b/vendor/github.com/google/go-github/v47/github/git_blobs.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/git_blobs.go rename to vendor/github.com/google/go-github/v47/github/git_blobs.go diff --git a/vendor/github.com/google/go-github/v46/github/git_commits.go b/vendor/github.com/google/go-github/v47/github/git_commits.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/git_commits.go rename to vendor/github.com/google/go-github/v47/github/git_commits.go diff --git a/vendor/github.com/google/go-github/v46/github/git_refs.go b/vendor/github.com/google/go-github/v47/github/git_refs.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/git_refs.go rename to vendor/github.com/google/go-github/v47/github/git_refs.go diff --git a/vendor/github.com/google/go-github/v46/github/git_tags.go b/vendor/github.com/google/go-github/v47/github/git_tags.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/git_tags.go rename to vendor/github.com/google/go-github/v47/github/git_tags.go diff --git a/vendor/github.com/google/go-github/v46/github/git_trees.go b/vendor/github.com/google/go-github/v47/github/git_trees.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/git_trees.go rename to vendor/github.com/google/go-github/v47/github/git_trees.go diff --git a/vendor/github.com/google/go-github/v46/github/github-accessors.go b/vendor/github.com/google/go-github/v47/github/github-accessors.go similarity index 99% rename from vendor/github.com/google/go-github/v46/github/github-accessors.go rename to vendor/github.com/google/go-github/v47/github/github-accessors.go index 013780bff9..1b1c9d9511 100644 --- a/vendor/github.com/google/go-github/v46/github/github-accessors.go +++ b/vendor/github.com/google/go-github/v47/github/github-accessors.go @@ -14590,6 +14590,22 @@ func (r *Repository) GetMasterBranch() string { return *r.MasterBranch } +// GetMergeCommitMessage returns the MergeCommitMessage field if it's non-nil, zero value otherwise. +func (r *Repository) GetMergeCommitMessage() string { + if r == nil || r.MergeCommitMessage == nil { + return "" + } + return *r.MergeCommitMessage +} + +// GetMergeCommitTitle returns the MergeCommitTitle field if it's non-nil, zero value otherwise. +func (r *Repository) GetMergeCommitTitle() string { + if r == nil || r.MergeCommitTitle == nil { + return "" + } + return *r.MergeCommitTitle +} + // GetMergesURL returns the MergesURL field if it's non-nil, zero value otherwise. func (r *Repository) GetMergesURL() string { if r == nil || r.MergesURL == nil { @@ -14758,6 +14774,22 @@ func (r *Repository) GetSource() *Repository { return r.Source } +// GetSquashMergeCommitMessage returns the SquashMergeCommitMessage field if it's non-nil, zero value otherwise. +func (r *Repository) GetSquashMergeCommitMessage() string { + if r == nil || r.SquashMergeCommitMessage == nil { + return "" + } + return *r.SquashMergeCommitMessage +} + +// GetSquashMergeCommitTitle returns the SquashMergeCommitTitle field if it's non-nil, zero value otherwise. +func (r *Repository) GetSquashMergeCommitTitle() string { + if r == nil || r.SquashMergeCommitTitle == nil { + return "" + } + return *r.SquashMergeCommitTitle +} + // GetSSHURL returns the SSHURL field if it's non-nil, zero value otherwise. func (r *Repository) GetSSHURL() string { if r == nil || r.SSHURL == nil { diff --git a/vendor/github.com/google/go-github/v46/github/github.go b/vendor/github.com/google/go-github/v47/github/github.go similarity index 98% rename from vendor/github.com/google/go-github/v46/github/github.go rename to vendor/github.com/google/go-github/v47/github/github.go index 985a8a4374..da923dbbb3 100644 --- a/vendor/github.com/google/go-github/v46/github/github.go +++ b/vendor/github.com/google/go-github/v47/github/github.go @@ -28,7 +28,7 @@ import ( ) const ( - Version = "46.0.0" + Version = "v47.0.0" defaultBaseURL = "https://api.github.com/" defaultUserAgent = "go-github" + "/" + Version @@ -426,6 +426,33 @@ func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Requ return req, nil } +// NewFormRequest creates an API request. A relative URL can be provided in urlStr, +// in which case it is resolved relative to the BaseURL of the Client. +// Relative URLs should always be specified without a preceding slash. +// Body is sent with Content-Type: application/x-www-form-urlencoded. +func (c *Client) NewFormRequest(urlStr string, body io.Reader) (*http.Request, error) { + if !strings.HasSuffix(c.BaseURL.Path, "/") { + return nil, fmt.Errorf("BaseURL must have a trailing slash, but %q does not", c.BaseURL) + } + + u, err := c.BaseURL.Parse(urlStr) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodPost, u.String(), body) + if err != nil { + return nil, err + } + + req.Header.Set("Content-Type", "application/x-www-form-urlencoded") + req.Header.Set("Accept", mediaTypeV3) + if c.UserAgent != "" { + req.Header.Set("User-Agent", c.UserAgent) + } + return req, nil +} + // NewUploadRequest creates an upload request. A relative URL can be provided in // urlStr, in which case it is resolved relative to the UploadURL of the Client. // Relative URLs should always be specified without a preceding slash. diff --git a/vendor/github.com/google/go-github/v46/github/gitignore.go b/vendor/github.com/google/go-github/v47/github/gitignore.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/gitignore.go rename to vendor/github.com/google/go-github/v47/github/gitignore.go diff --git a/vendor/github.com/google/go-github/v46/github/interactions.go b/vendor/github.com/google/go-github/v47/github/interactions.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/interactions.go rename to vendor/github.com/google/go-github/v47/github/interactions.go diff --git a/vendor/github.com/google/go-github/v46/github/interactions_orgs.go b/vendor/github.com/google/go-github/v47/github/interactions_orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/interactions_orgs.go rename to vendor/github.com/google/go-github/v47/github/interactions_orgs.go diff --git a/vendor/github.com/google/go-github/v46/github/interactions_repos.go b/vendor/github.com/google/go-github/v47/github/interactions_repos.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/interactions_repos.go rename to vendor/github.com/google/go-github/v47/github/interactions_repos.go diff --git a/vendor/github.com/google/go-github/v46/github/issue_import.go b/vendor/github.com/google/go-github/v47/github/issue_import.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/issue_import.go rename to vendor/github.com/google/go-github/v47/github/issue_import.go diff --git a/vendor/github.com/google/go-github/v46/github/issues.go b/vendor/github.com/google/go-github/v47/github/issues.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/issues.go rename to vendor/github.com/google/go-github/v47/github/issues.go diff --git a/vendor/github.com/google/go-github/v46/github/issues_assignees.go b/vendor/github.com/google/go-github/v47/github/issues_assignees.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/issues_assignees.go rename to vendor/github.com/google/go-github/v47/github/issues_assignees.go diff --git a/vendor/github.com/google/go-github/v46/github/issues_comments.go b/vendor/github.com/google/go-github/v47/github/issues_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/issues_comments.go rename to vendor/github.com/google/go-github/v47/github/issues_comments.go diff --git a/vendor/github.com/google/go-github/v46/github/issues_events.go b/vendor/github.com/google/go-github/v47/github/issues_events.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/issues_events.go rename to vendor/github.com/google/go-github/v47/github/issues_events.go diff --git a/vendor/github.com/google/go-github/v46/github/issues_labels.go b/vendor/github.com/google/go-github/v47/github/issues_labels.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/issues_labels.go rename to vendor/github.com/google/go-github/v47/github/issues_labels.go diff --git a/vendor/github.com/google/go-github/v46/github/issues_milestones.go b/vendor/github.com/google/go-github/v47/github/issues_milestones.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/issues_milestones.go rename to vendor/github.com/google/go-github/v47/github/issues_milestones.go diff --git a/vendor/github.com/google/go-github/v46/github/issues_timeline.go b/vendor/github.com/google/go-github/v47/github/issues_timeline.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/issues_timeline.go rename to vendor/github.com/google/go-github/v47/github/issues_timeline.go diff --git a/vendor/github.com/google/go-github/v46/github/licenses.go b/vendor/github.com/google/go-github/v47/github/licenses.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/licenses.go rename to vendor/github.com/google/go-github/v47/github/licenses.go diff --git a/vendor/github.com/google/go-github/v46/github/messages.go b/vendor/github.com/google/go-github/v47/github/messages.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/messages.go rename to vendor/github.com/google/go-github/v47/github/messages.go diff --git a/vendor/github.com/google/go-github/v46/github/migrations.go b/vendor/github.com/google/go-github/v47/github/migrations.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/migrations.go rename to vendor/github.com/google/go-github/v47/github/migrations.go diff --git a/vendor/github.com/google/go-github/v46/github/migrations_source_import.go b/vendor/github.com/google/go-github/v47/github/migrations_source_import.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/migrations_source_import.go rename to vendor/github.com/google/go-github/v47/github/migrations_source_import.go diff --git a/vendor/github.com/google/go-github/v46/github/migrations_user.go b/vendor/github.com/google/go-github/v47/github/migrations_user.go similarity index 98% rename from vendor/github.com/google/go-github/v46/github/migrations_user.go rename to vendor/github.com/google/go-github/v47/github/migrations_user.go index b8a0d608d6..6586fdb2d3 100644 --- a/vendor/github.com/google/go-github/v46/github/migrations_user.go +++ b/vendor/github.com/google/go-github/v47/github/migrations_user.go @@ -97,8 +97,12 @@ func (s *MigrationService) StartUserMigration(ctx context.Context, repos []strin // ListUserMigrations lists the most recent migrations. // // GitHub API docs: https://docs.github.com/en/rest/migrations/users#list-user-migrations -func (s *MigrationService) ListUserMigrations(ctx context.Context) ([]*UserMigration, *Response, error) { +func (s *MigrationService) ListUserMigrations(ctx context.Context, opts *ListOptions) ([]*UserMigration, *Response, error) { u := "user/migrations" + 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/v46/github/misc.go b/vendor/github.com/google/go-github/v47/github/misc.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/misc.go rename to vendor/github.com/google/go-github/v47/github/misc.go diff --git a/vendor/github.com/google/go-github/v46/github/orgs.go b/vendor/github.com/google/go-github/v47/github/orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/orgs.go rename to vendor/github.com/google/go-github/v47/github/orgs.go diff --git a/vendor/github.com/google/go-github/v46/github/orgs_actions_allowed.go b/vendor/github.com/google/go-github/v47/github/orgs_actions_allowed.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/orgs_actions_allowed.go rename to vendor/github.com/google/go-github/v47/github/orgs_actions_allowed.go diff --git a/vendor/github.com/google/go-github/v46/github/orgs_actions_permissions.go b/vendor/github.com/google/go-github/v47/github/orgs_actions_permissions.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/orgs_actions_permissions.go rename to vendor/github.com/google/go-github/v47/github/orgs_actions_permissions.go diff --git a/vendor/github.com/google/go-github/v46/github/orgs_audit_log.go b/vendor/github.com/google/go-github/v47/github/orgs_audit_log.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/orgs_audit_log.go rename to vendor/github.com/google/go-github/v47/github/orgs_audit_log.go diff --git a/vendor/github.com/google/go-github/v46/github/orgs_custom_roles.go b/vendor/github.com/google/go-github/v47/github/orgs_custom_roles.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/orgs_custom_roles.go rename to vendor/github.com/google/go-github/v47/github/orgs_custom_roles.go diff --git a/vendor/github.com/google/go-github/v46/github/orgs_hooks.go b/vendor/github.com/google/go-github/v47/github/orgs_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/orgs_hooks.go rename to vendor/github.com/google/go-github/v47/github/orgs_hooks.go diff --git a/vendor/github.com/google/go-github/v46/github/orgs_hooks_deliveries.go b/vendor/github.com/google/go-github/v47/github/orgs_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/orgs_hooks_deliveries.go rename to vendor/github.com/google/go-github/v47/github/orgs_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v46/github/orgs_members.go b/vendor/github.com/google/go-github/v47/github/orgs_members.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/orgs_members.go rename to vendor/github.com/google/go-github/v47/github/orgs_members.go diff --git a/vendor/github.com/google/go-github/v46/github/orgs_outside_collaborators.go b/vendor/github.com/google/go-github/v47/github/orgs_outside_collaborators.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/orgs_outside_collaborators.go rename to vendor/github.com/google/go-github/v47/github/orgs_outside_collaborators.go diff --git a/vendor/github.com/google/go-github/v46/github/orgs_packages.go b/vendor/github.com/google/go-github/v47/github/orgs_packages.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/orgs_packages.go rename to vendor/github.com/google/go-github/v47/github/orgs_packages.go diff --git a/vendor/github.com/google/go-github/v46/github/orgs_projects.go b/vendor/github.com/google/go-github/v47/github/orgs_projects.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/orgs_projects.go rename to vendor/github.com/google/go-github/v47/github/orgs_projects.go diff --git a/vendor/github.com/google/go-github/v46/github/orgs_users_blocking.go b/vendor/github.com/google/go-github/v47/github/orgs_users_blocking.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/orgs_users_blocking.go rename to vendor/github.com/google/go-github/v47/github/orgs_users_blocking.go diff --git a/vendor/github.com/google/go-github/v46/github/packages.go b/vendor/github.com/google/go-github/v47/github/packages.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/packages.go rename to vendor/github.com/google/go-github/v47/github/packages.go diff --git a/vendor/github.com/google/go-github/v46/github/projects.go b/vendor/github.com/google/go-github/v47/github/projects.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/projects.go rename to vendor/github.com/google/go-github/v47/github/projects.go diff --git a/vendor/github.com/google/go-github/v46/github/pulls.go b/vendor/github.com/google/go-github/v47/github/pulls.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/pulls.go rename to vendor/github.com/google/go-github/v47/github/pulls.go diff --git a/vendor/github.com/google/go-github/v46/github/pulls_comments.go b/vendor/github.com/google/go-github/v47/github/pulls_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/pulls_comments.go rename to vendor/github.com/google/go-github/v47/github/pulls_comments.go diff --git a/vendor/github.com/google/go-github/v46/github/pulls_reviewers.go b/vendor/github.com/google/go-github/v47/github/pulls_reviewers.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/pulls_reviewers.go rename to vendor/github.com/google/go-github/v47/github/pulls_reviewers.go diff --git a/vendor/github.com/google/go-github/v46/github/pulls_reviews.go b/vendor/github.com/google/go-github/v47/github/pulls_reviews.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/pulls_reviews.go rename to vendor/github.com/google/go-github/v47/github/pulls_reviews.go diff --git a/vendor/github.com/google/go-github/v46/github/pulls_threads.go b/vendor/github.com/google/go-github/v47/github/pulls_threads.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/pulls_threads.go rename to vendor/github.com/google/go-github/v47/github/pulls_threads.go diff --git a/vendor/github.com/google/go-github/v46/github/reactions.go b/vendor/github.com/google/go-github/v47/github/reactions.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/reactions.go rename to vendor/github.com/google/go-github/v47/github/reactions.go diff --git a/vendor/github.com/google/go-github/v46/github/repos.go b/vendor/github.com/google/go-github/v47/github/repos.go similarity index 98% rename from vendor/github.com/google/go-github/v46/github/repos.go rename to vendor/github.com/google/go-github/v47/github/repos.go index 6ad88b3e2b..499ed67786 100644 --- a/vendor/github.com/google/go-github/v46/github/repos.go +++ b/vendor/github.com/google/go-github/v47/github/repos.go @@ -70,6 +70,10 @@ type Repository struct { 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"` // 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"` Archived *bool `json:"archived,omitempty"` Disabled *bool `json:"disabled,omitempty"` @@ -374,6 +378,10 @@ type createRepoRequest struct { 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"` } // Create a new repository. If an organization is specified, the new @@ -420,6 +428,10 @@ func (s *RepositoriesService) Create(ctx context.Context, org string, repo *Repo AllowForking: repo.AllowForking, DeleteBranchOnMerge: repo.DeleteBranchOnMerge, UseSquashPRTitleAsDefault: repo.UseSquashPRTitleAsDefault, + SquashMergeCommitTitle: repo.SquashMergeCommitTitle, + SquashMergeCommitMessage: repo.SquashMergeCommitMessage, + MergeCommitTitle: repo.MergeCommitTitle, + MergeCommitMessage: repo.MergeCommitMessage, } req, err := s.client.NewRequest("POST", u, repoReq) diff --git a/vendor/github.com/google/go-github/v46/github/repos_actions_allowed.go b/vendor/github.com/google/go-github/v47/github/repos_actions_allowed.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_actions_allowed.go rename to vendor/github.com/google/go-github/v47/github/repos_actions_allowed.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_actions_permissions.go b/vendor/github.com/google/go-github/v47/github/repos_actions_permissions.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_actions_permissions.go rename to vendor/github.com/google/go-github/v47/github/repos_actions_permissions.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_autolinks.go b/vendor/github.com/google/go-github/v47/github/repos_autolinks.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_autolinks.go rename to vendor/github.com/google/go-github/v47/github/repos_autolinks.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_codeowners.go b/vendor/github.com/google/go-github/v47/github/repos_codeowners.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_codeowners.go rename to vendor/github.com/google/go-github/v47/github/repos_codeowners.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_collaborators.go b/vendor/github.com/google/go-github/v47/github/repos_collaborators.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_collaborators.go rename to vendor/github.com/google/go-github/v47/github/repos_collaborators.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_comments.go b/vendor/github.com/google/go-github/v47/github/repos_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_comments.go rename to vendor/github.com/google/go-github/v47/github/repos_comments.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_commits.go b/vendor/github.com/google/go-github/v47/github/repos_commits.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_commits.go rename to vendor/github.com/google/go-github/v47/github/repos_commits.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_community_health.go b/vendor/github.com/google/go-github/v47/github/repos_community_health.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_community_health.go rename to vendor/github.com/google/go-github/v47/github/repos_community_health.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_contents.go b/vendor/github.com/google/go-github/v47/github/repos_contents.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_contents.go rename to vendor/github.com/google/go-github/v47/github/repos_contents.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_deployments.go b/vendor/github.com/google/go-github/v47/github/repos_deployments.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_deployments.go rename to vendor/github.com/google/go-github/v47/github/repos_deployments.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_environments.go b/vendor/github.com/google/go-github/v47/github/repos_environments.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_environments.go rename to vendor/github.com/google/go-github/v47/github/repos_environments.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_forks.go b/vendor/github.com/google/go-github/v47/github/repos_forks.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_forks.go rename to vendor/github.com/google/go-github/v47/github/repos_forks.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_hooks.go b/vendor/github.com/google/go-github/v47/github/repos_hooks.go similarity index 79% rename from vendor/github.com/google/go-github/v46/github/repos_hooks.go rename to vendor/github.com/google/go-github/v47/github/repos_hooks.go index 4e738cfe8c..44eac8a401 100644 --- a/vendor/github.com/google/go-github/v46/github/repos_hooks.go +++ b/vendor/github.com/google/go-github/v47/github/repos_hooks.go @@ -8,6 +8,9 @@ package github import ( "context" "fmt" + "net/http" + "net/url" + "strings" "time" ) @@ -197,3 +200,55 @@ func (s *RepositoriesService) TestHook(ctx context.Context, owner, repo string, } return s.client.Do(ctx, req, nil) } + +// Subscribe lets servers register to receive updates when a topic is updated. +// +// GitHub API docs: https://docs.github.com/en/rest/webhooks#pubsubhubbub +func (s *RepositoriesService) Subscribe(ctx context.Context, owner, repo, event, callback string, secret []byte) (*Response, error) { + req, err := s.createWebSubRequest("subscribe", owner, repo, event, callback, secret) + if err != nil { + return nil, err + } + + return s.client.Do(ctx, req, nil) +} + +// Unsubscribe lets servers unregister to no longer receive updates when a topic is updated. +// +// GitHub API docs: https://docs.github.com/en/rest/webhooks#pubsubhubbub +func (s *RepositoriesService) Unsubscribe(ctx context.Context, owner, repo, event, callback string, secret []byte) (*Response, error) { + req, err := s.createWebSubRequest("unsubscribe", owner, repo, event, callback, secret) + if err != nil { + return nil, err + } + + return s.client.Do(ctx, req, nil) +} + +// createWebSubRequest returns a subscribe/unsubscribe request that implements +// the WebSub (formerly PubSubHubbub) protocol. +// +// See: https://www.w3.org/TR/websub/#subscriber-sends-subscription-request +func (s *RepositoriesService) createWebSubRequest(hubMode, owner, repo, event, callback string, secret []byte) (*http.Request, error) { + topic := fmt.Sprintf( + "https://github.com/%s/%s/events/%s", + owner, + repo, + event, + ) + form := url.Values{} + form.Add("hub.mode", hubMode) + form.Add("hub.topic", topic) + form.Add("hub.callback", callback) + if secret != nil { + form.Add("hub.secret", string(secret)) + } + body := strings.NewReader(form.Encode()) + + req, err := s.client.NewFormRequest("hub", body) + if err != nil { + return nil, err + } + + return req, nil +} diff --git a/vendor/github.com/google/go-github/v46/github/repos_hooks_deliveries.go b/vendor/github.com/google/go-github/v47/github/repos_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_hooks_deliveries.go rename to vendor/github.com/google/go-github/v47/github/repos_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_invitations.go b/vendor/github.com/google/go-github/v47/github/repos_invitations.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_invitations.go rename to vendor/github.com/google/go-github/v47/github/repos_invitations.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_keys.go b/vendor/github.com/google/go-github/v47/github/repos_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_keys.go rename to vendor/github.com/google/go-github/v47/github/repos_keys.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_lfs.go b/vendor/github.com/google/go-github/v47/github/repos_lfs.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_lfs.go rename to vendor/github.com/google/go-github/v47/github/repos_lfs.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_merging.go b/vendor/github.com/google/go-github/v47/github/repos_merging.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_merging.go rename to vendor/github.com/google/go-github/v47/github/repos_merging.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_pages.go b/vendor/github.com/google/go-github/v47/github/repos_pages.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_pages.go rename to vendor/github.com/google/go-github/v47/github/repos_pages.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_prereceive_hooks.go b/vendor/github.com/google/go-github/v47/github/repos_prereceive_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_prereceive_hooks.go rename to vendor/github.com/google/go-github/v47/github/repos_prereceive_hooks.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_projects.go b/vendor/github.com/google/go-github/v47/github/repos_projects.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_projects.go rename to vendor/github.com/google/go-github/v47/github/repos_projects.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_releases.go b/vendor/github.com/google/go-github/v47/github/repos_releases.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_releases.go rename to vendor/github.com/google/go-github/v47/github/repos_releases.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_stats.go b/vendor/github.com/google/go-github/v47/github/repos_stats.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_stats.go rename to vendor/github.com/google/go-github/v47/github/repos_stats.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_statuses.go b/vendor/github.com/google/go-github/v47/github/repos_statuses.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_statuses.go rename to vendor/github.com/google/go-github/v47/github/repos_statuses.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_tags.go b/vendor/github.com/google/go-github/v47/github/repos_tags.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_tags.go rename to vendor/github.com/google/go-github/v47/github/repos_tags.go diff --git a/vendor/github.com/google/go-github/v46/github/repos_traffic.go b/vendor/github.com/google/go-github/v47/github/repos_traffic.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/repos_traffic.go rename to vendor/github.com/google/go-github/v47/github/repos_traffic.go diff --git a/vendor/github.com/google/go-github/v46/github/scim.go b/vendor/github.com/google/go-github/v47/github/scim.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/scim.go rename to vendor/github.com/google/go-github/v47/github/scim.go diff --git a/vendor/github.com/google/go-github/v46/github/search.go b/vendor/github.com/google/go-github/v47/github/search.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/search.go rename to vendor/github.com/google/go-github/v47/github/search.go diff --git a/vendor/github.com/google/go-github/v46/github/secret_scanning.go b/vendor/github.com/google/go-github/v47/github/secret_scanning.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/secret_scanning.go rename to vendor/github.com/google/go-github/v47/github/secret_scanning.go diff --git a/vendor/github.com/google/go-github/v46/github/strings.go b/vendor/github.com/google/go-github/v47/github/strings.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/strings.go rename to vendor/github.com/google/go-github/v47/github/strings.go diff --git a/vendor/github.com/google/go-github/v46/github/teams.go b/vendor/github.com/google/go-github/v47/github/teams.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/teams.go rename to vendor/github.com/google/go-github/v47/github/teams.go diff --git a/vendor/github.com/google/go-github/v46/github/teams_discussion_comments.go b/vendor/github.com/google/go-github/v47/github/teams_discussion_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/teams_discussion_comments.go rename to vendor/github.com/google/go-github/v47/github/teams_discussion_comments.go diff --git a/vendor/github.com/google/go-github/v46/github/teams_discussions.go b/vendor/github.com/google/go-github/v47/github/teams_discussions.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/teams_discussions.go rename to vendor/github.com/google/go-github/v47/github/teams_discussions.go diff --git a/vendor/github.com/google/go-github/v46/github/teams_members.go b/vendor/github.com/google/go-github/v47/github/teams_members.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/teams_members.go rename to vendor/github.com/google/go-github/v47/github/teams_members.go diff --git a/vendor/github.com/google/go-github/v46/github/timestamp.go b/vendor/github.com/google/go-github/v47/github/timestamp.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/timestamp.go rename to vendor/github.com/google/go-github/v47/github/timestamp.go diff --git a/vendor/github.com/google/go-github/v46/github/users.go b/vendor/github.com/google/go-github/v47/github/users.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/users.go rename to vendor/github.com/google/go-github/v47/github/users.go diff --git a/vendor/github.com/google/go-github/v46/github/users_administration.go b/vendor/github.com/google/go-github/v47/github/users_administration.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/users_administration.go rename to vendor/github.com/google/go-github/v47/github/users_administration.go diff --git a/vendor/github.com/google/go-github/v46/github/users_blocking.go b/vendor/github.com/google/go-github/v47/github/users_blocking.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/users_blocking.go rename to vendor/github.com/google/go-github/v47/github/users_blocking.go diff --git a/vendor/github.com/google/go-github/v46/github/users_emails.go b/vendor/github.com/google/go-github/v47/github/users_emails.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/users_emails.go rename to vendor/github.com/google/go-github/v47/github/users_emails.go diff --git a/vendor/github.com/google/go-github/v46/github/users_followers.go b/vendor/github.com/google/go-github/v47/github/users_followers.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/users_followers.go rename to vendor/github.com/google/go-github/v47/github/users_followers.go diff --git a/vendor/github.com/google/go-github/v46/github/users_gpg_keys.go b/vendor/github.com/google/go-github/v47/github/users_gpg_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/users_gpg_keys.go rename to vendor/github.com/google/go-github/v47/github/users_gpg_keys.go diff --git a/vendor/github.com/google/go-github/v46/github/users_keys.go b/vendor/github.com/google/go-github/v47/github/users_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/users_keys.go rename to vendor/github.com/google/go-github/v47/github/users_keys.go diff --git a/vendor/github.com/google/go-github/v46/github/users_packages.go b/vendor/github.com/google/go-github/v47/github/users_packages.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/users_packages.go rename to vendor/github.com/google/go-github/v47/github/users_packages.go diff --git a/vendor/github.com/google/go-github/v46/github/users_projects.go b/vendor/github.com/google/go-github/v47/github/users_projects.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/users_projects.go rename to vendor/github.com/google/go-github/v47/github/users_projects.go diff --git a/vendor/github.com/google/go-github/v46/github/with_appengine.go b/vendor/github.com/google/go-github/v47/github/with_appengine.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/with_appengine.go rename to vendor/github.com/google/go-github/v47/github/with_appengine.go diff --git a/vendor/github.com/google/go-github/v46/github/without_appengine.go b/vendor/github.com/google/go-github/v47/github/without_appengine.go similarity index 100% rename from vendor/github.com/google/go-github/v46/github/without_appengine.go rename to vendor/github.com/google/go-github/v47/github/without_appengine.go diff --git a/vendor/modules.txt b/vendor/modules.txt index d3d1bd6069..bc311ca894 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -180,9 +180,9 @@ 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/v46 v46.0.0 +# github.com/google/go-github/v47 v47.0.0 ## explicit -github.com/google/go-github/v46/github +github.com/google/go-github/v47/github # github.com/google/go-querystring v1.1.0 github.com/google/go-querystring/query # github.com/google/uuid v1.1.1 diff --git a/website/docs/d/repository.html.markdown b/website/docs/d/repository.html.markdown index 16c2360932..52f217c31e 100644 --- a/website/docs/d/repository.html.markdown +++ b/website/docs/d/repository.html.markdown @@ -53,6 +53,14 @@ The following arguments are supported: * `allow_auto_merge` - Whether the repository allows auto-merging pull requests. +* `squash_merge_commit_title` - The default value for a squash merge commit title. + +* `squash_merge_commit_message` - The default value for a squash merge commit message. + +* `merge_commit_title` - The default value for a merge commit title. + +* `merge_commit_message` - The default value for a merge commit message. + * `has_downloads` - Whether the repository has Downloads feature enabled. * `default_branch` - The name of the default branch of the repository. diff --git a/website/docs/r/repository.html.markdown b/website/docs/r/repository.html.markdown index 7ebbbfd3f5..c085bdda93 100644 --- a/website/docs/r/repository.html.markdown +++ b/website/docs/r/repository.html.markdown @@ -77,6 +77,14 @@ The following arguments are supported: * `allow_auto_merge` - (Optional) Set to `true` to allow auto-merging pull requests on the repository. +* `squash_merge_commit_title` - (Optional) Can be `PR_TITLE` or `COMMIT_OR_PR_TITLE` for a default squash merge commit title. + +* `squash_merge_commit_message` - (Optional) Can be `PR_BODY`, `COMMIT_MESSAGES`, or `BLANK` for a default squash merge commit message. + +* `merge_commit_title` - Can be `PR_TITLE` or `MERGE_MESSAGE` for a default merge commit title. + +* `merge_commit_message` - Can be `PR_BODY`, `PR_TITLE`, or `BLANK` for a default merge commit message. + * `delete_branch_on_merge` - (Optional) Automatically delete head branch after a pull request is merged. Defaults to `false`. * `has_downloads` - (Optional) Set to `true` to enable the (deprecated) downloads features on the repository.