From 695fa448e52053635b20c5854958759aa2149576 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 May 2025 07:17:49 -0700 Subject: [PATCH] Bump github.com/bradleyfalzon/ghinstallation/v2 from 2.14.0 to 2.15.0 (#517) Bumps [github.com/bradleyfalzon/ghinstallation/v2](https://github.com/bradleyfalzon/ghinstallation) from 2.14.0 to 2.15.0. - [Release notes](https://github.com/bradleyfalzon/ghinstallation/releases) - [Commits](https://github.com/bradleyfalzon/ghinstallation/compare/v2.14.0...v2.15.0) --- updated-dependencies: - dependency-name: github.com/bradleyfalzon/ghinstallation/v2 dependency-version: 2.15.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: gabrie30 --- go.mod | 4 +- go.sum | 12 +- .../ghinstallation/v2/.golangci.yml | 30 +- .../ghinstallation/v2/transport.go | 2 +- .../google/go-github/v69/github/packages.go | 143 --- .../google/go-github/{v69 => v71}/AUTHORS | 0 .../google/go-github/{v69 => v71}/LICENSE | 0 .../go-github/{v69 => v71}/github/actions.go | 0 .../{v69 => v71}/github/actions_artifacts.go | 0 .../{v69 => v71}/github/actions_cache.go | 0 .../v71/github/actions_hosted_runners.go | 376 ++++++++ .../{v69 => v71}/github/actions_oidc.go | 0 .../github/actions_permissions_enterprise.go | 0 .../github/actions_permissions_orgs.go | 0 .../github/actions_required_workflows.go | 0 .../github/actions_runner_groups.go | 0 .../{v69 => v71}/github/actions_runners.go | 0 .../{v69 => v71}/github/actions_secrets.go | 0 .../{v69 => v71}/github/actions_variables.go | 0 .../github/actions_workflow_jobs.go | 0 .../github/actions_workflow_runs.go | 15 + .../{v69 => v71}/github/actions_workflows.go | 0 .../go-github/{v69 => v71}/github/activity.go | 0 .../{v69 => v71}/github/activity_events.go | 0 .../github/activity_notifications.go | 0 .../{v69 => v71}/github/activity_star.go | 0 .../{v69 => v71}/github/activity_watching.go | 0 .../go-github/{v69 => v71}/github/admin.go | 4 +- .../{v69 => v71}/github/admin_orgs.go | 6 +- .../{v69 => v71}/github/admin_stats.go | 2 +- .../{v69 => v71}/github/admin_users.go | 8 +- .../go-github/{v69 => v71}/github/apps.go | 0 .../{v69 => v71}/github/apps_hooks.go | 0 .../github/apps_hooks_deliveries.go | 0 .../{v69 => v71}/github/apps_installation.go | 0 .../{v69 => v71}/github/apps_manifest.go | 0 .../{v69 => v71}/github/apps_marketplace.go | 0 .../{v69 => v71}/github/attestations.go | 0 .../{v69 => v71}/github/authorizations.go | 4 +- .../go-github/{v69 => v71}/github/billing.go | 0 .../go-github/{v69 => v71}/github/checks.go | 0 .../{v69 => v71}/github/code_scanning.go | 9 + .../{v69 => v71}/github/codesofconduct.go | 0 .../{v69 => v71}/github/codespaces.go | 0 .../{v69 => v71}/github/codespaces_secrets.go | 0 .../go-github/{v69 => v71}/github/copilot.go | 0 .../{v69 => v71}/github/dependabot.go | 0 .../{v69 => v71}/github/dependabot_alerts.go | 0 .../{v69 => v71}/github/dependabot_secrets.go | 0 .../{v69 => v71}/github/dependency_graph.go | 0 .../github/dependency_graph_snapshots.go | 0 .../go-github/{v69 => v71}/github/doc.go | 18 +- .../go-github/{v69 => v71}/github/emojis.go | 0 .../{v69 => v71}/github/enterprise.go | 0 .../enterprise_actions_hosted_runners.go | 234 +++++ .../enterprise_actions_runner_groups.go | 0 .../github/enterprise_actions_runners.go | 0 .../github/enterprise_audit_log.go | 0 .../enterprise_code_security_and_analysis.go | 0 .../github/enterprise_manage_ghes.go | 8 +- .../github/enterprise_manage_ghes_config.go | 20 +- .../enterprise_manage_ghes_maintenance.go | 4 +- .../github/enterprise_manage_ghes_ssh.go | 6 +- .../enterprise_network_configurations.go | 139 +++ .../github/enterprise_properties.go | 0 .../{v69 => v71}/github/enterprise_rules.go | 0 .../go-github/{v69 => v71}/github/event.go | 0 .../{v69 => v71}/github/event_types.go | 4 +- .../go-github/{v69 => v71}/github/gists.go | 0 .../{v69 => v71}/github/gists_comments.go | 0 .../go-github/{v69 => v71}/github/git.go | 0 .../{v69 => v71}/github/git_blobs.go | 0 .../{v69 => v71}/github/git_commits.go | 0 .../go-github/{v69 => v71}/github/git_refs.go | 0 .../go-github/{v69 => v71}/github/git_tags.go | 0 .../{v69 => v71}/github/git_trees.go | 0 .../{v69 => v71}/github/github-accessors.go | 840 +++++++++++++++++- .../go-github/{v69 => v71}/github/github.go | 26 +- .../{v69 => v71}/github/gitignore.go | 0 .../{v69 => v71}/github/interactions.go | 0 .../{v69 => v71}/github/interactions_orgs.go | 0 .../{v69 => v71}/github/interactions_repos.go | 0 .../{v69 => v71}/github/issue_import.go | 0 .../go-github/{v69 => v71}/github/issues.go | 0 .../{v69 => v71}/github/issues_assignees.go | 0 .../{v69 => v71}/github/issues_comments.go | 0 .../{v69 => v71}/github/issues_events.go | 0 .../{v69 => v71}/github/issues_labels.go | 0 .../{v69 => v71}/github/issues_milestones.go | 0 .../{v69 => v71}/github/issues_timeline.go | 0 .../go-github/{v69 => v71}/github/licenses.go | 0 .../go-github/{v69 => v71}/github/markdown.go | 0 .../go-github/{v69 => v71}/github/messages.go | 0 .../go-github/{v69 => v71}/github/meta.go | 4 + .../{v69 => v71}/github/migrations.go | 0 .../github/migrations_source_import.go | 0 .../{v69 => v71}/github/migrations_user.go | 0 .../go-github/{v69 => v71}/github/orgs.go | 0 .../github/orgs_actions_allowed.go | 0 .../github/orgs_actions_permissions.go | 0 .../{v69 => v71}/github/orgs_attestations.go | 0 .../{v69 => v71}/github/orgs_audit_log.go | 0 .../orgs_codesecurity_configurations.go | 0 .../github/orgs_credential_authorizations.go | 0 .../github/orgs_custom_repository_roles.go | 0 .../{v69 => v71}/github/orgs_hooks.go | 0 .../github/orgs_hooks_configuration.go | 0 .../github/orgs_hooks_deliveries.go | 0 .../go-github/v71/github/orgs_issue_types.go | 99 +++ .../{v69 => v71}/github/orgs_members.go | 0 .../v71/github/orgs_network_configurations.go | 236 +++++ .../github/orgs_organization_roles.go | 0 .../github/orgs_outside_collaborators.go | 0 .../{v69 => v71}/github/orgs_packages.go | 0 .../github/orgs_personal_access_tokens.go | 0 .../{v69 => v71}/github/orgs_properties.go | 0 .../{v69 => v71}/github/orgs_rules.go | 0 .../github/orgs_security_managers.go | 0 .../github/orgs_users_blocking.go | 0 .../google/go-github/v71/github/packages.go | 319 +++++++ .../go-github/{v69 => v71}/github/pulls.go | 8 +- .../{v69 => v71}/github/pulls_comments.go | 0 .../{v69 => v71}/github/pulls_reviewers.go | 0 .../{v69 => v71}/github/pulls_reviews.go | 0 .../{v69 => v71}/github/pulls_threads.go | 0 .../{v69 => v71}/github/rate_limit.go | 0 .../{v69 => v71}/github/reactions.go | 71 +- .../go-github/{v69 => v71}/github/repos.go | 6 +- .../github/repos_actions_access.go | 0 .../github/repos_actions_allowed.go | 0 .../github/repos_actions_permissions.go | 0 .../{v69 => v71}/github/repos_attestations.go | 0 .../{v69 => v71}/github/repos_autolinks.go | 0 .../{v69 => v71}/github/repos_codeowners.go | 0 .../github/repos_collaborators.go | 0 .../{v69 => v71}/github/repos_comments.go | 0 .../{v69 => v71}/github/repos_commits.go | 0 .../github/repos_community_health.go | 0 .../{v69 => v71}/github/repos_contents.go | 0 .../repos_deployment_branch_policies.go | 0 .../repos_deployment_protection_rules.go | 0 .../{v69 => v71}/github/repos_deployments.go | 0 .../{v69 => v71}/github/repos_environments.go | 0 .../{v69 => v71}/github/repos_forks.go | 0 .../{v69 => v71}/github/repos_hooks.go | 0 .../github/repos_hooks_configuration.go | 0 .../github/repos_hooks_deliveries.go | 0 .../{v69 => v71}/github/repos_invitations.go | 0 .../{v69 => v71}/github/repos_keys.go | 0 .../{v69 => v71}/github/repos_lfs.go | 0 .../{v69 => v71}/github/repos_merging.go | 0 .../{v69 => v71}/github/repos_pages.go | 29 + .../github/repos_prereceive_hooks.go | 8 +- .../{v69 => v71}/github/repos_properties.go | 0 .../{v69 => v71}/github/repos_releases.go | 0 .../{v69 => v71}/github/repos_rules.go | 0 .../{v69 => v71}/github/repos_stats.go | 0 .../{v69 => v71}/github/repos_statuses.go | 0 .../{v69 => v71}/github/repos_tags.go | 0 .../{v69 => v71}/github/repos_traffic.go | 0 .../go-github/{v69 => v71}/github/rules.go | 13 +- .../go-github/{v69 => v71}/github/scim.go | 51 ++ .../go-github/{v69 => v71}/github/search.go | 0 .../{v69 => v71}/github/secret_scanning.go | 10 + .../github/security_advisories.go | 0 .../go-github/{v69 => v71}/github/strings.go | 0 .../go-github/{v69 => v71}/github/teams.go | 0 .../github/teams_discussion_comments.go | 0 .../{v69 => v71}/github/teams_discussions.go | 0 .../{v69 => v71}/github/teams_members.go | 0 .../{v69 => v71}/github/timestamp.go | 0 .../go-github/{v69 => v71}/github/users.go | 0 .../github/users_administration.go | 8 +- .../{v69 => v71}/github/users_attestations.go | 0 .../{v69 => v71}/github/users_blocking.go | 0 .../{v69 => v71}/github/users_emails.go | 0 .../{v69 => v71}/github/users_followers.go | 0 .../{v69 => v71}/github/users_gpg_keys.go | 0 .../{v69 => v71}/github/users_keys.go | 0 .../{v69 => v71}/github/users_packages.go | 5 +- .../github/users_ssh_signing_keys.go | 0 .../{v69 => v71}/github/with_appengine.go | 0 .../{v69 => v71}/github/without_appengine.go | 0 vendor/modules.txt | 10 +- 184 files changed, 2540 insertions(+), 251 deletions(-) delete mode 100644 vendor/github.com/google/go-github/v69/github/packages.go rename vendor/github.com/google/go-github/{v69 => v71}/AUTHORS (100%) rename vendor/github.com/google/go-github/{v69 => v71}/LICENSE (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/actions.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/actions_artifacts.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/actions_cache.go (100%) create mode 100644 vendor/github.com/google/go-github/v71/github/actions_hosted_runners.go rename vendor/github.com/google/go-github/{v69 => v71}/github/actions_oidc.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/actions_permissions_enterprise.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/actions_permissions_orgs.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/actions_required_workflows.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/actions_runner_groups.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/actions_runners.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/actions_secrets.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/actions_variables.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/actions_workflow_jobs.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/actions_workflow_runs.go (90%) rename vendor/github.com/google/go-github/{v69 => v71}/github/actions_workflows.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/activity.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/activity_events.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/activity_notifications.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/activity_star.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/activity_watching.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/admin.go (97%) rename vendor/github.com/google/go-github/{v69 => v71}/github/admin_orgs.go (93%) rename vendor/github.com/google/go-github/{v69 => v71}/github/admin_stats.go (98%) rename vendor/github.com/google/go-github/{v69 => v71}/github/admin_users.go (94%) rename vendor/github.com/google/go-github/{v69 => v71}/github/apps.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/apps_hooks.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/apps_hooks_deliveries.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/apps_installation.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/apps_manifest.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/apps_marketplace.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/attestations.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/authorizations.go (98%) rename vendor/github.com/google/go-github/{v69 => v71}/github/billing.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/checks.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/code_scanning.go (98%) rename vendor/github.com/google/go-github/{v69 => v71}/github/codesofconduct.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/codespaces.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/codespaces_secrets.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/copilot.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/dependabot.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/dependabot_alerts.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/dependabot_secrets.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/dependency_graph.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/dependency_graph_snapshots.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/doc.go (89%) rename vendor/github.com/google/go-github/{v69 => v71}/github/emojis.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/enterprise.go (100%) create mode 100644 vendor/github.com/google/go-github/v71/github/enterprise_actions_hosted_runners.go rename vendor/github.com/google/go-github/{v69 => v71}/github/enterprise_actions_runner_groups.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/enterprise_actions_runners.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/enterprise_audit_log.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/enterprise_code_security_and_analysis.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/enterprise_manage_ghes.go (95%) rename vendor/github.com/google/go-github/{v69 => v71}/github/enterprise_manage_ghes_config.go (97%) rename vendor/github.com/google/go-github/{v69 => v71}/github/enterprise_manage_ghes_maintenance.go (96%) rename vendor/github.com/google/go-github/{v69 => v71}/github/enterprise_manage_ghes_ssh.go (93%) create mode 100644 vendor/github.com/google/go-github/v71/github/enterprise_network_configurations.go rename vendor/github.com/google/go-github/{v69 => v71}/github/enterprise_properties.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/enterprise_rules.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/event.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/event_types.go (99%) rename vendor/github.com/google/go-github/{v69 => v71}/github/gists.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/gists_comments.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/git.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/git_blobs.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/git_commits.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/git_refs.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/git_tags.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/git_trees.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/github-accessors.go (97%) rename vendor/github.com/google/go-github/{v69 => v71}/github/github.go (98%) rename vendor/github.com/google/go-github/{v69 => v71}/github/gitignore.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/interactions.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/interactions_orgs.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/interactions_repos.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/issue_import.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/issues.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/issues_assignees.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/issues_comments.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/issues_events.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/issues_labels.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/issues_milestones.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/issues_timeline.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/licenses.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/markdown.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/messages.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/meta.go (97%) rename vendor/github.com/google/go-github/{v69 => v71}/github/migrations.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/migrations_source_import.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/migrations_user.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_actions_allowed.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_actions_permissions.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_attestations.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_audit_log.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_codesecurity_configurations.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_credential_authorizations.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_custom_repository_roles.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_hooks.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_hooks_configuration.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_hooks_deliveries.go (100%) create mode 100644 vendor/github.com/google/go-github/v71/github/orgs_issue_types.go rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_members.go (100%) create mode 100644 vendor/github.com/google/go-github/v71/github/orgs_network_configurations.go rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_organization_roles.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_outside_collaborators.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_packages.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_personal_access_tokens.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_properties.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_rules.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_security_managers.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/orgs_users_blocking.go (100%) create mode 100644 vendor/github.com/google/go-github/v71/github/packages.go rename vendor/github.com/google/go-github/{v69 => v71}/github/pulls.go (98%) rename vendor/github.com/google/go-github/{v69 => v71}/github/pulls_comments.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/pulls_reviewers.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/pulls_reviews.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/pulls_threads.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/rate_limit.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/reactions.go (89%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos.go (99%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_actions_access.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_actions_allowed.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_actions_permissions.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_attestations.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_autolinks.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_codeowners.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_collaborators.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_comments.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_commits.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_community_health.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_contents.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_deployment_branch_policies.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_deployment_protection_rules.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_deployments.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_environments.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_forks.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_hooks.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_hooks_configuration.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_hooks_deliveries.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_invitations.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_keys.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_lfs.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_merging.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_pages.go (91%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_prereceive_hooks.go (93%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_properties.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_releases.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_rules.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_stats.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_statuses.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_tags.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/repos_traffic.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/rules.go (98%) rename vendor/github.com/google/go-github/{v69 => v71}/github/scim.go (78%) rename vendor/github.com/google/go-github/{v69 => v71}/github/search.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/secret_scanning.go (95%) rename vendor/github.com/google/go-github/{v69 => v71}/github/security_advisories.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/strings.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/teams.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/teams_discussion_comments.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/teams_discussions.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/teams_members.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/timestamp.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/users.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/users_administration.go (91%) rename vendor/github.com/google/go-github/{v69 => v71}/github/users_attestations.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/users_blocking.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/users_emails.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/users_followers.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/users_gpg_keys.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/users_keys.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/users_packages.go (98%) rename vendor/github.com/google/go-github/{v69 => v71}/github/users_ssh_signing_keys.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/with_appengine.go (100%) rename vendor/github.com/google/go-github/{v69 => v71}/github/without_appengine.go (100%) diff --git a/go.mod b/go.mod index 61dde13..1cb6d97 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ toolchain go1.24.1 require ( code.gitea.io/sdk/gitea v0.20.0 github.com/MichaelMure/go-term-markdown v0.1.4 - github.com/bradleyfalzon/ghinstallation/v2 v2.14.0 + github.com/bradleyfalzon/ghinstallation/v2 v2.15.0 github.com/briandowns/spinner v1.23.2 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc github.com/fatih/color v1.18.0 @@ -35,7 +35,7 @@ require ( github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/golang-jwt/jwt/v4 v4.5.2 // indirect github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098 // indirect - github.com/google/go-github/v69 v69.0.0 // indirect + github.com/google/go-github/v71 v71.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.7 // indirect diff --git a/go.sum b/go.sum index ee885ed..ee2bb5b 100644 --- a/go.sum +++ b/go.sum @@ -16,8 +16,8 @@ github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBo github.com/alecthomas/kong v0.2.1-0.20190708041108-0548c6b1afae/go.mod h1:+inYUSluD+p4L8KdviBSgzcqEjUQOfC5fQDRFuc36lI= github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 h1:p9Sln00KOTlrYkxI1zYWl1QLnEqAqEARBEYa8FQnQcY= github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= -github.com/bradleyfalzon/ghinstallation/v2 v2.14.0 h1:0D4vKCHOvYrDU8u61TnE2JfNT4VRrBLphmxtqazTO+M= -github.com/bradleyfalzon/ghinstallation/v2 v2.14.0/go.mod h1:LOVmdZYVZ8jqdr4n9wWm1ocDiMz9IfMGfRkaYC1a52A= +github.com/bradleyfalzon/ghinstallation/v2 v2.15.0 h1:7r2rPUM04rgszMP0U1UZ1M5VoVVIlsaBSnpABfYxcQY= +github.com/bradleyfalzon/ghinstallation/v2 v2.15.0/go.mod h1:PoH9Vhy82OeRFZfxsVrk3mfQhVkEzou9OOwPOsEhiXE= github.com/briandowns/spinner v1.23.2 h1:Zc6ecUnI+YzLmJniCfDNaMbW0Wid1d5+qcTq4L2FW8w= github.com/briandowns/spinner v1.23.2/go.mod h1:LaZeM4wm2Ywy6vO571mvhQNRcWfRUnXOs0RcKV0wYKM= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= @@ -53,12 +53,12 @@ github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098 h1:Qxs3bNRWe8G github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098/go.mod h1:aii0r/K0ZnHv7G0KF7xy1v0A7s2Ljrb5byB7MO5p6TU= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/go-github/v62 v62.0.0 h1:/6mGCaRywZz9MuHyw9gD1CwsbmBX8GWsbFkwMmHdhl4= github.com/google/go-github/v62 v62.0.0/go.mod h1:EMxeUqGJq2xRu9DYBMwel/mr7kZrzUOfQmmpYrZn2a4= -github.com/google/go-github/v69 v69.0.0 h1:YnFvZ3pEIZF8KHmI8xyQQe3mYACdkhnaTV2hr7CP2/w= -github.com/google/go-github/v69 v69.0.0/go.mod h1:xne4jymxLR6Uj9b7J7PyTpkMYstEMMwGZa0Aehh1azM= +github.com/google/go-github/v71 v71.0.0 h1:Zi16OymGKZZMm8ZliffVVJ/Q9YZreDKONCr+WUd0Z30= +github.com/google/go-github/v71 v71.0.0/go.mod h1:URZXObp2BLlMjwu0O8g4y6VBneUj2bCHgnI8FfgZ51M= 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/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= diff --git a/vendor/github.com/bradleyfalzon/ghinstallation/v2/.golangci.yml b/vendor/github.com/bradleyfalzon/ghinstallation/v2/.golangci.yml index cab02f8..44bb876 100644 --- a/vendor/github.com/bradleyfalzon/ghinstallation/v2/.golangci.yml +++ b/vendor/github.com/bradleyfalzon/ghinstallation/v2/.golangci.yml @@ -1,16 +1,11 @@ -run: - timeout: 10m - +version: "2" linters: - disable-all: true + default: none enable: - errcheck - gocritic - gocyclo - - gofmt - - goimports - gosec - - gosimple - govet - ineffassign - misspell @@ -19,3 +14,24 @@ linters: - staticcheck - unconvert - unused + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gofmt + - goimports + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/vendor/github.com/bradleyfalzon/ghinstallation/v2/transport.go b/vendor/github.com/bradleyfalzon/ghinstallation/v2/transport.go index 8548468..39be591 100644 --- a/vendor/github.com/bradleyfalzon/ghinstallation/v2/transport.go +++ b/vendor/github.com/bradleyfalzon/ghinstallation/v2/transport.go @@ -13,7 +13,7 @@ import ( "sync" "time" - "github.com/google/go-github/v69/github" + "github.com/google/go-github/v71/github" ) const ( diff --git a/vendor/github.com/google/go-github/v69/github/packages.go b/vendor/github.com/google/go-github/v69/github/packages.go deleted file mode 100644 index ef7df07..0000000 --- a/vendor/github.com/google/go-github/v69/github/packages.go +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright 2020 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -// Package represents a GitHub package. -type Package struct { - ID *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - PackageType *string `json:"package_type,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - Owner *User `json:"owner,omitempty"` - PackageVersion *PackageVersion `json:"package_version,omitempty"` - Registry *PackageRegistry `json:"registry,omitempty"` - URL *string `json:"url,omitempty"` - VersionCount *int64 `json:"version_count,omitempty"` - Visibility *string `json:"visibility,omitempty"` - Repository *Repository `json:"repository,omitempty"` -} - -func (p Package) String() string { - return Stringify(p) -} - -// PackageVersion represents a GitHub package version. -type PackageVersion struct { - ID *int64 `json:"id,omitempty"` - Version *string `json:"version,omitempty"` - Summary *string `json:"summary,omitempty"` - Body *string `json:"body,omitempty"` - BodyHTML *string `json:"body_html,omitempty"` - Release *PackageRelease `json:"release,omitempty"` - Manifest *string `json:"manifest,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - TagName *string `json:"tag_name,omitempty"` - TargetCommitish *string `json:"target_commitish,omitempty"` - TargetOID *string `json:"target_oid,omitempty"` - Draft *bool `json:"draft,omitempty"` - Prerelease *bool `json:"prerelease,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - PackageFiles []*PackageFile `json:"package_files,omitempty"` - Author *User `json:"author,omitempty"` - InstallationCommand *string `json:"installation_command,omitempty"` - Metadata *PackageMetadata `json:"metadata,omitempty"` - PackageHTMLURL *string `json:"package_html_url,omitempty"` - Name *string `json:"name,omitempty"` - URL *string `json:"url,omitempty"` -} - -func (pv PackageVersion) String() string { - return Stringify(pv) -} - -// PackageRelease represents a GitHub package version release. -type PackageRelease struct { - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - ID *int64 `json:"id,omitempty"` - TagName *string `json:"tag_name,omitempty"` - TargetCommitish *string `json:"target_commitish,omitempty"` - Name *string `json:"name,omitempty"` - Draft *bool `json:"draft,omitempty"` - Author *User `json:"author,omitempty"` - Prerelease *bool `json:"prerelease,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - PublishedAt *Timestamp `json:"published_at,omitempty"` -} - -func (r PackageRelease) String() string { - return Stringify(r) -} - -// PackageFile represents a GitHub package version release file. -type PackageFile struct { - DownloadURL *string `json:"download_url,omitempty"` - ID *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SHA256 *string `json:"sha256,omitempty"` - SHA1 *string `json:"sha1,omitempty"` - MD5 *string `json:"md5,omitempty"` - ContentType *string `json:"content_type,omitempty"` - State *string `json:"state,omitempty"` - Author *User `json:"author,omitempty"` - Size *int64 `json:"size,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` -} - -func (pf PackageFile) String() string { - return Stringify(pf) -} - -// PackageRegistry represents a GitHub package registry. -type PackageRegistry struct { - AboutURL *string `json:"about_url,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - URL *string `json:"url,omitempty"` - Vendor *string `json:"vendor,omitempty"` -} - -func (r PackageRegistry) String() string { - return Stringify(r) -} - -// PackageListOptions represents the optional list options for a package. -type PackageListOptions struct { - // Visibility of packages "public", "internal" or "private". - Visibility *string `url:"visibility,omitempty"` - - // PackageType represents the type of package. - // It can be one of "npm", "maven", "rubygems", "nuget", "docker", or "container". - PackageType *string `url:"package_type,omitempty"` - - // State of package either "active" or "deleted". - State *string `url:"state,omitempty"` - - ListOptions -} - -// PackageMetadata represents metadata from a package. -type PackageMetadata struct { - PackageType *string `json:"package_type,omitempty"` - Container *PackageContainerMetadata `json:"container,omitempty"` -} - -func (r PackageMetadata) String() string { - return Stringify(r) -} - -// PackageContainerMetadata represents container metadata for docker container packages. -type PackageContainerMetadata struct { - Tags []string `json:"tags,omitempty"` -} - -func (r PackageContainerMetadata) String() string { - return Stringify(r) -} diff --git a/vendor/github.com/google/go-github/v69/AUTHORS b/vendor/github.com/google/go-github/v71/AUTHORS similarity index 100% rename from vendor/github.com/google/go-github/v69/AUTHORS rename to vendor/github.com/google/go-github/v71/AUTHORS diff --git a/vendor/github.com/google/go-github/v69/LICENSE b/vendor/github.com/google/go-github/v71/LICENSE similarity index 100% rename from vendor/github.com/google/go-github/v69/LICENSE rename to vendor/github.com/google/go-github/v71/LICENSE diff --git a/vendor/github.com/google/go-github/v69/github/actions.go b/vendor/github.com/google/go-github/v71/github/actions.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/actions.go rename to vendor/github.com/google/go-github/v71/github/actions.go diff --git a/vendor/github.com/google/go-github/v69/github/actions_artifacts.go b/vendor/github.com/google/go-github/v71/github/actions_artifacts.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/actions_artifacts.go rename to vendor/github.com/google/go-github/v71/github/actions_artifacts.go diff --git a/vendor/github.com/google/go-github/v69/github/actions_cache.go b/vendor/github.com/google/go-github/v71/github/actions_cache.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/actions_cache.go rename to vendor/github.com/google/go-github/v71/github/actions_cache.go diff --git a/vendor/github.com/google/go-github/v71/github/actions_hosted_runners.go b/vendor/github.com/google/go-github/v71/github/actions_hosted_runners.go new file mode 100644 index 0000000..dbe1f6b --- /dev/null +++ b/vendor/github.com/google/go-github/v71/github/actions_hosted_runners.go @@ -0,0 +1,376 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "errors" + "fmt" +) + +// HostedRunnerPublicIP represents the details of a public IP for GitHub-hosted runner. +type HostedRunnerPublicIP struct { + Enabled bool `json:"enabled"` // Whether public IP is enabled. + Prefix string `json:"prefix"` // The prefix for the public IP. Example: 20.80.208.150 + Length int `json:"length"` // The length of the IP prefix. Example: 28 +} + +// HostedRunnerMachineSpec represents the details of a particular machine specification for GitHub-hosted runner. +type HostedRunnerMachineSpec struct { + ID string `json:"id"` // The ID used for the `size` parameter when creating a new runner. Example: 8-core + CPUCores int `json:"cpu_cores"` // The number of cores. Example: 8 + MemoryGB int `json:"memory_gb"` // The available RAM for the machine spec. Example: 32 + StorageGB int `json:"storage_gb"` // The available SSD storage for the machine spec. Example: 300 +} + +// HostedRunner represents a single GitHub-hosted runner with additional details. +type HostedRunner struct { + ID *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + RunnerGroupID *int64 `json:"runner_group_id,omitempty"` + Platform *string `json:"platform,omitempty"` + ImageDetails *HostedRunnerImageDetail `json:"image_details,omitempty"` + MachineSizeDetails *HostedRunnerMachineSpec `json:"machine_size_details,omitempty"` + Status *string `json:"status,omitempty"` + MaximumRunners *int64 `json:"maximum_runners,omitempty"` + PublicIPEnabled *bool `json:"public_ip_enabled,omitempty"` + PublicIPs []*HostedRunnerPublicIP `json:"public_ips,omitempty"` + LastActiveOn *Timestamp `json:"last_active_on,omitempty"` +} + +// HostedRunnerImageDetail represents the image details of a GitHub-hosted runners. +type HostedRunnerImageDetail struct { + ID *string `json:"id"` // The ID of the image. Use this ID for the `image` parameter when creating a new larger runner. Example: ubuntu-20.04 + SizeGB *int64 `json:"size_gb"` // Image size in GB. Example: 86 + DisplayName *string `json:"display_name"` // Display name for this image. Example: 20.04 + Source *string `json:"source"` // The image provider. Example: github, partner, custom + Version *string `json:"version"` // The image version of the hosted runner pool. Example: latest +} + +// HostedRunners represents a collection of GitHub-hosted runners for an organization. +type HostedRunners struct { + TotalCount int `json:"total_count"` + Runners []*HostedRunner `json:"runners"` +} + +// ListHostedRunners lists all the GitHub-hosted runners for an organization. +// +// GitHub API docs: https://docs.github.com/rest/actions/hosted-runners#list-github-hosted-runners-for-an-organization +// +//meta:operation GET /orgs/{org}/actions/hosted-runners +func (s *ActionsService) ListHostedRunners(ctx context.Context, org string, opts *ListOptions) (*HostedRunners, *Response, error) { + u := fmt.Sprintf("orgs/%v/actions/hosted-runners", org) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + runners := &HostedRunners{} + resp, err := s.client.Do(ctx, req, &runners) + if err != nil { + return nil, resp, err + } + + return runners, resp, nil +} + +// HostedRunnerImage represents the image of GitHub-hosted runners. +// To list all available images, use GET /actions/hosted-runners/images/github-owned or GET /actions/hosted-runners/images/partner. +type HostedRunnerImage struct { + ID string `json:"id"` + Source string `json:"source"` + Version string `json:"version"` +} + +// HostedRunnerRequest specifies body parameters to Hosted Runner configuration. +type HostedRunnerRequest struct { + Name string `json:"name,omitempty"` + Image HostedRunnerImage `json:"image,omitempty"` + RunnerGroupID int64 `json:"runner_group_id,omitempty"` + Size string `json:"size,omitempty"` + MaximumRunners int64 `json:"maximum_runners,omitempty"` + EnableStaticIP bool `json:"enable_static_ip,omitempty"` + ImageVersion string `json:"image_version,omitempty"` +} + +// validateCreateHostedRunnerRequest validates the provided HostedRunnerRequest to ensure +// that all required fields are properly set and that no invalid fields are present for hosted runner create request. +// +// If any of these conditions are violated, an appropriate error message is returned. +// Otherwise, nil is returned, indicating the request is valid. +func validateCreateHostedRunnerRequest(request *HostedRunnerRequest) error { + if request.Size == "" { + return errors.New("size is required for creating a hosted runner") + } + if request.Image == (HostedRunnerImage{}) { + return errors.New("image is required for creating a hosted runner") + } + if request.Name == "" { + return errors.New("name is required for creating a hosted runner") + } + if request.RunnerGroupID == 0 { + return errors.New("runner group ID is required for creating a hosted runner") + } + if request.ImageVersion != "" { + return errors.New("imageVersion should not be set directly; use the Image struct to specify image details") + } + return nil +} + +// CreateHostedRunner creates a GitHub-hosted runner for an organization. +// +// GitHub API docs: https://docs.github.com/rest/actions/hosted-runners#create-a-github-hosted-runner-for-an-organization +// +//meta:operation POST /orgs/{org}/actions/hosted-runners +func (s *ActionsService) CreateHostedRunner(ctx context.Context, org string, request *HostedRunnerRequest) (*HostedRunner, *Response, error) { + if err := validateCreateHostedRunnerRequest(request); err != nil { + return nil, nil, fmt.Errorf("validation failed: %w", err) + } + + u := fmt.Sprintf("orgs/%v/actions/hosted-runners", org) + req, err := s.client.NewRequest("POST", u, request) + if err != nil { + return nil, nil, err + } + + hostedRunner := new(HostedRunner) + resp, err := s.client.Do(ctx, req, hostedRunner) + if err != nil { + return nil, resp, err + } + + return hostedRunner, resp, nil +} + +// HostedRunnerImageSpecs represents the details of a GitHub-hosted runner image. +type HostedRunnerImageSpecs struct { + ID string `json:"id"` + Platform string `json:"platform"` + SizeGB int `json:"size_gb"` + DisplayName string `json:"display_name"` + Source string `json:"source"` +} + +// HostedRunnerImages represents the response containing the total count and details of runner images. +type HostedRunnerImages struct { + TotalCount int `json:"total_count"` + Images []*HostedRunnerImageSpecs `json:"images"` +} + +// GetHostedRunnerGitHubOwnedImages gets the list of GitHub-owned images available for GitHub-hosted runners for an organization. +// +// GitHub API docs: https://docs.github.com/rest/actions/hosted-runners#get-github-owned-images-for-github-hosted-runners-in-an-organization +// +//meta:operation GET /orgs/{org}/actions/hosted-runners/images/github-owned +func (s *ActionsService) GetHostedRunnerGitHubOwnedImages(ctx context.Context, org string) (*HostedRunnerImages, *Response, error) { + u := fmt.Sprintf("orgs/%v/actions/hosted-runners/images/github-owned", org) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + hostedRunnerImages := new(HostedRunnerImages) + resp, err := s.client.Do(ctx, req, hostedRunnerImages) + if err != nil { + return nil, resp, err + } + + return hostedRunnerImages, resp, nil +} + +// GetHostedRunnerPartnerImages gets the list of partner images available for GitHub-hosted runners for an organization. +// +// GitHub API docs: https://docs.github.com/rest/actions/hosted-runners#get-partner-images-for-github-hosted-runners-in-an-organization +// +//meta:operation GET /orgs/{org}/actions/hosted-runners/images/partner +func (s *ActionsService) GetHostedRunnerPartnerImages(ctx context.Context, org string) (*HostedRunnerImages, *Response, error) { + u := fmt.Sprintf("orgs/%v/actions/hosted-runners/images/partner", org) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + hostedRunnerImages := new(HostedRunnerImages) + resp, err := s.client.Do(ctx, req, hostedRunnerImages) + if err != nil { + return nil, resp, err + } + + return hostedRunnerImages, resp, nil +} + +// HostedRunnerPublicIPLimits represents the static public IP limits for GitHub-hosted runners. +type HostedRunnerPublicIPLimits struct { + PublicIPs *PublicIPUsage `json:"public_ips"` +} + +// PublicIPUsage provides details of static public IP limits for GitHub-hosted runners. +type PublicIPUsage struct { + Maximum int64 `json:"maximum"` // The maximum number of static public IP addresses that can be used for Hosted Runners. Example: 50 + CurrentUsage int64 `json:"current_usage"` // The current number of static public IP addresses in use by Hosted Runners. Example: 17 +} + +// GetHostedRunnerLimits gets the GitHub-hosted runners Static public IP Limits for an organization. +// +// GitHub API docs: https://docs.github.com/rest/actions/hosted-runners#get-limits-on-github-hosted-runners-for-an-organization +// +//meta:operation GET /orgs/{org}/actions/hosted-runners/limits +func (s *ActionsService) GetHostedRunnerLimits(ctx context.Context, org string) (*HostedRunnerPublicIPLimits, *Response, error) { + u := fmt.Sprintf("orgs/%v/actions/hosted-runners/limits", org) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + publicIPLimits := new(HostedRunnerPublicIPLimits) + resp, err := s.client.Do(ctx, req, publicIPLimits) + if err != nil { + return nil, resp, err + } + + return publicIPLimits, resp, nil +} + +// HostedRunnerMachineSpecs represents the response containing the total count and details of machine specs for GitHub-hosted runners. +type HostedRunnerMachineSpecs struct { + TotalCount int `json:"total_count"` + MachineSpecs []*HostedRunnerMachineSpec `json:"machine_specs"` +} + +// GetHostedRunnerMachineSpecs gets the list of machine specs available for GitHub-hosted runners for an organization. +// +// GitHub API docs: https://docs.github.com/rest/actions/hosted-runners#get-github-hosted-runners-machine-specs-for-an-organization +// +//meta:operation GET /orgs/{org}/actions/hosted-runners/machine-sizes +func (s *ActionsService) GetHostedRunnerMachineSpecs(ctx context.Context, org string) (*HostedRunnerMachineSpecs, *Response, error) { + u := fmt.Sprintf("orgs/%v/actions/hosted-runners/machine-sizes", org) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + machineSpecs := new(HostedRunnerMachineSpecs) + resp, err := s.client.Do(ctx, req, machineSpecs) + if err != nil { + return nil, resp, err + } + + return machineSpecs, resp, nil +} + +// HostedRunnerPlatforms represents the response containing the total count and platforms for GitHub-hosted runners. +type HostedRunnerPlatforms struct { + TotalCount int `json:"total_count"` + Platforms []string `json:"platforms"` +} + +// GetHostedRunnerPlatforms gets list of platforms available for GitHub-hosted runners for an organization. +// +// GitHub API docs: https://docs.github.com/rest/actions/hosted-runners#get-platforms-for-github-hosted-runners-in-an-organization +// +//meta:operation GET /orgs/{org}/actions/hosted-runners/platforms +func (s *ActionsService) GetHostedRunnerPlatforms(ctx context.Context, org string) (*HostedRunnerPlatforms, *Response, error) { + u := fmt.Sprintf("orgs/%v/actions/hosted-runners/platforms", org) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + platforms := new(HostedRunnerPlatforms) + resp, err := s.client.Do(ctx, req, platforms) + if err != nil { + return nil, resp, err + } + + return platforms, resp, nil +} + +// GetHostedRunner gets a GitHub-hosted runner in an organization. +// +// GitHub API docs: https://docs.github.com/rest/actions/hosted-runners#get-a-github-hosted-runner-for-an-organization +// +//meta:operation GET /orgs/{org}/actions/hosted-runners/{hosted_runner_id} +func (s *ActionsService) GetHostedRunner(ctx context.Context, org string, runnerID int64) (*HostedRunner, *Response, error) { + u := fmt.Sprintf("orgs/%v/actions/hosted-runners/%v", org, runnerID) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + hostedRunner := new(HostedRunner) + resp, err := s.client.Do(ctx, req, hostedRunner) + if err != nil { + return nil, resp, err + } + + return hostedRunner, resp, nil +} + +// validateUpdateHostedRunnerRequest validates the provided HostedRunnerRequest to ensure +// that no disallowed updates are made for a hosted runner update request. +// +// If any of these conditions are violated, an appropriate error message is returned. +// Otherwise, nil is returned, indicating the request is valid for an update. +func validateUpdateHostedRunnerRequest(request *HostedRunnerRequest) error { + if request.Size != "" { + return errors.New("size cannot be updated, API does not support updating size") + } + if request.Image != (HostedRunnerImage{}) { + return errors.New("image struct should not be set directly; use the ImageVersion to specify version details") + } + return nil +} + +// UpdateHostedRunner updates a GitHub-hosted runner for an organization. +// +// GitHub API docs: https://docs.github.com/rest/actions/hosted-runners#update-a-github-hosted-runner-for-an-organization +// +//meta:operation PATCH /orgs/{org}/actions/hosted-runners/{hosted_runner_id} +func (s *ActionsService) UpdateHostedRunner(ctx context.Context, org string, runnerID int64, updateReq HostedRunnerRequest) (*HostedRunner, *Response, error) { + if err := validateUpdateHostedRunnerRequest(&updateReq); err != nil { + return nil, nil, fmt.Errorf("validation failed: %w", err) + } + + u := fmt.Sprintf("orgs/%v/actions/hosted-runners/%v", org, runnerID) + req, err := s.client.NewRequest("PATCH", u, updateReq) + if err != nil { + return nil, nil, err + } + + hostedRunner := new(HostedRunner) + resp, err := s.client.Do(ctx, req, hostedRunner) + if err != nil { + return nil, resp, err + } + + return hostedRunner, resp, nil +} + +// DeleteHostedRunner deletes GitHub-hosted runner from an organization. +// +// GitHub API docs: https://docs.github.com/rest/actions/hosted-runners#delete-a-github-hosted-runner-for-an-organization +// +//meta:operation DELETE /orgs/{org}/actions/hosted-runners/{hosted_runner_id} +func (s *ActionsService) DeleteHostedRunner(ctx context.Context, org string, runnerID int64) (*HostedRunner, *Response, error) { + u := fmt.Sprintf("orgs/%v/actions/hosted-runners/%v", org, runnerID) + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, nil, err + } + + hostedRunner := new(HostedRunner) + resp, err := s.client.Do(ctx, req, hostedRunner) + if err != nil { + return nil, resp, err + } + + return hostedRunner, resp, nil +} diff --git a/vendor/github.com/google/go-github/v69/github/actions_oidc.go b/vendor/github.com/google/go-github/v71/github/actions_oidc.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/actions_oidc.go rename to vendor/github.com/google/go-github/v71/github/actions_oidc.go diff --git a/vendor/github.com/google/go-github/v69/github/actions_permissions_enterprise.go b/vendor/github.com/google/go-github/v71/github/actions_permissions_enterprise.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/actions_permissions_enterprise.go rename to vendor/github.com/google/go-github/v71/github/actions_permissions_enterprise.go diff --git a/vendor/github.com/google/go-github/v69/github/actions_permissions_orgs.go b/vendor/github.com/google/go-github/v71/github/actions_permissions_orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/actions_permissions_orgs.go rename to vendor/github.com/google/go-github/v71/github/actions_permissions_orgs.go diff --git a/vendor/github.com/google/go-github/v69/github/actions_required_workflows.go b/vendor/github.com/google/go-github/v71/github/actions_required_workflows.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/actions_required_workflows.go rename to vendor/github.com/google/go-github/v71/github/actions_required_workflows.go diff --git a/vendor/github.com/google/go-github/v69/github/actions_runner_groups.go b/vendor/github.com/google/go-github/v71/github/actions_runner_groups.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/actions_runner_groups.go rename to vendor/github.com/google/go-github/v71/github/actions_runner_groups.go diff --git a/vendor/github.com/google/go-github/v69/github/actions_runners.go b/vendor/github.com/google/go-github/v71/github/actions_runners.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/actions_runners.go rename to vendor/github.com/google/go-github/v71/github/actions_runners.go diff --git a/vendor/github.com/google/go-github/v69/github/actions_secrets.go b/vendor/github.com/google/go-github/v71/github/actions_secrets.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/actions_secrets.go rename to vendor/github.com/google/go-github/v71/github/actions_secrets.go diff --git a/vendor/github.com/google/go-github/v69/github/actions_variables.go b/vendor/github.com/google/go-github/v71/github/actions_variables.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/actions_variables.go rename to vendor/github.com/google/go-github/v71/github/actions_variables.go diff --git a/vendor/github.com/google/go-github/v69/github/actions_workflow_jobs.go b/vendor/github.com/google/go-github/v71/github/actions_workflow_jobs.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/actions_workflow_jobs.go rename to vendor/github.com/google/go-github/v71/github/actions_workflow_jobs.go diff --git a/vendor/github.com/google/go-github/v69/github/actions_workflow_runs.go b/vendor/github.com/google/go-github/v71/github/actions_workflow_runs.go similarity index 90% rename from vendor/github.com/google/go-github/v69/github/actions_workflow_runs.go rename to vendor/github.com/google/go-github/v71/github/actions_workflow_runs.go index dddc56d..20b9cfc 100644 --- a/vendor/github.com/google/go-github/v69/github/actions_workflow_runs.go +++ b/vendor/github.com/google/go-github/v71/github/actions_workflow_runs.go @@ -204,6 +204,7 @@ func (s *ActionsService) ListRepositoryWorkflowRuns(ctx context.Context, owner, } // GetWorkflowRunByID gets a specific workflow run by ID. +// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID from a DeploymentProtectionRuleEvent. // // GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#get-a-workflow-run // @@ -226,6 +227,7 @@ func (s *ActionsService) GetWorkflowRunByID(ctx context.Context, owner, repo str } // GetWorkflowRunAttempt gets a specific workflow run attempt. +// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID from a DeploymentProtectionRuleEvent. // // GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#get-a-workflow-run-attempt // @@ -252,6 +254,7 @@ func (s *ActionsService) GetWorkflowRunAttempt(ctx context.Context, owner, repo } // GetWorkflowRunAttemptLogs gets a redirect URL to download a plain text file of logs for a workflow run for attempt number. +// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve a workflow run ID from the DeploymentProtectionRuleEvent. // // GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#download-workflow-run-attempt-logs // @@ -302,6 +305,7 @@ func (s *ActionsService) getWorkflowRunAttemptLogsWithRateLimit(ctx context.Cont } // RerunWorkflowByID re-runs a workflow by ID. +// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID a the DeploymentProtectionRuleEvent. // // GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#re-run-a-workflow // @@ -318,6 +322,7 @@ func (s *ActionsService) RerunWorkflowByID(ctx context.Context, owner, repo stri } // RerunFailedJobsByID re-runs all of the failed jobs and their dependent jobs in a workflow run by ID. +// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID from a DeploymentProtectionRuleEvent. // // GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#re-run-failed-jobs-from-a-workflow-run // @@ -335,6 +340,8 @@ func (s *ActionsService) RerunFailedJobsByID(ctx context.Context, owner, repo st // RerunJobByID re-runs a job and its dependent jobs in a workflow run by ID. // +// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID from a DeploymentProtectionRuleEvent. +// // GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run // //meta:operation POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun @@ -350,6 +357,7 @@ func (s *ActionsService) RerunJobByID(ctx context.Context, owner, repo string, j } // CancelWorkflowRunByID cancels a workflow run by ID. +// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID from a DeploymentProtectionRuleEvent. // // GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#cancel-a-workflow-run // @@ -366,6 +374,7 @@ func (s *ActionsService) CancelWorkflowRunByID(ctx context.Context, owner, repo } // GetWorkflowRunLogs gets a redirect URL to download a plain text file of logs for a workflow run. +// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID from a DeploymentProtectionRuleEvent. // // GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#download-workflow-run-logs // @@ -416,6 +425,7 @@ func (s *ActionsService) getWorkflowRunLogsWithRateLimit(ctx context.Context, u } // DeleteWorkflowRun deletes a workflow run by ID. +// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID from a DeploymentProtectionRuleEvent. // // GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#delete-a-workflow-run // @@ -432,6 +442,7 @@ func (s *ActionsService) DeleteWorkflowRun(ctx context.Context, owner, repo stri } // DeleteWorkflowRunLogs deletes all logs for a workflow run. +// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID from a DeploymentProtectionRuleEvent. // // GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#delete-workflow-run-logs // @@ -448,6 +459,7 @@ func (s *ActionsService) DeleteWorkflowRunLogs(ctx context.Context, owner, repo } // GetWorkflowRunUsageByID gets a specific workflow usage run by run ID in the unit of billable milliseconds. +// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID from a DeploymentProtectionRuleEvent. // // GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#get-workflow-run-usage // @@ -470,6 +482,7 @@ func (s *ActionsService) GetWorkflowRunUsageByID(ctx context.Context, owner, rep } // GetPendingDeployments get all deployment environments for a workflow run that are waiting for protection rules to pass. +// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID from a DeploymentProtectionRuleEvent. // // GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#get-pending-deployments-for-a-workflow-run // @@ -492,6 +505,7 @@ func (s *ActionsService) GetPendingDeployments(ctx context.Context, owner, repo } // PendingDeployments approve or reject pending deployments that are waiting on approval by a required reviewer. +// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID from a DeploymentProtectionRuleEvent. // // GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run // @@ -514,6 +528,7 @@ func (s *ActionsService) PendingDeployments(ctx context.Context, owner, repo str } // ReviewCustomDeploymentProtectionRule approves or rejects custom deployment protection rules provided by a GitHub App for a workflow run. +// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID from a DeploymentProtectionRuleEvent. // // GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#review-custom-deployment-protection-rules-for-a-workflow-run // diff --git a/vendor/github.com/google/go-github/v69/github/actions_workflows.go b/vendor/github.com/google/go-github/v71/github/actions_workflows.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/actions_workflows.go rename to vendor/github.com/google/go-github/v71/github/actions_workflows.go diff --git a/vendor/github.com/google/go-github/v69/github/activity.go b/vendor/github.com/google/go-github/v71/github/activity.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/activity.go rename to vendor/github.com/google/go-github/v71/github/activity.go diff --git a/vendor/github.com/google/go-github/v69/github/activity_events.go b/vendor/github.com/google/go-github/v71/github/activity_events.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/activity_events.go rename to vendor/github.com/google/go-github/v71/github/activity_events.go diff --git a/vendor/github.com/google/go-github/v69/github/activity_notifications.go b/vendor/github.com/google/go-github/v71/github/activity_notifications.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/activity_notifications.go rename to vendor/github.com/google/go-github/v71/github/activity_notifications.go diff --git a/vendor/github.com/google/go-github/v69/github/activity_star.go b/vendor/github.com/google/go-github/v71/github/activity_star.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/activity_star.go rename to vendor/github.com/google/go-github/v71/github/activity_star.go diff --git a/vendor/github.com/google/go-github/v69/github/activity_watching.go b/vendor/github.com/google/go-github/v71/github/activity_watching.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/activity_watching.go rename to vendor/github.com/google/go-github/v71/github/activity_watching.go diff --git a/vendor/github.com/google/go-github/v69/github/admin.go b/vendor/github.com/google/go-github/v71/github/admin.go similarity index 97% rename from vendor/github.com/google/go-github/v69/github/admin.go rename to vendor/github.com/google/go-github/v71/github/admin.go index adf55d6..c15c413 100644 --- a/vendor/github.com/google/go-github/v69/github/admin.go +++ b/vendor/github.com/google/go-github/v71/github/admin.go @@ -82,7 +82,7 @@ func (m Enterprise) String() string { // UpdateUserLDAPMapping updates the mapping between a GitHub user and an LDAP user. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-user +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-user // //meta:operation PATCH /admin/ldap/users/{username}/mapping func (s *AdminService) UpdateUserLDAPMapping(ctx context.Context, user string, mapping *UserLDAPMapping) (*UserLDAPMapping, *Response, error) { @@ -103,7 +103,7 @@ func (s *AdminService) UpdateUserLDAPMapping(ctx context.Context, user string, m // UpdateTeamLDAPMapping updates the mapping between a GitHub team and an LDAP group. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-team +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-team // //meta:operation PATCH /admin/ldap/teams/{team_id}/mapping func (s *AdminService) UpdateTeamLDAPMapping(ctx context.Context, team int64, mapping *TeamLDAPMapping) (*TeamLDAPMapping, *Response, error) { diff --git a/vendor/github.com/google/go-github/v69/github/admin_orgs.go b/vendor/github.com/google/go-github/v71/github/admin_orgs.go similarity index 93% rename from vendor/github.com/google/go-github/v69/github/admin_orgs.go rename to vendor/github.com/google/go-github/v71/github/admin_orgs.go index 8b50756..2008345 100644 --- a/vendor/github.com/google/go-github/v69/github/admin_orgs.go +++ b/vendor/github.com/google/go-github/v71/github/admin_orgs.go @@ -22,7 +22,7 @@ type createOrgRequest struct { // Note that only a subset of the org fields are used and org must // not be nil. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/orgs#create-an-organization +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/orgs#create-an-organization // //meta:operation POST /admin/organizations func (s *AdminService) CreateOrg(ctx context.Context, org *Organization, admin string) (*Organization, *Response, error) { @@ -61,7 +61,7 @@ type RenameOrgResponse struct { // RenameOrg renames an organization in GitHub Enterprise. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/orgs#update-an-organization-name +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/orgs#update-an-organization-name // //meta:operation PATCH /admin/organizations/{org} func (s *AdminService) RenameOrg(ctx context.Context, org *Organization, newName string) (*RenameOrgResponse, *Response, error) { @@ -70,7 +70,7 @@ func (s *AdminService) RenameOrg(ctx context.Context, org *Organization, newName // RenameOrgByName renames an organization in GitHub Enterprise using its current name. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/orgs#update-an-organization-name +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/orgs#update-an-organization-name // //meta:operation PATCH /admin/organizations/{org} func (s *AdminService) RenameOrgByName(ctx context.Context, org, newName string) (*RenameOrgResponse, *Response, error) { diff --git a/vendor/github.com/google/go-github/v69/github/admin_stats.go b/vendor/github.com/google/go-github/v71/github/admin_stats.go similarity index 98% rename from vendor/github.com/google/go-github/v69/github/admin_stats.go rename to vendor/github.com/google/go-github/v71/github/admin_stats.go index a6e406b..bdf51a6 100644 --- a/vendor/github.com/google/go-github/v69/github/admin_stats.go +++ b/vendor/github.com/google/go-github/v71/github/admin_stats.go @@ -152,7 +152,7 @@ func (s RepoStats) String() string { // Please note that this is only available to site administrators, // otherwise it will error with a 404 not found (instead of 401 or 403). // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/admin-stats#get-all-statistics +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/admin-stats#get-all-statistics // //meta:operation GET /enterprise/stats/all func (s *AdminService) GetAdminStats(ctx context.Context) (*AdminStats, *Response, error) { diff --git a/vendor/github.com/google/go-github/v69/github/admin_users.go b/vendor/github.com/google/go-github/v71/github/admin_users.go similarity index 94% rename from vendor/github.com/google/go-github/v69/github/admin_users.go rename to vendor/github.com/google/go-github/v71/github/admin_users.go index 6877cef..70a7b30 100644 --- a/vendor/github.com/google/go-github/v69/github/admin_users.go +++ b/vendor/github.com/google/go-github/v71/github/admin_users.go @@ -20,7 +20,7 @@ type CreateUserRequest struct { // CreateUser creates a new user in GitHub Enterprise. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/users#create-a-user +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/users#create-a-user // //meta:operation POST /admin/users func (s *AdminService) CreateUser(ctx context.Context, userReq CreateUserRequest) (*User, *Response, error) { @@ -42,7 +42,7 @@ func (s *AdminService) CreateUser(ctx context.Context, userReq CreateUserRequest // DeleteUser deletes a user in GitHub Enterprise. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/users#delete-a-user +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/users#delete-a-user // //meta:operation DELETE /admin/users/{username} func (s *AdminService) DeleteUser(ctx context.Context, username string) (*Response, error) { @@ -95,7 +95,7 @@ type UserAuthorization struct { // CreateUserImpersonation creates an impersonation OAuth token. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/users#create-an-impersonation-oauth-token +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/users#create-an-impersonation-oauth-token // //meta:operation POST /admin/users/{username}/authorizations func (s *AdminService) CreateUserImpersonation(ctx context.Context, username string, opts *ImpersonateUserOptions) (*UserAuthorization, *Response, error) { @@ -117,7 +117,7 @@ func (s *AdminService) CreateUserImpersonation(ctx context.Context, username str // DeleteUserImpersonation deletes an impersonation OAuth token. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/users#delete-an-impersonation-oauth-token +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/users#delete-an-impersonation-oauth-token // //meta:operation DELETE /admin/users/{username}/authorizations func (s *AdminService) DeleteUserImpersonation(ctx context.Context, username string) (*Response, error) { diff --git a/vendor/github.com/google/go-github/v69/github/apps.go b/vendor/github.com/google/go-github/v71/github/apps.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/apps.go rename to vendor/github.com/google/go-github/v71/github/apps.go diff --git a/vendor/github.com/google/go-github/v69/github/apps_hooks.go b/vendor/github.com/google/go-github/v71/github/apps_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/apps_hooks.go rename to vendor/github.com/google/go-github/v71/github/apps_hooks.go diff --git a/vendor/github.com/google/go-github/v69/github/apps_hooks_deliveries.go b/vendor/github.com/google/go-github/v71/github/apps_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/apps_hooks_deliveries.go rename to vendor/github.com/google/go-github/v71/github/apps_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v69/github/apps_installation.go b/vendor/github.com/google/go-github/v71/github/apps_installation.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/apps_installation.go rename to vendor/github.com/google/go-github/v71/github/apps_installation.go diff --git a/vendor/github.com/google/go-github/v69/github/apps_manifest.go b/vendor/github.com/google/go-github/v71/github/apps_manifest.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/apps_manifest.go rename to vendor/github.com/google/go-github/v71/github/apps_manifest.go diff --git a/vendor/github.com/google/go-github/v69/github/apps_marketplace.go b/vendor/github.com/google/go-github/v71/github/apps_marketplace.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/apps_marketplace.go rename to vendor/github.com/google/go-github/v71/github/apps_marketplace.go diff --git a/vendor/github.com/google/go-github/v69/github/attestations.go b/vendor/github.com/google/go-github/v71/github/attestations.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/attestations.go rename to vendor/github.com/google/go-github/v71/github/attestations.go diff --git a/vendor/github.com/google/go-github/v69/github/authorizations.go b/vendor/github.com/google/go-github/v71/github/authorizations.go similarity index 98% rename from vendor/github.com/google/go-github/v69/github/authorizations.go rename to vendor/github.com/google/go-github/v71/github/authorizations.go index 8b8a67d..7db4555 100644 --- a/vendor/github.com/google/go-github/v69/github/authorizations.go +++ b/vendor/github.com/google/go-github/v71/github/authorizations.go @@ -257,7 +257,7 @@ func (s *AuthorizationsService) DeleteGrant(ctx context.Context, clientID, acces // you can e.g. create or delete a user's public SSH key. NOTE: creating a // new token automatically revokes an existing one. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/users#create-an-impersonation-oauth-token +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/users#create-an-impersonation-oauth-token // //meta:operation POST /admin/users/{username}/authorizations func (s *AuthorizationsService) CreateImpersonation(ctx context.Context, username string, authReq *AuthorizationRequest) (*Authorization, *Response, error) { @@ -279,7 +279,7 @@ func (s *AuthorizationsService) CreateImpersonation(ctx context.Context, usernam // // NOTE: there can be only one at a time. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/users#delete-an-impersonation-oauth-token +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/users#delete-an-impersonation-oauth-token // //meta:operation DELETE /admin/users/{username}/authorizations func (s *AuthorizationsService) DeleteImpersonation(ctx context.Context, username string) (*Response, error) { diff --git a/vendor/github.com/google/go-github/v69/github/billing.go b/vendor/github.com/google/go-github/v71/github/billing.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/billing.go rename to vendor/github.com/google/go-github/v71/github/billing.go diff --git a/vendor/github.com/google/go-github/v69/github/checks.go b/vendor/github.com/google/go-github/v71/github/checks.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/checks.go rename to vendor/github.com/google/go-github/v71/github/checks.go diff --git a/vendor/github.com/google/go-github/v69/github/code_scanning.go b/vendor/github.com/google/go-github/v71/github/code_scanning.go similarity index 98% rename from vendor/github.com/google/go-github/v69/github/code_scanning.go rename to vendor/github.com/google/go-github/v71/github/code_scanning.go index bd11f00..19a8824 100644 --- a/vendor/github.com/google/go-github/v69/github/code_scanning.go +++ b/vendor/github.com/google/go-github/v71/github/code_scanning.go @@ -141,6 +141,15 @@ type AlertListOptions struct { // The name of a code scanning tool. Only results by this tool will be listed. ToolName string `url:"tool_name,omitempty"` + // The GUID of a code scanning tool. Only results by this tool will be listed. + ToolGUID string `url:"tool_guid,omitempty"` + + // The direction to sort the results by. Possible values are: asc, desc. Default: desc. + Direction string `url:"direction,omitempty"` + + // The property by which to sort the results. Possible values are: created, updated. Default: created. + Sort string `url:"sort,omitempty"` + ListCursorOptions // Add ListOptions so offset pagination with integer type "page" query parameter is accepted diff --git a/vendor/github.com/google/go-github/v69/github/codesofconduct.go b/vendor/github.com/google/go-github/v71/github/codesofconduct.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/codesofconduct.go rename to vendor/github.com/google/go-github/v71/github/codesofconduct.go diff --git a/vendor/github.com/google/go-github/v69/github/codespaces.go b/vendor/github.com/google/go-github/v71/github/codespaces.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/codespaces.go rename to vendor/github.com/google/go-github/v71/github/codespaces.go diff --git a/vendor/github.com/google/go-github/v69/github/codespaces_secrets.go b/vendor/github.com/google/go-github/v71/github/codespaces_secrets.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/codespaces_secrets.go rename to vendor/github.com/google/go-github/v71/github/codespaces_secrets.go diff --git a/vendor/github.com/google/go-github/v69/github/copilot.go b/vendor/github.com/google/go-github/v71/github/copilot.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/copilot.go rename to vendor/github.com/google/go-github/v71/github/copilot.go diff --git a/vendor/github.com/google/go-github/v69/github/dependabot.go b/vendor/github.com/google/go-github/v71/github/dependabot.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/dependabot.go rename to vendor/github.com/google/go-github/v71/github/dependabot.go diff --git a/vendor/github.com/google/go-github/v69/github/dependabot_alerts.go b/vendor/github.com/google/go-github/v71/github/dependabot_alerts.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/dependabot_alerts.go rename to vendor/github.com/google/go-github/v71/github/dependabot_alerts.go diff --git a/vendor/github.com/google/go-github/v69/github/dependabot_secrets.go b/vendor/github.com/google/go-github/v71/github/dependabot_secrets.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/dependabot_secrets.go rename to vendor/github.com/google/go-github/v71/github/dependabot_secrets.go diff --git a/vendor/github.com/google/go-github/v69/github/dependency_graph.go b/vendor/github.com/google/go-github/v71/github/dependency_graph.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/dependency_graph.go rename to vendor/github.com/google/go-github/v71/github/dependency_graph.go diff --git a/vendor/github.com/google/go-github/v69/github/dependency_graph_snapshots.go b/vendor/github.com/google/go-github/v71/github/dependency_graph_snapshots.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/dependency_graph_snapshots.go rename to vendor/github.com/google/go-github/v71/github/dependency_graph_snapshots.go diff --git a/vendor/github.com/google/go-github/v69/github/doc.go b/vendor/github.com/google/go-github/v71/github/doc.go similarity index 89% rename from vendor/github.com/google/go-github/v69/github/doc.go rename to vendor/github.com/google/go-github/v71/github/doc.go index 4deb94c..b963051 100644 --- a/vendor/github.com/google/go-github/v69/github/doc.go +++ b/vendor/github.com/google/go-github/v71/github/doc.go @@ -8,7 +8,7 @@ Package github provides a client for using the GitHub API. Usage: - import "github.com/google/go-github/v69/github" // with go modules enabled (GO111MODULE=on or outside GOPATH) + import "github.com/google/go-github/v71/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 @@ -138,11 +138,17 @@ To detect this condition of error, you can check if its type is # Conditional Requests -The GitHub API has good support for conditional requests which will help -prevent you from burning through your rate limit, as well as help speed up your -application. go-github does not handle conditional requests directly, but is -instead designed to work with a caching http.Transport. We recommend using -https://github.com/gregjones/httpcache for that. +The GitHub REST API has good support for conditional HTTP requests +via the ETag header which will help prevent you from burning through your +rate limit, as well as help speed up your application. go-github does not +handle conditional requests directly, but is instead designed to work with a +caching http.Transport. + +Typically, an RFC 7234 compliant HTTP cache such as https://github.com/gregjones/httpcache +is recommended. Alternatively, the https://github.com/bored-engineer/github-conditional-http-transport +package relies on (undocumented) GitHub specific cache logic and is +recommended when making requests using short-lived credentials such as a +GitHub App installation token. Learn more about GitHub conditional requests at https://docs.github.com/rest/overview/resources-in-the-rest-api#conditional-requests. diff --git a/vendor/github.com/google/go-github/v69/github/emojis.go b/vendor/github.com/google/go-github/v71/github/emojis.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/emojis.go rename to vendor/github.com/google/go-github/v71/github/emojis.go diff --git a/vendor/github.com/google/go-github/v69/github/enterprise.go b/vendor/github.com/google/go-github/v71/github/enterprise.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/enterprise.go rename to vendor/github.com/google/go-github/v71/github/enterprise.go diff --git a/vendor/github.com/google/go-github/v71/github/enterprise_actions_hosted_runners.go b/vendor/github.com/google/go-github/v71/github/enterprise_actions_hosted_runners.go new file mode 100644 index 0000000..e82ba9b --- /dev/null +++ b/vendor/github.com/google/go-github/v71/github/enterprise_actions_hosted_runners.go @@ -0,0 +1,234 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "fmt" +) + +// ListHostedRunners lists all the GitHub-hosted runners for an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/hosted-runners#list-github-hosted-runners-for-an-enterprise +// +//meta:operation GET /enterprises/{enterprise}/actions/hosted-runners +func (s *EnterpriseService) ListHostedRunners(ctx context.Context, enterprise string, opts *ListOptions) (*HostedRunners, *Response, error) { + u := fmt.Sprintf("enterprises/%v/actions/hosted-runners", enterprise) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + runners := &HostedRunners{} + resp, err := s.client.Do(ctx, req, &runners) + if err != nil { + return nil, resp, err + } + + return runners, resp, nil +} + +// CreateHostedRunner creates a GitHub-hosted runner for an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/hosted-runners#create-a-github-hosted-runner-for-an-enterprise +// +//meta:operation POST /enterprises/{enterprise}/actions/hosted-runners +func (s *EnterpriseService) CreateHostedRunner(ctx context.Context, enterprise string, request *HostedRunnerRequest) (*HostedRunner, *Response, error) { + if err := validateCreateHostedRunnerRequest(request); err != nil { + return nil, nil, fmt.Errorf("validation failed: %w", err) + } + + u := fmt.Sprintf("enterprises/%v/actions/hosted-runners", enterprise) + req, err := s.client.NewRequest("POST", u, request) + if err != nil { + return nil, nil, err + } + + hostedRunner := new(HostedRunner) + resp, err := s.client.Do(ctx, req, hostedRunner) + if err != nil { + return nil, resp, err + } + + return hostedRunner, resp, nil +} + +// GetHostedRunnerGitHubOwnedImages gets the list of GitHub-owned images available for GitHub-hosted runners for an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/hosted-runners#get-github-owned-images-for-github-hosted-runners-in-an-enterprise +// +//meta:operation GET /enterprises/{enterprise}/actions/hosted-runners/images/github-owned +func (s *EnterpriseService) GetHostedRunnerGitHubOwnedImages(ctx context.Context, enterprise string) (*HostedRunnerImages, *Response, error) { + u := fmt.Sprintf("enterprises/%v/actions/hosted-runners/images/github-owned", enterprise) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + hostedRunnerImages := new(HostedRunnerImages) + resp, err := s.client.Do(ctx, req, hostedRunnerImages) + if err != nil { + return nil, resp, err + } + + return hostedRunnerImages, resp, nil +} + +// GetHostedRunnerPartnerImages gets the list of partner images available for GitHub-hosted runners for an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/hosted-runners#get-partner-images-for-github-hosted-runners-in-an-enterprise +// +//meta:operation GET /enterprises/{enterprise}/actions/hosted-runners/images/partner +func (s *EnterpriseService) GetHostedRunnerPartnerImages(ctx context.Context, enterprise string) (*HostedRunnerImages, *Response, error) { + u := fmt.Sprintf("enterprises/%v/actions/hosted-runners/images/partner", enterprise) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + hostedRunnerImages := new(HostedRunnerImages) + resp, err := s.client.Do(ctx, req, hostedRunnerImages) + if err != nil { + return nil, resp, err + } + + return hostedRunnerImages, resp, nil +} + +// GetHostedRunnerLimits gets the GitHub-hosted runners Static public IP Limits for an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/hosted-runners#get-limits-on-github-hosted-runners-for-an-enterprise +// +//meta:operation GET /enterprises/{enterprise}/actions/hosted-runners/limits +func (s *EnterpriseService) GetHostedRunnerLimits(ctx context.Context, enterprise string) (*HostedRunnerPublicIPLimits, *Response, error) { + u := fmt.Sprintf("enterprises/%v/actions/hosted-runners/limits", enterprise) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + publicIPLimits := new(HostedRunnerPublicIPLimits) + resp, err := s.client.Do(ctx, req, publicIPLimits) + if err != nil { + return nil, resp, err + } + + return publicIPLimits, resp, nil +} + +// GetHostedRunnerMachineSpecs gets the list of machine specs available for GitHub-hosted runners for an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/hosted-runners#get-github-hosted-runners-machine-specs-for-an-enterprise +// +//meta:operation GET /enterprises/{enterprise}/actions/hosted-runners/machine-sizes +func (s *EnterpriseService) GetHostedRunnerMachineSpecs(ctx context.Context, enterprise string) (*HostedRunnerMachineSpecs, *Response, error) { + u := fmt.Sprintf("enterprises/%v/actions/hosted-runners/machine-sizes", enterprise) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + machineSpecs := new(HostedRunnerMachineSpecs) + resp, err := s.client.Do(ctx, req, machineSpecs) + if err != nil { + return nil, resp, err + } + + return machineSpecs, resp, nil +} + +// GetHostedRunnerPlatforms gets list of platforms available for GitHub-hosted runners for an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/hosted-runners#get-platforms-for-github-hosted-runners-in-an-enterprise +// +//meta:operation GET /enterprises/{enterprise}/actions/hosted-runners/platforms +func (s *EnterpriseService) GetHostedRunnerPlatforms(ctx context.Context, enterprise string) (*HostedRunnerPlatforms, *Response, error) { + u := fmt.Sprintf("enterprises/%v/actions/hosted-runners/platforms", enterprise) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + platforms := new(HostedRunnerPlatforms) + resp, err := s.client.Do(ctx, req, platforms) + if err != nil { + return nil, resp, err + } + + return platforms, resp, nil +} + +// GetHostedRunner gets a GitHub-hosted runner in an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/hosted-runners#get-a-github-hosted-runner-for-an-enterprise +// +//meta:operation GET /enterprises/{enterprise}/actions/hosted-runners/{hosted_runner_id} +func (s *EnterpriseService) GetHostedRunner(ctx context.Context, enterprise string, runnerID int64) (*HostedRunner, *Response, error) { + u := fmt.Sprintf("enterprises/%v/actions/hosted-runners/%v", enterprise, runnerID) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + hostedRunner := new(HostedRunner) + resp, err := s.client.Do(ctx, req, hostedRunner) + if err != nil { + return nil, resp, err + } + + return hostedRunner, resp, nil +} + +// UpdateHostedRunner updates a GitHub-hosted runner for an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/hosted-runners#update-a-github-hosted-runner-for-an-enterprise +// +//meta:operation PATCH /enterprises/{enterprise}/actions/hosted-runners/{hosted_runner_id} +func (s *EnterpriseService) UpdateHostedRunner(ctx context.Context, enterprise string, runnerID int64, updateReq HostedRunnerRequest) (*HostedRunner, *Response, error) { + if err := validateUpdateHostedRunnerRequest(&updateReq); err != nil { + return nil, nil, fmt.Errorf("validation failed: %w", err) + } + + u := fmt.Sprintf("enterprises/%v/actions/hosted-runners/%v", enterprise, runnerID) + req, err := s.client.NewRequest("PATCH", u, updateReq) + if err != nil { + return nil, nil, err + } + + hostedRunner := new(HostedRunner) + resp, err := s.client.Do(ctx, req, hostedRunner) + if err != nil { + return nil, resp, err + } + + return hostedRunner, resp, nil +} + +// DeleteHostedRunner deletes GitHub-hosted runner from an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/hosted-runners#delete-a-github-hosted-runner-for-an-enterprise +// +//meta:operation DELETE /enterprises/{enterprise}/actions/hosted-runners/{hosted_runner_id} +func (s *EnterpriseService) DeleteHostedRunner(ctx context.Context, enterprise string, runnerID int64) (*HostedRunner, *Response, error) { + u := fmt.Sprintf("enterprises/%v/actions/hosted-runners/%v", enterprise, runnerID) + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, nil, err + } + + hostedRunner := new(HostedRunner) + resp, err := s.client.Do(ctx, req, hostedRunner) + if err != nil { + return nil, resp, err + } + + return hostedRunner, resp, nil +} diff --git a/vendor/github.com/google/go-github/v69/github/enterprise_actions_runner_groups.go b/vendor/github.com/google/go-github/v71/github/enterprise_actions_runner_groups.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/enterprise_actions_runner_groups.go rename to vendor/github.com/google/go-github/v71/github/enterprise_actions_runner_groups.go diff --git a/vendor/github.com/google/go-github/v69/github/enterprise_actions_runners.go b/vendor/github.com/google/go-github/v71/github/enterprise_actions_runners.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/enterprise_actions_runners.go rename to vendor/github.com/google/go-github/v71/github/enterprise_actions_runners.go diff --git a/vendor/github.com/google/go-github/v69/github/enterprise_audit_log.go b/vendor/github.com/google/go-github/v71/github/enterprise_audit_log.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/enterprise_audit_log.go rename to vendor/github.com/google/go-github/v71/github/enterprise_audit_log.go diff --git a/vendor/github.com/google/go-github/v69/github/enterprise_code_security_and_analysis.go b/vendor/github.com/google/go-github/v71/github/enterprise_code_security_and_analysis.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/enterprise_code_security_and_analysis.go rename to vendor/github.com/google/go-github/v71/github/enterprise_code_security_and_analysis.go diff --git a/vendor/github.com/google/go-github/v69/github/enterprise_manage_ghes.go b/vendor/github.com/google/go-github/v71/github/enterprise_manage_ghes.go similarity index 95% rename from vendor/github.com/google/go-github/v69/github/enterprise_manage_ghes.go rename to vendor/github.com/google/go-github/v71/github/enterprise_manage_ghes.go index e14836e..a796791 100644 --- a/vendor/github.com/google/go-github/v69/github/enterprise_manage_ghes.go +++ b/vendor/github.com/google/go-github/v71/github/enterprise_manage_ghes.go @@ -74,7 +74,7 @@ type ReleaseVersion struct { // CheckSystemRequirements checks if GHES system nodes meet the system requirements. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-the-system-requirement-check-results-for-configured-cluster-nodes +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#get-the-system-requirement-check-results-for-configured-cluster-nodes // //meta:operation GET /manage/v1/checks/system-requirements func (s *EnterpriseService) CheckSystemRequirements(ctx context.Context) (*SystemRequirements, *Response, error) { @@ -95,7 +95,7 @@ func (s *EnterpriseService) CheckSystemRequirements(ctx context.Context) (*Syste // ClusterStatus gets the status of all services running on each cluster node. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-the-status-of-services-running-on-all-cluster-nodes +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#get-the-status-of-services-running-on-all-cluster-nodes // //meta:operation GET /manage/v1/cluster/status func (s *EnterpriseService) ClusterStatus(ctx context.Context) (*ClusterStatus, *Response, error) { @@ -116,7 +116,7 @@ func (s *EnterpriseService) ClusterStatus(ctx context.Context) (*ClusterStatus, // ReplicationStatus gets the status of all services running on each replica node. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-the-status-of-services-running-on-all-replica-nodes +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#get-the-status-of-services-running-on-all-replica-nodes // //meta:operation GET /manage/v1/replication/status func (s *EnterpriseService) ReplicationStatus(ctx context.Context, opts *NodeQueryOptions) (*ClusterStatus, *Response, error) { @@ -140,7 +140,7 @@ func (s *EnterpriseService) ReplicationStatus(ctx context.Context, opts *NodeQue // GetNodeReleaseVersions gets the version information deployed to each node. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-all-ghes-release-versions-for-all-nodes +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#get-all-ghes-release-versions-for-all-nodes // //meta:operation GET /manage/v1/version func (s *EnterpriseService) GetNodeReleaseVersions(ctx context.Context, opts *NodeQueryOptions) ([]*NodeReleaseVersion, *Response, error) { diff --git a/vendor/github.com/google/go-github/v69/github/enterprise_manage_ghes_config.go b/vendor/github.com/google/go-github/v71/github/enterprise_manage_ghes_config.go similarity index 97% rename from vendor/github.com/google/go-github/v69/github/enterprise_manage_ghes_config.go rename to vendor/github.com/google/go-github/v71/github/enterprise_manage_ghes_config.go index 10fb859..d675aec 100644 --- a/vendor/github.com/google/go-github/v69/github/enterprise_manage_ghes_config.go +++ b/vendor/github.com/google/go-github/v71/github/enterprise_manage_ghes_config.go @@ -305,7 +305,7 @@ type NodeDetails struct { // ConfigApplyEvents gets events from the command ghe-config-apply. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#list-events-from-ghe-config-apply +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#list-events-from-ghe-config-apply // //meta:operation GET /manage/v1/config/apply/events func (s *EnterpriseService) ConfigApplyEvents(ctx context.Context, opts *ConfigApplyEventsOptions) (*ConfigApplyEvents, *Response, error) { @@ -330,7 +330,7 @@ func (s *EnterpriseService) ConfigApplyEvents(ctx context.Context, opts *ConfigA // InitialConfig initializes the GitHub Enterprise instance with a license and password. // After initializing the instance, you need to run an apply to apply the configuration. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#initialize-instance-configuration-with-license-and-password +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#initialize-instance-configuration-with-license-and-password // //meta:operation POST /manage/v1/config/init func (s *EnterpriseService) InitialConfig(ctx context.Context, license, password string) (*Response, error) { @@ -351,7 +351,7 @@ func (s *EnterpriseService) InitialConfig(ctx context.Context, license, password // License gets the current license information for the GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-the-enterprise-license-information +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#get-the-enterprise-license-information // //meta:operation GET /manage/v1/config/license func (s *EnterpriseService) License(ctx context.Context) ([]*LicenseStatus, *Response, error) { @@ -372,7 +372,7 @@ func (s *EnterpriseService) License(ctx context.Context) ([]*LicenseStatus, *Res // UploadLicense uploads a new license to the GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#upload-an-enterprise-license +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#upload-an-enterprise-license // //meta:operation PUT /manage/v1/config/license func (s *EnterpriseService) UploadLicense(ctx context.Context, license string) (*Response, error) { @@ -390,7 +390,7 @@ func (s *EnterpriseService) UploadLicense(ctx context.Context, license string) ( // LicenseStatus gets the current license status for the GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#check-a-license +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#check-a-license // //meta:operation GET /manage/v1/config/license/check func (s *EnterpriseService) LicenseStatus(ctx context.Context) ([]*LicenseCheck, *Response, error) { @@ -412,7 +412,7 @@ func (s *EnterpriseService) LicenseStatus(ctx context.Context) ([]*LicenseCheck, // NodeMetadata gets the metadata for all nodes in the GitHub Enterprise instance. // This is required for clustered setups. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-ghes-node-metadata-for-all-nodes +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#get-ghes-node-metadata-for-all-nodes // //meta:operation GET /manage/v1/config/nodes func (s *EnterpriseService) NodeMetadata(ctx context.Context, opts *NodeQueryOptions) (*NodeMetadataStatus, *Response, error) { @@ -436,7 +436,7 @@ func (s *EnterpriseService) NodeMetadata(ctx context.Context, opts *NodeQueryOpt // Settings gets the current configuration settings for the GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-the-ghes-settings +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#get-the-ghes-settings // //meta:operation GET /manage/v1/config/settings func (s *EnterpriseService) Settings(ctx context.Context) (*ConfigSettings, *Response, error) { @@ -457,7 +457,7 @@ func (s *EnterpriseService) Settings(ctx context.Context) (*ConfigSettings, *Res // UpdateSettings updates the configuration settings for the GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#set-settings +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#set-settings // //meta:operation PUT /manage/v1/config/settings func (s *EnterpriseService) UpdateSettings(ctx context.Context, opts *ConfigSettings) (*Response, error) { @@ -476,7 +476,7 @@ func (s *EnterpriseService) UpdateSettings(ctx context.Context, opts *ConfigSett // ConfigApply triggers a configuration apply run on the GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#trigger-a-ghe-config-apply-run +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#trigger-a-ghe-config-apply-run // //meta:operation POST /manage/v1/config/apply func (s *EnterpriseService) ConfigApply(ctx context.Context, opts *ConfigApplyOptions) (*ConfigApplyOptions, *Response, error) { @@ -497,7 +497,7 @@ func (s *EnterpriseService) ConfigApply(ctx context.Context, opts *ConfigApplyOp // ConfigApplyStatus gets the status of a ghe-config-apply run on the GitHub Enterprise instance. // You can request lat one or specific id one. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-the-status-of-a-ghe-config-apply-run +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#get-the-status-of-a-ghe-config-apply-run // //meta:operation GET /manage/v1/config/apply func (s *EnterpriseService) ConfigApplyStatus(ctx context.Context, opts *ConfigApplyOptions) (*ConfigApplyStatus, *Response, error) { diff --git a/vendor/github.com/google/go-github/v69/github/enterprise_manage_ghes_maintenance.go b/vendor/github.com/google/go-github/v71/github/enterprise_manage_ghes_maintenance.go similarity index 96% rename from vendor/github.com/google/go-github/v69/github/enterprise_manage_ghes_maintenance.go rename to vendor/github.com/google/go-github/v71/github/enterprise_manage_ghes_maintenance.go index 3b1de92..2d7e76b 100644 --- a/vendor/github.com/google/go-github/v69/github/enterprise_manage_ghes_maintenance.go +++ b/vendor/github.com/google/go-github/v71/github/enterprise_manage_ghes_maintenance.go @@ -46,7 +46,7 @@ type MaintenanceOptions struct { // GetMaintenanceStatus gets the status of maintenance mode for all nodes. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-the-status-of-maintenance-mode +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#get-the-status-of-maintenance-mode // //meta:operation GET /manage/v1/maintenance func (s *EnterpriseService) GetMaintenanceStatus(ctx context.Context, opts *NodeQueryOptions) ([]*MaintenanceStatus, *Response, error) { @@ -71,7 +71,7 @@ func (s *EnterpriseService) GetMaintenanceStatus(ctx context.Context, opts *Node // CreateMaintenance sets the maintenance mode for the instance. // With the enable parameter we can control to put instance into maintenance mode or not. With false we can disable the maintenance mode. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#set-the-status-of-maintenance-mode +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#set-the-status-of-maintenance-mode // //meta:operation POST /manage/v1/maintenance func (s *EnterpriseService) CreateMaintenance(ctx context.Context, enable bool, opts *MaintenanceOptions) ([]*MaintenanceOperationStatus, *Response, error) { diff --git a/vendor/github.com/google/go-github/v69/github/enterprise_manage_ghes_ssh.go b/vendor/github.com/google/go-github/v71/github/enterprise_manage_ghes_ssh.go similarity index 93% rename from vendor/github.com/google/go-github/v69/github/enterprise_manage_ghes_ssh.go rename to vendor/github.com/google/go-github/v71/github/enterprise_manage_ghes_ssh.go index 77d2521..e1f20a5 100644 --- a/vendor/github.com/google/go-github/v69/github/enterprise_manage_ghes_ssh.go +++ b/vendor/github.com/google/go-github/v71/github/enterprise_manage_ghes_ssh.go @@ -31,7 +31,7 @@ type ClusterSSHKey struct { // DeleteSSHKey deletes the SSH key from the instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#delete-a-ssh-key +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#delete-a-ssh-key // //meta:operation DELETE /manage/v1/access/ssh func (s *EnterpriseService) DeleteSSHKey(ctx context.Context, key string) ([]*SSHKeyStatus, *Response, error) { @@ -55,7 +55,7 @@ func (s *EnterpriseService) DeleteSSHKey(ctx context.Context, key string) ([]*SS // GetSSHKey gets the SSH keys configured for the instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-the-configured-ssh-keys +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#get-the-configured-ssh-keys // //meta:operation GET /manage/v1/access/ssh func (s *EnterpriseService) GetSSHKey(ctx context.Context) ([]*ClusterSSHKey, *Response, error) { @@ -76,7 +76,7 @@ func (s *EnterpriseService) GetSSHKey(ctx context.Context) ([]*ClusterSSHKey, *R // CreateSSHKey adds a new SSH key to the instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#set-a-new-ssh-key +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/manage-ghes#set-a-new-ssh-key // //meta:operation POST /manage/v1/access/ssh func (s *EnterpriseService) CreateSSHKey(ctx context.Context, key string) ([]*SSHKeyStatus, *Response, error) { diff --git a/vendor/github.com/google/go-github/v71/github/enterprise_network_configurations.go b/vendor/github.com/google/go-github/v71/github/enterprise_network_configurations.go new file mode 100644 index 0000000..a6a690d --- /dev/null +++ b/vendor/github.com/google/go-github/v71/github/enterprise_network_configurations.go @@ -0,0 +1,139 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "fmt" +) + +// ListEnterpriseNetworkConfigurations lists all hosted compute network configurations configured in an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/network-configurations#list-hosted-compute-network-configurations-for-an-enterprise +// +//meta:operation GET /enterprises/{enterprise}/network-configurations +func (s *EnterpriseService) ListEnterpriseNetworkConfigurations(ctx context.Context, enterprise string, opts *ListOptions) (*NetworkConfigurations, *Response, error) { + u := fmt.Sprintf("enterprises/%v/network-configurations", enterprise) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + networks := &NetworkConfigurations{} + resp, err := s.client.Do(ctx, req, networks) + if err != nil { + return nil, resp, err + } + return networks, resp, nil +} + +// CreateEnterpriseNetworkConfiguration creates a hosted compute network configuration for an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/network-configurations#create-a-hosted-compute-network-configuration-for-an-enterprise +// +//meta:operation POST /enterprises/{enterprise}/network-configurations +func (s *EnterpriseService) CreateEnterpriseNetworkConfiguration(ctx context.Context, enterprise string, createReq NetworkConfigurationRequest) (*NetworkConfiguration, *Response, error) { + if err := validateNetworkConfigurationRequest(createReq); err != nil { + return nil, nil, fmt.Errorf("validation failed: %w", err) + } + + u := fmt.Sprintf("enterprises/%v/network-configurations", enterprise) + req, err := s.client.NewRequest("POST", u, createReq) + if err != nil { + return nil, nil, err + } + + network := &NetworkConfiguration{} + resp, err := s.client.Do(ctx, req, network) + if err != nil { + return nil, resp, err + } + + return network, resp, nil +} + +// GetEnterpriseNetworkConfiguration gets a hosted compute network configuration configured in an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/network-configurations#get-a-hosted-compute-network-configuration-for-an-enterprise +// +//meta:operation GET /enterprises/{enterprise}/network-configurations/{network_configuration_id} +func (s *EnterpriseService) GetEnterpriseNetworkConfiguration(ctx context.Context, enterprise, networkID string) (*NetworkConfiguration, *Response, error) { + u := fmt.Sprintf("enterprises/%v/network-configurations/%v", enterprise, networkID) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + network := &NetworkConfiguration{} + resp, err := s.client.Do(ctx, req, network) + if err != nil { + return nil, resp, err + } + return network, resp, nil +} + +// UpdateEnterpriseNetworkConfiguration updates a hosted compute network configuration for an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/network-configurations#update-a-hosted-compute-network-configuration-for-an-enterprise +// +//meta:operation PATCH /enterprises/{enterprise}/network-configurations/{network_configuration_id} +func (s *EnterpriseService) UpdateEnterpriseNetworkConfiguration(ctx context.Context, enterprise, networkID string, updateReq NetworkConfigurationRequest) (*NetworkConfiguration, *Response, error) { + if err := validateNetworkConfigurationRequest(updateReq); err != nil { + return nil, nil, fmt.Errorf("validation failed: %w", err) + } + + u := fmt.Sprintf("enterprises/%v/network-configurations/%v", enterprise, networkID) + req, err := s.client.NewRequest("PATCH", u, updateReq) + if err != nil { + return nil, nil, err + } + + network := &NetworkConfiguration{} + resp, err := s.client.Do(ctx, req, network) + if err != nil { + return nil, resp, err + } + return network, resp, nil +} + +// DeleteEnterpriseNetworkConfiguration deletes a hosted compute network configuration from an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/network-configurations#delete-a-hosted-compute-network-configuration-from-an-enterprise +// +//meta:operation DELETE /enterprises/{enterprise}/network-configurations/{network_configuration_id} +func (s *EnterpriseService) DeleteEnterpriseNetworkConfiguration(ctx context.Context, enterprise, networkID string) (*Response, error) { + u := fmt.Sprintf("enterprises/%v/network-configurations/%v", enterprise, networkID) + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + return s.client.Do(ctx, req, nil) +} + +// GetEnterpriseNetworkSettingsResource gets a hosted compute network settings resource configured for an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/network-configurations#get-a-hosted-compute-network-settings-resource-for-an-enterprise +// +//meta:operation GET /enterprises/{enterprise}/network-settings/{network_settings_id} +func (s *EnterpriseService) GetEnterpriseNetworkSettingsResource(ctx context.Context, enterprise, networkID string) (*NetworkSettingsResource, *Response, error) { + u := fmt.Sprintf("enterprises/%v/network-settings/%v", enterprise, networkID) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + resource := &NetworkSettingsResource{} + resp, err := s.client.Do(ctx, req, resource) + if err != nil { + return nil, resp, err + } + return resource, resp, err +} diff --git a/vendor/github.com/google/go-github/v69/github/enterprise_properties.go b/vendor/github.com/google/go-github/v71/github/enterprise_properties.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/enterprise_properties.go rename to vendor/github.com/google/go-github/v71/github/enterprise_properties.go diff --git a/vendor/github.com/google/go-github/v69/github/enterprise_rules.go b/vendor/github.com/google/go-github/v71/github/enterprise_rules.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/enterprise_rules.go rename to vendor/github.com/google/go-github/v71/github/enterprise_rules.go diff --git a/vendor/github.com/google/go-github/v69/github/event.go b/vendor/github.com/google/go-github/v71/github/event.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/event.go rename to vendor/github.com/google/go-github/v71/github/event.go diff --git a/vendor/github.com/google/go-github/v69/github/event_types.go b/vendor/github.com/google/go-github/v71/github/event_types.go similarity index 99% rename from vendor/github.com/google/go-github/v69/github/event_types.go rename to vendor/github.com/google/go-github/v71/github/event_types.go index 0df3b30..6a6caf1 100644 --- a/vendor/github.com/google/go-github/v69/github/event_types.go +++ b/vendor/github.com/google/go-github/v71/github/event_types.go @@ -858,8 +858,10 @@ type MergeGroup struct { // // GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#merge_group type MergeGroupEvent struct { - // The action that was performed. Currently, can only be checks_requested. + // The action that was performed. Possible values are: "checks_requested", "destroyed". Action *string `json:"action,omitempty"` + // Reason is populated when the action is "destroyed". Possible values: "merged", "invalidated", "dequeued". + Reason *string `json:"reason,omitempty"` // The merge group. MergeGroup *MergeGroup `json:"merge_group,omitempty"` diff --git a/vendor/github.com/google/go-github/v69/github/gists.go b/vendor/github.com/google/go-github/v71/github/gists.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/gists.go rename to vendor/github.com/google/go-github/v71/github/gists.go diff --git a/vendor/github.com/google/go-github/v69/github/gists_comments.go b/vendor/github.com/google/go-github/v71/github/gists_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/gists_comments.go rename to vendor/github.com/google/go-github/v71/github/gists_comments.go diff --git a/vendor/github.com/google/go-github/v69/github/git.go b/vendor/github.com/google/go-github/v71/github/git.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/git.go rename to vendor/github.com/google/go-github/v71/github/git.go diff --git a/vendor/github.com/google/go-github/v69/github/git_blobs.go b/vendor/github.com/google/go-github/v71/github/git_blobs.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/git_blobs.go rename to vendor/github.com/google/go-github/v71/github/git_blobs.go diff --git a/vendor/github.com/google/go-github/v69/github/git_commits.go b/vendor/github.com/google/go-github/v71/github/git_commits.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/git_commits.go rename to vendor/github.com/google/go-github/v71/github/git_commits.go diff --git a/vendor/github.com/google/go-github/v69/github/git_refs.go b/vendor/github.com/google/go-github/v71/github/git_refs.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/git_refs.go rename to vendor/github.com/google/go-github/v71/github/git_refs.go diff --git a/vendor/github.com/google/go-github/v69/github/git_tags.go b/vendor/github.com/google/go-github/v71/github/git_tags.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/git_tags.go rename to vendor/github.com/google/go-github/v71/github/git_tags.go diff --git a/vendor/github.com/google/go-github/v69/github/git_trees.go b/vendor/github.com/google/go-github/v71/github/git_trees.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/git_trees.go rename to vendor/github.com/google/go-github/v71/github/git_trees.go diff --git a/vendor/github.com/google/go-github/v69/github/github-accessors.go b/vendor/github.com/google/go-github/v71/github/github-accessors.go similarity index 97% rename from vendor/github.com/google/go-github/v69/github/github-accessors.go rename to vendor/github.com/google/go-github/v71/github/github-accessors.go index 1685959..45fa907 100644 --- a/vendor/github.com/google/go-github/v69/github/github-accessors.go +++ b/vendor/github.com/google/go-github/v71/github/github-accessors.go @@ -5902,6 +5902,30 @@ func (c *CreateOrUpdateCustomRepoRoleOptions) GetName() string { return *c.Name } +// GetColor returns the Color field if it's non-nil, zero value otherwise. +func (c *CreateOrUpdateIssueTypesOptions) GetColor() string { + if c == nil || c.Color == nil { + return "" + } + return *c.Color +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (c *CreateOrUpdateIssueTypesOptions) GetDescription() string { + if c == nil || c.Description == nil { + return "" + } + return *c.Description +} + +// GetIsPrivate returns the IsPrivate field if it's non-nil, zero value otherwise. +func (c *CreateOrUpdateIssueTypesOptions) GetIsPrivate() bool { + if c == nil || c.IsPrivate == nil { + return false + } + return *c.IsPrivate +} + // GetBaseRole returns the BaseRole field if it's non-nil, zero value otherwise. func (c *CreateOrUpdateOrgRoleOptions) GetBaseRole() string { if c == nil || c.BaseRole == nil { @@ -10182,6 +10206,134 @@ func (h *HookStats) GetTotalHooks() int { return *h.TotalHooks } +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (h *HostedRunner) GetID() int64 { + if h == nil || h.ID == nil { + return 0 + } + return *h.ID +} + +// GetImageDetails returns the ImageDetails field. +func (h *HostedRunner) GetImageDetails() *HostedRunnerImageDetail { + if h == nil { + return nil + } + return h.ImageDetails +} + +// GetLastActiveOn returns the LastActiveOn field if it's non-nil, zero value otherwise. +func (h *HostedRunner) GetLastActiveOn() Timestamp { + if h == nil || h.LastActiveOn == nil { + return Timestamp{} + } + return *h.LastActiveOn +} + +// GetMachineSizeDetails returns the MachineSizeDetails field. +func (h *HostedRunner) GetMachineSizeDetails() *HostedRunnerMachineSpec { + if h == nil { + return nil + } + return h.MachineSizeDetails +} + +// GetMaximumRunners returns the MaximumRunners field if it's non-nil, zero value otherwise. +func (h *HostedRunner) GetMaximumRunners() int64 { + if h == nil || h.MaximumRunners == nil { + return 0 + } + return *h.MaximumRunners +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (h *HostedRunner) GetName() string { + if h == nil || h.Name == nil { + return "" + } + return *h.Name +} + +// GetPlatform returns the Platform field if it's non-nil, zero value otherwise. +func (h *HostedRunner) GetPlatform() string { + if h == nil || h.Platform == nil { + return "" + } + return *h.Platform +} + +// GetPublicIPEnabled returns the PublicIPEnabled field if it's non-nil, zero value otherwise. +func (h *HostedRunner) GetPublicIPEnabled() bool { + if h == nil || h.PublicIPEnabled == nil { + return false + } + return *h.PublicIPEnabled +} + +// GetRunnerGroupID returns the RunnerGroupID field if it's non-nil, zero value otherwise. +func (h *HostedRunner) GetRunnerGroupID() int64 { + if h == nil || h.RunnerGroupID == nil { + return 0 + } + return *h.RunnerGroupID +} + +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (h *HostedRunner) GetStatus() string { + if h == nil || h.Status == nil { + return "" + } + return *h.Status +} + +// GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise. +func (h *HostedRunnerImageDetail) GetDisplayName() string { + if h == nil || h.DisplayName == nil { + return "" + } + return *h.DisplayName +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (h *HostedRunnerImageDetail) GetID() string { + if h == nil || h.ID == nil { + return "" + } + return *h.ID +} + +// GetSizeGB returns the SizeGB field if it's non-nil, zero value otherwise. +func (h *HostedRunnerImageDetail) GetSizeGB() int64 { + if h == nil || h.SizeGB == nil { + return 0 + } + return *h.SizeGB +} + +// GetSource returns the Source field if it's non-nil, zero value otherwise. +func (h *HostedRunnerImageDetail) GetSource() string { + if h == nil || h.Source == nil { + return "" + } + return *h.Source +} + +// GetVersion returns the Version field if it's non-nil, zero value otherwise. +func (h *HostedRunnerImageDetail) GetVersion() string { + if h == nil || h.Version == nil { + return "" + } + return *h.Version +} + +// GetPublicIPs returns the PublicIPs field. +func (h *HostedRunnerPublicIPLimits) GetPublicIPs() *PublicIPUsage { + if h == nil { + return nil + } + return h.PublicIPs +} + // GetGroupDescription returns the GroupDescription field if it's non-nil, zero value otherwise. func (i *IDPGroup) GetGroupDescription() string { if i == nil || i.GroupDescription == nil { @@ -14110,6 +14262,14 @@ func (m *MergeGroupEvent) GetOrg() *Organization { return m.Org } +// GetReason returns the Reason field if it's non-nil, zero value otherwise. +func (m *MergeGroupEvent) GetReason() string { + if m == nil || m.Reason == nil { + return "" + } + return *m.Reason +} + // GetRepo returns the Repo field. func (m *MergeGroupEvent) GetRepo() *Repository { if m == nil { @@ -14582,6 +14742,102 @@ func (m *MostRecentInstance) GetState() string { return *m.State } +// GetComputeService returns the ComputeService field. +func (n *NetworkConfiguration) GetComputeService() *ComputeService { + if n == nil { + return nil + } + return n.ComputeService +} + +// GetCreatedOn returns the CreatedOn field if it's non-nil, zero value otherwise. +func (n *NetworkConfiguration) GetCreatedOn() Timestamp { + if n == nil || n.CreatedOn == nil { + return Timestamp{} + } + return *n.CreatedOn +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (n *NetworkConfiguration) GetID() string { + if n == nil || n.ID == nil { + return "" + } + return *n.ID +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (n *NetworkConfiguration) GetName() string { + if n == nil || n.Name == nil { + return "" + } + return *n.Name +} + +// GetComputeService returns the ComputeService field. +func (n *NetworkConfigurationRequest) GetComputeService() *ComputeService { + if n == nil { + return nil + } + return n.ComputeService +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (n *NetworkConfigurationRequest) GetName() string { + if n == nil || n.Name == nil { + return "" + } + return *n.Name +} + +// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. +func (n *NetworkConfigurations) GetTotalCount() int64 { + if n == nil || n.TotalCount == nil { + return 0 + } + return *n.TotalCount +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (n *NetworkSettingsResource) GetID() string { + if n == nil || n.ID == nil { + return "" + } + return *n.ID +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (n *NetworkSettingsResource) GetName() string { + if n == nil || n.Name == nil { + return "" + } + return *n.Name +} + +// GetNetworkConfigurationID returns the NetworkConfigurationID field if it's non-nil, zero value otherwise. +func (n *NetworkSettingsResource) GetNetworkConfigurationID() string { + if n == nil || n.NetworkConfigurationID == nil { + return "" + } + return *n.NetworkConfigurationID +} + +// GetRegion returns the Region field if it's non-nil, zero value otherwise. +func (n *NetworkSettingsResource) GetRegion() string { + if n == nil || n.Region == nil { + return "" + } + return *n.Region +} + +// GetSubnetID returns the SubnetID field if it's non-nil, zero value otherwise. +func (n *NetworkSettingsResource) GetSubnetID() string { + if n == nil || n.SubnetID == nil { + return "" + } + return *n.SubnetID +} + // GetBase returns the Base field if it's non-nil, zero value otherwise. func (n *NewPullRequest) GetBase() string { if n == nil || n.Base == nil { @@ -15582,6 +15838,22 @@ func (p *Package) GetCreatedAt() Timestamp { return *p.CreatedAt } +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (p *Package) GetDescription() string { + if p == nil || p.Description == nil { + return "" + } + return *p.Description +} + +// GetEcosystem returns the Ecosystem field if it's non-nil, zero value otherwise. +func (p *Package) GetEcosystem() string { + if p == nil || p.Ecosystem == nil { + return "" + } + return *p.Ecosystem +} + // GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. func (p *Package) GetHTMLURL() string { if p == nil || p.HTMLURL == nil { @@ -15606,6 +15878,14 @@ func (p *Package) GetName() string { return *p.Name } +// GetNamespace returns the Namespace field if it's non-nil, zero value otherwise. +func (p *Package) GetNamespace() string { + if p == nil || p.Namespace == nil { + return "" + } + return *p.Namespace +} + // GetOwner returns the Owner field. func (p *Package) GetOwner() *User { if p == nil { @@ -15726,6 +16006,46 @@ func (p *PackageEvent) GetSender() *User { return p.Sender } +// GetLabels returns the Labels map if it's non-nil, an empty map otherwise. +func (p *PackageEventContainerMetadata) GetLabels() map[string]any { + if p == nil || p.Labels == nil { + return map[string]any{} + } + return p.Labels +} + +// GetManifest returns the Manifest map if it's non-nil, an empty map otherwise. +func (p *PackageEventContainerMetadata) GetManifest() map[string]any { + if p == nil || p.Manifest == nil { + return map[string]any{} + } + return p.Manifest +} + +// GetTag returns the Tag field. +func (p *PackageEventContainerMetadata) GetTag() *PackageEventContainerMetadataTag { + if p == nil { + return nil + } + return p.Tag +} + +// GetDigest returns the Digest field if it's non-nil, zero value otherwise. +func (p *PackageEventContainerMetadataTag) GetDigest() string { + if p == nil || p.Digest == nil { + return "" + } + return *p.Digest +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (p *PackageEventContainerMetadataTag) GetName() string { + if p == nil || p.Name == nil { + return "" + } + return *p.Name +} + // GetAuthor returns the Author field. func (p *PackageFile) GetAuthor() *User { if p == nil { @@ -15862,6 +16182,262 @@ func (p *PackageMetadata) GetPackageType() string { return *p.PackageType } +// GetAuthor returns the Author map if it's non-nil, an empty map otherwise. +func (p *PackageNPMMetadata) GetAuthor() map[string]string { + if p == nil || p.Author == nil { + return map[string]string{} + } + return p.Author +} + +// GetBin returns the Bin map if it's non-nil, an empty map otherwise. +func (p *PackageNPMMetadata) GetBin() map[string]any { + if p == nil || p.Bin == nil { + return map[string]any{} + } + return p.Bin +} + +// GetBugs returns the Bugs map if it's non-nil, an empty map otherwise. +func (p *PackageNPMMetadata) GetBugs() map[string]string { + if p == nil || p.Bugs == nil { + return map[string]string{} + } + return p.Bugs +} + +// GetCommitOID returns the CommitOID field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetCommitOID() string { + if p == nil || p.CommitOID == nil { + return "" + } + return *p.CommitOID +} + +// GetDeletedByID returns the DeletedByID field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetDeletedByID() int64 { + if p == nil || p.DeletedByID == nil { + return 0 + } + return *p.DeletedByID +} + +// GetDependencies returns the Dependencies map if it's non-nil, an empty map otherwise. +func (p *PackageNPMMetadata) GetDependencies() map[string]string { + if p == nil || p.Dependencies == nil { + return map[string]string{} + } + return p.Dependencies +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetDescription() string { + if p == nil || p.Description == nil { + return "" + } + return *p.Description +} + +// GetDevDependencies returns the DevDependencies map if it's non-nil, an empty map otherwise. +func (p *PackageNPMMetadata) GetDevDependencies() map[string]string { + if p == nil || p.DevDependencies == nil { + return map[string]string{} + } + return p.DevDependencies +} + +// GetDirectories returns the Directories map if it's non-nil, an empty map otherwise. +func (p *PackageNPMMetadata) GetDirectories() map[string]string { + if p == nil || p.Directories == nil { + return map[string]string{} + } + return p.Directories +} + +// GetDist returns the Dist map if it's non-nil, an empty map otherwise. +func (p *PackageNPMMetadata) GetDist() map[string]string { + if p == nil || p.Dist == nil { + return map[string]string{} + } + return p.Dist +} + +// GetEngines returns the Engines map if it's non-nil, an empty map otherwise. +func (p *PackageNPMMetadata) GetEngines() map[string]string { + if p == nil || p.Engines == nil { + return map[string]string{} + } + return p.Engines +} + +// GetGitHead returns the GitHead field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetGitHead() string { + if p == nil || p.GitHead == nil { + return "" + } + return *p.GitHead +} + +// GetHasShrinkwrap returns the HasShrinkwrap field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetHasShrinkwrap() bool { + if p == nil || p.HasShrinkwrap == nil { + return false + } + return *p.HasShrinkwrap +} + +// GetHomepage returns the Homepage field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetHomepage() string { + if p == nil || p.Homepage == nil { + return "" + } + return *p.Homepage +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetID() string { + if p == nil || p.ID == nil { + return "" + } + return *p.ID +} + +// GetInstallationCommand returns the InstallationCommand field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetInstallationCommand() string { + if p == nil || p.InstallationCommand == nil { + return "" + } + return *p.InstallationCommand +} + +// GetLicense returns the License field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetLicense() string { + if p == nil || p.License == nil { + return "" + } + return *p.License +} + +// GetMain returns the Main field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetMain() string { + if p == nil || p.Main == nil { + return "" + } + return *p.Main +} + +// GetMan returns the Man map if it's non-nil, an empty map otherwise. +func (p *PackageNPMMetadata) GetMan() map[string]any { + if p == nil || p.Man == nil { + return map[string]any{} + } + return p.Man +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetName() string { + if p == nil || p.Name == nil { + return "" + } + return *p.Name +} + +// GetNodeVersion returns the NodeVersion field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetNodeVersion() string { + if p == nil || p.NodeVersion == nil { + return "" + } + return *p.NodeVersion +} + +// GetNPMUser returns the NPMUser field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetNPMUser() string { + if p == nil || p.NPMUser == nil { + return "" + } + return *p.NPMUser +} + +// GetNPMVersion returns the NPMVersion field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetNPMVersion() string { + if p == nil || p.NPMVersion == nil { + return "" + } + return *p.NPMVersion +} + +// GetOptionalDependencies returns the OptionalDependencies map if it's non-nil, an empty map otherwise. +func (p *PackageNPMMetadata) GetOptionalDependencies() map[string]string { + if p == nil || p.OptionalDependencies == nil { + return map[string]string{} + } + return p.OptionalDependencies +} + +// GetPeerDependencies returns the PeerDependencies map if it's non-nil, an empty map otherwise. +func (p *PackageNPMMetadata) GetPeerDependencies() map[string]string { + if p == nil || p.PeerDependencies == nil { + return map[string]string{} + } + return p.PeerDependencies +} + +// GetPublishedViaActions returns the PublishedViaActions field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetPublishedViaActions() bool { + if p == nil || p.PublishedViaActions == nil { + return false + } + return *p.PublishedViaActions +} + +// GetReadme returns the Readme field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetReadme() string { + if p == nil || p.Readme == nil { + return "" + } + return *p.Readme +} + +// GetReleaseID returns the ReleaseID field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetReleaseID() int64 { + if p == nil || p.ReleaseID == nil { + return 0 + } + return *p.ReleaseID +} + +// GetRepository returns the Repository map if it's non-nil, an empty map otherwise. +func (p *PackageNPMMetadata) GetRepository() map[string]string { + if p == nil || p.Repository == nil { + return map[string]string{} + } + return p.Repository +} + +// GetScripts returns the Scripts map if it's non-nil, an empty map otherwise. +func (p *PackageNPMMetadata) GetScripts() map[string]any { + if p == nil || p.Scripts == nil { + return map[string]any{} + } + return p.Scripts +} + +// GetVersion returns the Version field if it's non-nil, zero value otherwise. +func (p *PackageNPMMetadata) GetVersion() string { + if p == nil || p.Version == nil { + return "" + } + return *p.Version +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (p *PackageNugetMetadata) GetName() string { + if p == nil || p.Name == nil { + return "" + } + return *p.Name +} + // GetAboutURL returns the AboutURL field if it's non-nil, zero value otherwise. func (p *PackageRegistry) GetAboutURL() string { if p == nil || p.AboutURL == nil { @@ -15998,14 +16574,6 @@ func (p *PackageVersion) GetAuthor() *User { return p.Author } -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (p *PackageVersion) GetBody() string { - if p == nil || p.Body == nil { - return "" - } - return *p.Body -} - // GetBodyHTML returns the BodyHTML field if it's non-nil, zero value otherwise. func (p *PackageVersion) GetBodyHTML() string { if p == nil || p.BodyHTML == nil { @@ -16014,6 +16582,14 @@ func (p *PackageVersion) GetBodyHTML() string { return *p.BodyHTML } +// GetContainerMetadata returns the ContainerMetadata field. +func (p *PackageVersion) GetContainerMetadata() *PackageEventContainerMetadata { + if p == nil { + return nil + } + return p.ContainerMetadata +} + // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. func (p *PackageVersion) GetCreatedAt() Timestamp { if p == nil || p.CreatedAt == nil { @@ -16022,6 +16598,22 @@ func (p *PackageVersion) GetCreatedAt() Timestamp { return *p.CreatedAt } +// GetDeletedAt returns the DeletedAt field if it's non-nil, zero value otherwise. +func (p *PackageVersion) GetDeletedAt() Timestamp { + if p == nil || p.DeletedAt == nil { + return Timestamp{} + } + return *p.DeletedAt +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (p *PackageVersion) GetDescription() string { + if p == nil || p.Description == nil { + return "" + } + return *p.Description +} + // GetDraft returns the Draft field if it's non-nil, zero value otherwise. func (p *PackageVersion) GetDraft() bool { if p == nil || p.Draft == nil { @@ -16054,6 +16646,14 @@ func (p *PackageVersion) GetInstallationCommand() string { return *p.InstallationCommand } +// GetLicense returns the License field if it's non-nil, zero value otherwise. +func (p *PackageVersion) GetLicense() string { + if p == nil || p.License == nil { + return "" + } + return *p.License +} + // GetManifest returns the Manifest field if it's non-nil, zero value otherwise. func (p *PackageVersion) GetManifest() string { if p == nil || p.Manifest == nil { @@ -16062,14 +16662,6 @@ func (p *PackageVersion) GetManifest() string { return *p.Manifest } -// GetMetadata returns the Metadata field. -func (p *PackageVersion) GetMetadata() *PackageMetadata { - if p == nil { - return nil - } - return p.Metadata -} - // GetName returns the Name field if it's non-nil, zero value otherwise. func (p *PackageVersion) GetName() string { if p == nil || p.Name == nil { @@ -16078,6 +16670,14 @@ func (p *PackageVersion) GetName() string { return *p.Name } +// GetNPMMetadata returns the NPMMetadata field. +func (p *PackageVersion) GetNPMMetadata() *PackageNPMMetadata { + if p == nil { + return nil + } + return p.NPMMetadata +} + // GetPackageHTMLURL returns the PackageHTMLURL field if it's non-nil, zero value otherwise. func (p *PackageVersion) GetPackageHTMLURL() string { if p == nil || p.PackageHTMLURL == nil { @@ -16086,6 +16686,14 @@ func (p *PackageVersion) GetPackageHTMLURL() string { return *p.PackageHTMLURL } +// GetPackageURL returns the PackageURL field if it's non-nil, zero value otherwise. +func (p *PackageVersion) GetPackageURL() string { + if p == nil || p.PackageURL == nil { + return "" + } + return *p.PackageURL +} + // GetPrerelease returns the Prerelease field if it's non-nil, zero value otherwise. func (p *PackageVersion) GetPrerelease() bool { if p == nil || p.Prerelease == nil { @@ -16102,6 +16710,22 @@ func (p *PackageVersion) GetRelease() *PackageRelease { return p.Release } +// GetRubyMetadata returns the RubyMetadata map if it's non-nil, an empty map otherwise. +func (p *PackageVersion) GetRubyMetadata() map[string]any { + if p == nil || p.RubyMetadata == nil { + return map[string]any{} + } + return p.RubyMetadata +} + +// GetSourceURL returns the SourceURL field if it's non-nil, zero value otherwise. +func (p *PackageVersion) GetSourceURL() string { + if p == nil || p.SourceURL == nil { + return "" + } + return *p.SourceURL +} + // GetSummary returns the Summary field if it's non-nil, zero value otherwise. func (p *PackageVersion) GetSummary() string { if p == nil || p.Summary == nil { @@ -16158,6 +16782,78 @@ func (p *PackageVersion) GetVersion() string { return *p.Version } +// GetInfo returns the Info field. +func (p *PackageVersionBody) GetInfo() *PackageVersionBodyInfo { + if p == nil { + return nil + } + return p.Info +} + +// GetRepo returns the Repo field. +func (p *PackageVersionBody) GetRepo() *Repository { + if p == nil { + return nil + } + return p.Repo +} + +// GetCollection returns the Collection field if it's non-nil, zero value otherwise. +func (p *PackageVersionBodyInfo) GetCollection() bool { + if p == nil || p.Collection == nil { + return false + } + return *p.Collection +} + +// GetMode returns the Mode field if it's non-nil, zero value otherwise. +func (p *PackageVersionBodyInfo) GetMode() int64 { + if p == nil || p.Mode == nil { + return 0 + } + return *p.Mode +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (p *PackageVersionBodyInfo) GetName() string { + if p == nil || p.Name == nil { + return "" + } + return *p.Name +} + +// GetOID returns the OID field if it's non-nil, zero value otherwise. +func (p *PackageVersionBodyInfo) GetOID() string { + if p == nil || p.OID == nil { + return "" + } + return *p.OID +} + +// GetPath returns the Path field if it's non-nil, zero value otherwise. +func (p *PackageVersionBodyInfo) GetPath() string { + if p == nil || p.Path == nil { + return "" + } + return *p.Path +} + +// GetSize returns the Size field if it's non-nil, zero value otherwise. +func (p *PackageVersionBodyInfo) GetSize() int64 { + if p == nil || p.Size == nil { + return 0 + } + return *p.Size +} + +// GetType returns the Type field if it's non-nil, zero value otherwise. +func (p *PackageVersionBodyInfo) GetType() string { + if p == nil || p.Type == nil { + return "" + } + return *p.Type +} + // GetAction returns the Action field if it's non-nil, zero value otherwise. func (p *Page) GetAction() string { if p == nil || p.Action == nil { @@ -16734,6 +17430,38 @@ func (p *PagesUpdate) GetSource() *PagesSource { return p.Source } +// GetBuildType returns the BuildType field if it's non-nil, zero value otherwise. +func (p *PagesUpdateWithoutCNAME) GetBuildType() string { + if p == nil || p.BuildType == nil { + return "" + } + return *p.BuildType +} + +// GetHTTPSEnforced returns the HTTPSEnforced field if it's non-nil, zero value otherwise. +func (p *PagesUpdateWithoutCNAME) GetHTTPSEnforced() bool { + if p == nil || p.HTTPSEnforced == nil { + return false + } + return *p.HTTPSEnforced +} + +// GetPublic returns the Public field if it's non-nil, zero value otherwise. +func (p *PagesUpdateWithoutCNAME) GetPublic() bool { + if p == nil || p.Public == nil { + return false + } + return *p.Public +} + +// GetSource returns the Source field. +func (p *PagesUpdateWithoutCNAME) GetSource() *PagesSource { + if p == nil { + return nil + } + return p.Source +} + // GetName returns the Name field if it's non-nil, zero value otherwise. func (p *PatternRuleParameters) GetName() string { if p == nil || p.Name == nil { @@ -19310,6 +20038,14 @@ func (p *PullRequestReviewThreadEvent) GetThread() *PullRequestThread { return p.Thread } +// GetAutomaticCopilotCodeReviewEnabled returns the AutomaticCopilotCodeReviewEnabled field if it's non-nil, zero value otherwise. +func (p *PullRequestRuleParameters) GetAutomaticCopilotCodeReviewEnabled() bool { + if p == nil || p.AutomaticCopilotCodeReviewEnabled == nil { + return false + } + return *p.AutomaticCopilotCodeReviewEnabled +} + // GetAction returns the Action field if it's non-nil, zero value otherwise. func (p *PullRequestTargetEvent) GetAction() string { if p == nil || p.Action == nil { @@ -20062,6 +20798,14 @@ func (r *Reaction) GetContent() string { return *r.Content } +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (r *Reaction) GetCreatedAt() Timestamp { + if r == nil || r.CreatedAt == nil { + return Timestamp{} + } + return *r.CreatedAt +} + // GetID returns the ID field if it's non-nil, zero value otherwise. func (r *Reaction) GetID() int64 { if r == nil || r.ID == nil { @@ -23894,6 +24638,46 @@ func (s *ScanningAnalysis) GetWarning() string { return *s.Warning } +// GetDisplay returns the Display field if it's non-nil, zero value otherwise. +func (s *SCIMDisplayReference) GetDisplay() string { + if s == nil || s.Display == nil { + return "" + } + return *s.Display +} + +// GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise. +func (s *SCIMGroupAttributes) GetDisplayName() string { + if s == nil || s.DisplayName == nil { + return "" + } + return *s.DisplayName +} + +// GetExternalID returns the ExternalID field if it's non-nil, zero value otherwise. +func (s *SCIMGroupAttributes) GetExternalID() string { + if s == nil || s.ExternalID == nil { + return "" + } + return *s.ExternalID +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (s *SCIMGroupAttributes) GetID() string { + if s == nil || s.ID == nil { + return "" + } + return *s.ID +} + +// GetMeta returns the Meta field. +func (s *SCIMGroupAttributes) GetMeta() *SCIMMeta { + if s == nil { + return nil + } + return s.Meta +} + // GetCreated returns the Created field if it's non-nil, zero value otherwise. func (s *SCIMMeta) GetCreated() Timestamp { if s == nil || s.Created == nil { @@ -23926,6 +24710,30 @@ func (s *SCIMMeta) GetResourceType() string { return *s.ResourceType } +// GetItemsPerPage returns the ItemsPerPage field if it's non-nil, zero value otherwise. +func (s *SCIMProvisionedGroups) GetItemsPerPage() int { + if s == nil || s.ItemsPerPage == nil { + return 0 + } + return *s.ItemsPerPage +} + +// GetStartIndex returns the StartIndex field if it's non-nil, zero value otherwise. +func (s *SCIMProvisionedGroups) GetStartIndex() int { + if s == nil || s.StartIndex == nil { + return 0 + } + return *s.StartIndex +} + +// GetTotalResults returns the TotalResults field if it's non-nil, zero value otherwise. +func (s *SCIMProvisionedGroups) GetTotalResults() int { + if s == nil || s.TotalResults == nil { + return 0 + } + return *s.TotalResults +} + // GetItemsPerPage returns the ItemsPerPage field if it's non-nil, zero value otherwise. func (s *SCIMProvisionedIdentities) GetItemsPerPage() int { if s == nil || s.ItemsPerPage == nil { diff --git a/vendor/github.com/google/go-github/v69/github/github.go b/vendor/github.com/google/go-github/v71/github/github.go similarity index 98% rename from vendor/github.com/google/go-github/v69/github/github.go rename to vendor/github.com/google/go-github/v71/github/github.go index fbff67f..ddafffb 100644 --- a/vendor/github.com/google/go-github/v69/github/github.go +++ b/vendor/github.com/google/go-github/v71/github/github.go @@ -19,6 +19,7 @@ import ( "net/http" "net/url" "reflect" + "regexp" "strconv" "strings" "sync" @@ -28,7 +29,7 @@ import ( ) const ( - Version = "v69.0.0" + Version = "v71.0.0" defaultAPIVersion = "2022-11-28" defaultBaseURL = "https://api.github.com/" @@ -176,6 +177,10 @@ type Client struct { rateLimits [Categories]Rate // Rate limits for the client as determined by the most recent API calls. secondaryRateLimitReset time.Time // Secondary rate limit reset for the client as determined by the most recent API calls. + // If specified, Client will block requests for at most this duration in case of reaching a secondary + // rate limit + MaxSecondaryRateLimitRetryAfterDuration time.Duration + // Whether to respect rate limit headers on endpoints that return 302 redirections to artifacts RateLimitRedirectionalEndpoints bool @@ -928,6 +933,10 @@ func (c *Client) bareDo(ctx context.Context, caller *http.Client, req *http.Requ // Update the secondary rate limit if we hit it. rerr, ok := err.(*AbuseRateLimitError) if ok && rerr.RetryAfter != nil { + // if a max duration is specified, make sure that we are waiting at most this duration + if c.MaxSecondaryRateLimitRetryAfterDuration > 0 && rerr.GetRetryAfter() > c.MaxSecondaryRateLimitRetryAfterDuration { + rerr.RetryAfter = &c.MaxSecondaryRateLimitRetryAfterDuration + } c.rateMu.Lock() c.secondaryRateLimitReset = time.Now().Add(*rerr.RetryAfter) c.rateMu.Unlock() @@ -1762,3 +1771,18 @@ type roundTripperFunc func(*http.Request) (*http.Response, error) func (fn roundTripperFunc) RoundTrip(r *http.Request) (*http.Response, error) { return fn(r) } + +var runIDFromURLRE = regexp.MustCompile(`repos/.*/actions/runs/(\d+)/deployment_protection_rule$`) + +// GetRunID is a Helper Function used to extract the workflow RunID from the *DeploymentProtectionRuleEvent.DeploymentCallBackURL. +func (e *DeploymentProtectionRuleEvent) GetRunID() (int64, error) { + match := runIDFromURLRE.FindStringSubmatch(*e.DeploymentCallbackURL) + if len(match) != 2 { + return -1, errors.New("no match") + } + runID, err := strconv.ParseInt(match[1], 10, 64) + if err != nil { + return -1, err + } + return runID, nil +} diff --git a/vendor/github.com/google/go-github/v69/github/gitignore.go b/vendor/github.com/google/go-github/v71/github/gitignore.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/gitignore.go rename to vendor/github.com/google/go-github/v71/github/gitignore.go diff --git a/vendor/github.com/google/go-github/v69/github/interactions.go b/vendor/github.com/google/go-github/v71/github/interactions.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/interactions.go rename to vendor/github.com/google/go-github/v71/github/interactions.go diff --git a/vendor/github.com/google/go-github/v69/github/interactions_orgs.go b/vendor/github.com/google/go-github/v71/github/interactions_orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/interactions_orgs.go rename to vendor/github.com/google/go-github/v71/github/interactions_orgs.go diff --git a/vendor/github.com/google/go-github/v69/github/interactions_repos.go b/vendor/github.com/google/go-github/v71/github/interactions_repos.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/interactions_repos.go rename to vendor/github.com/google/go-github/v71/github/interactions_repos.go diff --git a/vendor/github.com/google/go-github/v69/github/issue_import.go b/vendor/github.com/google/go-github/v71/github/issue_import.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/issue_import.go rename to vendor/github.com/google/go-github/v71/github/issue_import.go diff --git a/vendor/github.com/google/go-github/v69/github/issues.go b/vendor/github.com/google/go-github/v71/github/issues.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/issues.go rename to vendor/github.com/google/go-github/v71/github/issues.go diff --git a/vendor/github.com/google/go-github/v69/github/issues_assignees.go b/vendor/github.com/google/go-github/v71/github/issues_assignees.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/issues_assignees.go rename to vendor/github.com/google/go-github/v71/github/issues_assignees.go diff --git a/vendor/github.com/google/go-github/v69/github/issues_comments.go b/vendor/github.com/google/go-github/v71/github/issues_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/issues_comments.go rename to vendor/github.com/google/go-github/v71/github/issues_comments.go diff --git a/vendor/github.com/google/go-github/v69/github/issues_events.go b/vendor/github.com/google/go-github/v71/github/issues_events.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/issues_events.go rename to vendor/github.com/google/go-github/v71/github/issues_events.go diff --git a/vendor/github.com/google/go-github/v69/github/issues_labels.go b/vendor/github.com/google/go-github/v71/github/issues_labels.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/issues_labels.go rename to vendor/github.com/google/go-github/v71/github/issues_labels.go diff --git a/vendor/github.com/google/go-github/v69/github/issues_milestones.go b/vendor/github.com/google/go-github/v71/github/issues_milestones.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/issues_milestones.go rename to vendor/github.com/google/go-github/v71/github/issues_milestones.go diff --git a/vendor/github.com/google/go-github/v69/github/issues_timeline.go b/vendor/github.com/google/go-github/v71/github/issues_timeline.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/issues_timeline.go rename to vendor/github.com/google/go-github/v71/github/issues_timeline.go diff --git a/vendor/github.com/google/go-github/v69/github/licenses.go b/vendor/github.com/google/go-github/v71/github/licenses.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/licenses.go rename to vendor/github.com/google/go-github/v71/github/licenses.go diff --git a/vendor/github.com/google/go-github/v69/github/markdown.go b/vendor/github.com/google/go-github/v71/github/markdown.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/markdown.go rename to vendor/github.com/google/go-github/v71/github/markdown.go diff --git a/vendor/github.com/google/go-github/v69/github/messages.go b/vendor/github.com/google/go-github/v71/github/messages.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/messages.go rename to vendor/github.com/google/go-github/v71/github/messages.go diff --git a/vendor/github.com/google/go-github/v69/github/meta.go b/vendor/github.com/google/go-github/v71/github/meta.go similarity index 97% rename from vendor/github.com/google/go-github/v69/github/meta.go rename to vendor/github.com/google/go-github/v71/github/meta.go index cc90b61..6923535 100644 --- a/vendor/github.com/google/go-github/v69/github/meta.go +++ b/vendor/github.com/google/go-github/v71/github/meta.go @@ -52,6 +52,10 @@ type APIMeta struct { // GitHub Actions will originate from. Actions []string `json:"actions,omitempty"` + // An array of IP addresses in CIDR format specifying the IP addresses + // GitHub Action macOS runner will originate from. + ActionsMacos []string `json:"actions_macos,omitempty"` + // An array of IP addresses in CIDR format specifying the IP addresses // Dependabot will originate from. Dependabot []string `json:"dependabot,omitempty"` diff --git a/vendor/github.com/google/go-github/v69/github/migrations.go b/vendor/github.com/google/go-github/v71/github/migrations.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/migrations.go rename to vendor/github.com/google/go-github/v71/github/migrations.go diff --git a/vendor/github.com/google/go-github/v69/github/migrations_source_import.go b/vendor/github.com/google/go-github/v71/github/migrations_source_import.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/migrations_source_import.go rename to vendor/github.com/google/go-github/v71/github/migrations_source_import.go diff --git a/vendor/github.com/google/go-github/v69/github/migrations_user.go b/vendor/github.com/google/go-github/v71/github/migrations_user.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/migrations_user.go rename to vendor/github.com/google/go-github/v71/github/migrations_user.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs.go b/vendor/github.com/google/go-github/v71/github/orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs.go rename to vendor/github.com/google/go-github/v71/github/orgs.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs_actions_allowed.go b/vendor/github.com/google/go-github/v71/github/orgs_actions_allowed.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_actions_allowed.go rename to vendor/github.com/google/go-github/v71/github/orgs_actions_allowed.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs_actions_permissions.go b/vendor/github.com/google/go-github/v71/github/orgs_actions_permissions.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_actions_permissions.go rename to vendor/github.com/google/go-github/v71/github/orgs_actions_permissions.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs_attestations.go b/vendor/github.com/google/go-github/v71/github/orgs_attestations.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_attestations.go rename to vendor/github.com/google/go-github/v71/github/orgs_attestations.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs_audit_log.go b/vendor/github.com/google/go-github/v71/github/orgs_audit_log.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_audit_log.go rename to vendor/github.com/google/go-github/v71/github/orgs_audit_log.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs_codesecurity_configurations.go b/vendor/github.com/google/go-github/v71/github/orgs_codesecurity_configurations.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_codesecurity_configurations.go rename to vendor/github.com/google/go-github/v71/github/orgs_codesecurity_configurations.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs_credential_authorizations.go b/vendor/github.com/google/go-github/v71/github/orgs_credential_authorizations.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_credential_authorizations.go rename to vendor/github.com/google/go-github/v71/github/orgs_credential_authorizations.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs_custom_repository_roles.go b/vendor/github.com/google/go-github/v71/github/orgs_custom_repository_roles.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_custom_repository_roles.go rename to vendor/github.com/google/go-github/v71/github/orgs_custom_repository_roles.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs_hooks.go b/vendor/github.com/google/go-github/v71/github/orgs_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_hooks.go rename to vendor/github.com/google/go-github/v71/github/orgs_hooks.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs_hooks_configuration.go b/vendor/github.com/google/go-github/v71/github/orgs_hooks_configuration.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_hooks_configuration.go rename to vendor/github.com/google/go-github/v71/github/orgs_hooks_configuration.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs_hooks_deliveries.go b/vendor/github.com/google/go-github/v71/github/orgs_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_hooks_deliveries.go rename to vendor/github.com/google/go-github/v71/github/orgs_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v71/github/orgs_issue_types.go b/vendor/github.com/google/go-github/v71/github/orgs_issue_types.go new file mode 100644 index 0000000..73e6f8d --- /dev/null +++ b/vendor/github.com/google/go-github/v71/github/orgs_issue_types.go @@ -0,0 +1,99 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "fmt" +) + +// CreateOrUpdateIssueTypesOptions represents the parameters for creating or updating an issue type. +type CreateOrUpdateIssueTypesOptions struct { + Name string `json:"name"` // Name of the issue type. (Required.) + IsEnabled bool `json:"is_enabled"` // Whether or not the issue type is enabled at the organization level. (Required.) + IsPrivate *bool `json:"is_private,omitempty"` // Whether or not the issue type is restricted to issues in private repositories. (Optional.) + Description *string `json:"description,omitempty"` // Description of the issue type. (Optional.) + Color *string `json:"color,omitempty"` // Color for the issue type. Can be one of "gray", "blue", green "orange", "red", "pink", "purple", "null". (Optional.) +} + +// ListIssueTypes lists all issue types for an organization. +// +// GitHub API docs: https://docs.github.com/rest/orgs/issue-types#list-issue-types-for-an-organization +// +//meta:operation GET /orgs/{org}/issue-types +func (s *OrganizationsService) ListIssueTypes(ctx context.Context, org string) ([]*IssueType, *Response, error) { + u := fmt.Sprintf("orgs/%v/issue-types", org) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var issueTypes []*IssueType + resp, err := s.client.Do(ctx, req, &issueTypes) + if err != nil { + return nil, resp, err + } + + return issueTypes, resp, nil +} + +// CreateIssueType creates a new issue type for an organization. +// +// GitHub API docs: https://docs.github.com/rest/orgs/issue-types#create-issue-type-for-an-organization +// +//meta:operation POST /orgs/{org}/issue-types +func (s *OrganizationsService) CreateIssueType(ctx context.Context, org string, opt *CreateOrUpdateIssueTypesOptions) (*IssueType, *Response, error) { + u := fmt.Sprintf("orgs/%v/issue-types", org) + req, err := s.client.NewRequest("POST", u, opt) + if err != nil { + return nil, nil, err + } + + issueType := new(IssueType) + resp, err := s.client.Do(ctx, req, issueType) + if err != nil { + return nil, resp, err + } + + return issueType, resp, nil +} + +// UpdateIssueType updates GitHub Pages for the named repo. +// +// GitHub API docs: https://docs.github.com/rest/orgs/issue-types#update-issue-type-for-an-organization +// +//meta:operation PUT /orgs/{org}/issue-types/{issue_type_id} +func (s *OrganizationsService) UpdateIssueType(ctx context.Context, org string, issueTypeID int64, opt *CreateOrUpdateIssueTypesOptions) (*IssueType, *Response, error) { + u := fmt.Sprintf("orgs/%v/issue-types/%v", org, issueTypeID) + req, err := s.client.NewRequest("PUT", u, opt) + if err != nil { + return nil, nil, err + } + + issueType := new(IssueType) + resp, err := s.client.Do(ctx, req, issueType) + if err != nil { + return nil, resp, err + } + + return issueType, resp, nil +} + +// DeleteIssueType deletes an issue type for an organization. +// +// GitHub API docs: https://docs.github.com/rest/orgs/issue-types#delete-issue-type-for-an-organization +// +//meta:operation DELETE /orgs/{org}/issue-types/{issue_type_id} +func (s *OrganizationsService) DeleteIssueType(ctx context.Context, org string, issueTypeID int64) (*Response, error) { + u := fmt.Sprintf("orgs/%v/issue-types/%d", org, issueTypeID) + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + + return s.client.Do(ctx, req, nil) +} diff --git a/vendor/github.com/google/go-github/v69/github/orgs_members.go b/vendor/github.com/google/go-github/v71/github/orgs_members.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_members.go rename to vendor/github.com/google/go-github/v71/github/orgs_members.go diff --git a/vendor/github.com/google/go-github/v71/github/orgs_network_configurations.go b/vendor/github.com/google/go-github/v71/github/orgs_network_configurations.go new file mode 100644 index 0000000..82a819c --- /dev/null +++ b/vendor/github.com/google/go-github/v71/github/orgs_network_configurations.go @@ -0,0 +1,236 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "errors" + "fmt" + "regexp" +) + +// ComputeService represents a hosted compute service the network configuration supports. +type ComputeService string + +const ( + ComputeServiceNone ComputeService = "none" + ComputeServiceActions ComputeService = "actions" + ComputeServiceCodespaces ComputeService = "codespaces" +) + +// NetworkConfigurations represents a hosted compute network configuration. This type is identical +// for enterprise and organization endpoints. +type NetworkConfigurations struct { + TotalCount *int64 `json:"total_count,omitempty"` + NetworkConfigurations []*NetworkConfiguration `json:"network_configurations,omitempty"` +} + +// NetworkConfiguration represents a hosted compute network configurations. This type is identical +// for enterprise and organization endpoints. +type NetworkConfiguration struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + ComputeService *ComputeService `json:"compute_service,omitempty"` + NetworkSettingsIDs []string `json:"network_settings_ids,omitempty"` + CreatedOn *Timestamp `json:"created_on"` +} + +// NetworkSettingsResource represents a hosted compute network settings resource. This type is identical +// for enterprise and organization endpoints. +type NetworkSettingsResource struct { + ID *string `json:"id,omitempty"` + NetworkConfigurationID *string `json:"network_configuration_id,omitempty"` + Name *string `json:"name,omitempty"` + SubnetID *string `json:"subnet_id,omitempty"` + Region *string `json:"region,omitempty"` +} + +func validateComputeService(compute *ComputeService) error { + if compute == nil { + return nil + } + if *compute != ComputeServiceNone && *compute != ComputeServiceActions { + return errors.New("compute service can only be one of: none, actions") + } + return nil +} + +var validNetworkNameRE = regexp.MustCompile(`^[a-zA-Z0-9._-]+$`) + +func validateNetworkName(name string) error { + if len(name) < 1 || len(name) > 100 { + return errors.New("must be between 1 and 100 characters") + } + if !validNetworkNameRE.MatchString(name) { + return errors.New("may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'") + } + return nil +} + +func validateNetworkSettingsID(settingsID []string) error { + if len(settingsID) != 1 { + return errors.New("exactly one network settings id must be specified") + } + return nil +} + +func validateNetworkConfigurationRequest(req NetworkConfigurationRequest) error { + networkName := req.GetName() + if err := validateNetworkName(networkName); err != nil { + return err + } + + computeService := req.GetComputeService() + if err := validateComputeService(computeService); err != nil { + return err + } + + networkIDs := req.NetworkSettingsIDs + if err := validateNetworkSettingsID(networkIDs); err != nil { + return err + } + return nil +} + +// NetworkConfigurationRequest represents a request to create or update a network configuration for an organization. +type NetworkConfigurationRequest struct { + Name *string `json:"name,omitempty"` + ComputeService *ComputeService `json:"compute_service,omitempty"` + NetworkSettingsIDs []string `json:"network_settings_ids,omitempty"` +} + +// ListNetworkConfigurations lists all hosted compute network configurations configured in an organization. +// +// GitHub API docs: https://docs.github.com/rest/orgs/network-configurations#list-hosted-compute-network-configurations-for-an-organization +// +//meta:operation GET /orgs/{org}/settings/network-configurations +func (s *OrganizationsService) ListNetworkConfigurations(ctx context.Context, org string, opts *ListOptions) (*NetworkConfigurations, *Response, error) { + u := fmt.Sprintf("orgs/%v/settings/network-configurations", org) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + configurations := &NetworkConfigurations{} + resp, err := s.client.Do(ctx, req, configurations) + if err != nil { + return nil, resp, err + } + return configurations, resp, nil +} + +// CreateNetworkConfiguration creates a hosted compute network configuration for an organization. +// +// GitHub API docs: https://docs.github.com/rest/orgs/network-configurations#create-a-hosted-compute-network-configuration-for-an-organization +// +//meta:operation POST /orgs/{org}/settings/network-configurations +func (s *OrganizationsService) CreateNetworkConfiguration(ctx context.Context, org string, createReq NetworkConfigurationRequest) (*NetworkConfiguration, *Response, error) { + if err := validateNetworkConfigurationRequest(createReq); err != nil { + return nil, nil, fmt.Errorf("validation failed: %w", err) + } + + u := fmt.Sprintf("orgs/%v/settings/network-configurations", org) + req, err := s.client.NewRequest("POST", u, createReq) + if err != nil { + return nil, nil, err + } + + configuration := &NetworkConfiguration{} + resp, err := s.client.Do(ctx, req, configuration) + if err != nil { + return nil, resp, err + } + return configuration, resp, nil +} + +// GetNetworkConfiguration gets a hosted compute network configuration configured in an organization. +// +// GitHub API docs: https://docs.github.com/rest/orgs/network-configurations#get-a-hosted-compute-network-configuration-for-an-organization +// +//meta:operation GET /orgs/{org}/settings/network-configurations/{network_configuration_id} +func (s *OrganizationsService) GetNetworkConfiguration(ctx context.Context, org, networkID string) (*NetworkConfiguration, *Response, error) { + u := fmt.Sprintf("orgs/%v/settings/network-configurations/%v", org, networkID) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + configuration := &NetworkConfiguration{} + resp, err := s.client.Do(ctx, req, configuration) + if err != nil { + return nil, resp, err + } + return configuration, resp, nil +} + +// UpdateNetworkConfiguration updates a hosted compute network configuration for an organization. +// +// GitHub API docs: https://docs.github.com/rest/orgs/network-configurations#update-a-hosted-compute-network-configuration-for-an-organization +// +//meta:operation PATCH /orgs/{org}/settings/network-configurations/{network_configuration_id} +func (s *OrganizationsService) UpdateNetworkConfiguration(ctx context.Context, org, networkID string, updateReq NetworkConfigurationRequest) (*NetworkConfiguration, *Response, error) { + if err := validateNetworkConfigurationRequest(updateReq); err != nil { + return nil, nil, fmt.Errorf("validation failed: %w", err) + } + + u := fmt.Sprintf("orgs/%v/settings/network-configurations/%v", org, networkID) + req, err := s.client.NewRequest("PATCH", u, updateReq) + if err != nil { + return nil, nil, err + } + + configuration := &NetworkConfiguration{} + resp, err := s.client.Do(ctx, req, configuration) + if err != nil { + return nil, resp, err + } + return configuration, resp, nil +} + +// DeleteNetworkConfigurations deletes a hosted compute network configuration from an organization. +// +// GitHub API docs: https://docs.github.com/rest/orgs/network-configurations#delete-a-hosted-compute-network-configuration-from-an-organization +// +//meta:operation DELETE /orgs/{org}/settings/network-configurations/{network_configuration_id} +func (s *OrganizationsService) DeleteNetworkConfigurations(ctx context.Context, org, networkID string) (*Response, error) { + u := fmt.Sprintf("orgs/%v/settings/network-configurations/%v", org, networkID) + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + + configuration := &NetworkConfiguration{} + resp, err := s.client.Do(ctx, req, configuration) + if err != nil { + return resp, err + } + return resp, nil +} + +// GetNetworkConfigurationResource gets a hosted compute network settings resource configured for an organization. +// +// GitHub API docs: https://docs.github.com/rest/orgs/network-configurations#get-a-hosted-compute-network-settings-resource-for-an-organization +// +//meta:operation GET /orgs/{org}/settings/network-settings/{network_settings_id} +func (s *OrganizationsService) GetNetworkConfigurationResource(ctx context.Context, org, networkID string) (*NetworkSettingsResource, *Response, error) { + u := fmt.Sprintf("orgs/%v/settings/network-settings/%v", org, networkID) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + resource := &NetworkSettingsResource{} + resp, err := s.client.Do(ctx, req, resource) + if err != nil { + return nil, resp, err + } + return resource, resp, nil +} diff --git a/vendor/github.com/google/go-github/v69/github/orgs_organization_roles.go b/vendor/github.com/google/go-github/v71/github/orgs_organization_roles.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_organization_roles.go rename to vendor/github.com/google/go-github/v71/github/orgs_organization_roles.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs_outside_collaborators.go b/vendor/github.com/google/go-github/v71/github/orgs_outside_collaborators.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_outside_collaborators.go rename to vendor/github.com/google/go-github/v71/github/orgs_outside_collaborators.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs_packages.go b/vendor/github.com/google/go-github/v71/github/orgs_packages.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_packages.go rename to vendor/github.com/google/go-github/v71/github/orgs_packages.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs_personal_access_tokens.go b/vendor/github.com/google/go-github/v71/github/orgs_personal_access_tokens.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_personal_access_tokens.go rename to vendor/github.com/google/go-github/v71/github/orgs_personal_access_tokens.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs_properties.go b/vendor/github.com/google/go-github/v71/github/orgs_properties.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_properties.go rename to vendor/github.com/google/go-github/v71/github/orgs_properties.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs_rules.go b/vendor/github.com/google/go-github/v71/github/orgs_rules.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_rules.go rename to vendor/github.com/google/go-github/v71/github/orgs_rules.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs_security_managers.go b/vendor/github.com/google/go-github/v71/github/orgs_security_managers.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_security_managers.go rename to vendor/github.com/google/go-github/v71/github/orgs_security_managers.go diff --git a/vendor/github.com/google/go-github/v69/github/orgs_users_blocking.go b/vendor/github.com/google/go-github/v71/github/orgs_users_blocking.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/orgs_users_blocking.go rename to vendor/github.com/google/go-github/v71/github/orgs_users_blocking.go diff --git a/vendor/github.com/google/go-github/v71/github/packages.go b/vendor/github.com/google/go-github/v71/github/packages.go new file mode 100644 index 0000000..1eed77e --- /dev/null +++ b/vendor/github.com/google/go-github/v71/github/packages.go @@ -0,0 +1,319 @@ +// Copyright 2020 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "encoding/json" +) + +// Package represents a GitHub package. +type Package struct { + ID *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + PackageType *string `json:"package_type,omitempty"` // One of "npm", "maven", "rubygems", "docker", "nuget", "container". For webhook events "container" is "CONTAINER" + HTMLURL *string `json:"html_url,omitempty"` + Visibility *string `json:"visibility,omitempty"` + Owner *User `json:"owner,omitempty"` + Repository *Repository `json:"repository,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + + // The following are only populated for webhook events + Namespace *string `json:"namespace,omitempty"` + Description *string `json:"description,omitempty"` + Ecosystem *string `json:"ecosystem,omitempty"` + PackageVersion *PackageVersion `json:"package_version,omitempty"` + Registry *PackageRegistry `json:"registry,omitempty"` + + // The following are NOT populated for webhook events + URL *string `json:"url,omitempty"` + VersionCount *int64 `json:"version_count,omitempty"` +} + +func (p Package) String() string { + return Stringify(p) +} + +// PackageVersion represents a GitHub package version. +type PackageVersion struct { + ID *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + URL *string `json:"url,omitempty"` + PackageHTMLURL *string `json:"package_html_url,omitempty"` + License *string `json:"license,omitempty"` + Description *string `json:"description,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + Metadata json.RawMessage `json:"metadata,omitempty"` // For webhook events this will be []interface, else it will be of type PackageMetadata + + // The following are only populated for webhook events + Version *string `json:"version,omitempty"` + Summary *string `json:"summary,omitempty"` + Body json.RawMessage `json:"body,omitempty"` // Can either be a string or of type PackageVersionBody + BodyHTML *string `json:"body_html,omitempty"` + Release *PackageRelease `json:"release,omitempty"` + Manifest *string `json:"manifest,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + TagName *string `json:"tag_name,omitempty"` + TargetCommitish *string `json:"target_commitish,omitempty"` + TargetOID *string `json:"target_oid,omitempty"` + Draft *bool `json:"draft,omitempty"` + Prerelease *bool `json:"prerelease,omitempty"` + ContainerMetadata *PackageEventContainerMetadata `json:"container_metadata,omitempty"` + DockerMetadata []interface{} `json:"docker_metadata,omitempty"` + NPMMetadata *PackageNPMMetadata `json:"npm_metadata,omitempty"` + NugetMetadata []*PackageNugetMetadata `json:"nuget_metadata,omitempty"` + RubyMetadata map[string]any `json:"ruby_metadata,omitempty"` + PackageFiles []*PackageFile `json:"package_files,omitempty"` + PackageURL *string `json:"package_url,omitempty"` + Author *User `json:"author,omitempty"` + SourceURL *string `json:"source_url,omitempty"` + InstallationCommand *string `json:"installation_command,omitempty"` + + // The following are NOT populated for webhook events + DeletedAt *Timestamp `json:"deleted_at,omitempty"` +} + +// GetBody returns the body field as a string if it's valid. +func (pv *PackageVersion) GetBody() (body string, ok bool) { + if pv == nil || pv.Body == nil { + return "", false + } + + if err := json.Unmarshal(pv.Body, &body); err != nil { + return "", false + } + + return body, true +} + +// GetBodyAsPackageVersionBody returns the body field as a PackageVersionBody if it's valid. +func (pv *PackageVersion) GetBodyAsPackageVersionBody() (body *PackageVersionBody, ok bool) { + if pv == nil || pv.Body == nil { + return nil, false + } + + if err := json.Unmarshal(pv.Body, &body); err != nil { + return nil, false + } + + return body, true +} + +// GetMetadata returns the metadata field as PackageMetadata if it's valid. +func (pv *PackageVersion) GetMetadata() (metadata *PackageMetadata, ok bool) { + if pv == nil || pv.Metadata == nil { + return nil, false + } + + if err := json.Unmarshal(pv.Metadata, &metadata); err != nil { + return nil, false + } + + return metadata, true +} + +// GetRawMetadata returns the metadata field as a json.RawMessage. +func (pv *PackageVersion) GetRawMetadata() json.RawMessage { + if pv == nil || pv.Metadata == nil { + return json.RawMessage{} + } + + return pv.Metadata +} + +func (pv PackageVersion) String() string { + return Stringify(pv) +} + +// PackageRelease represents a GitHub package version release. +type PackageRelease struct { + URL *string `json:"url,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + ID *int64 `json:"id,omitempty"` + TagName *string `json:"tag_name,omitempty"` + TargetCommitish *string `json:"target_commitish,omitempty"` + Name *string `json:"name,omitempty"` + Draft *bool `json:"draft,omitempty"` + Author *User `json:"author,omitempty"` + Prerelease *bool `json:"prerelease,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + PublishedAt *Timestamp `json:"published_at,omitempty"` +} + +func (r PackageRelease) String() string { + return Stringify(r) +} + +// PackageFile represents a GitHub package version release file. +type PackageFile struct { + DownloadURL *string `json:"download_url,omitempty"` + ID *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + SHA256 *string `json:"sha256,omitempty"` + SHA1 *string `json:"sha1,omitempty"` + MD5 *string `json:"md5,omitempty"` + ContentType *string `json:"content_type,omitempty"` + State *string `json:"state,omitempty"` + Author *User `json:"author,omitempty"` + Size *int64 `json:"size,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` +} + +func (pf PackageFile) String() string { + return Stringify(pf) +} + +// PackageRegistry represents a GitHub package registry. +type PackageRegistry struct { + AboutURL *string `json:"about_url,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + URL *string `json:"url,omitempty"` + Vendor *string `json:"vendor,omitempty"` +} + +func (r PackageRegistry) String() string { + return Stringify(r) +} + +// PackageListOptions represents the optional list options for a package. +type PackageListOptions struct { + // Visibility of packages "public", "internal" or "private". + Visibility *string `url:"visibility,omitempty"` + + // PackageType represents the type of package. + // It can be one of "npm", "maven", "rubygems", "nuget", "docker", or "container". + PackageType *string `url:"package_type,omitempty"` + + // State of package either "active" or "deleted". + State *string `url:"state,omitempty"` + + ListOptions +} + +// PackageMetadata represents metadata from a package. +type PackageMetadata struct { + PackageType *string `json:"package_type,omitempty"` + Container *PackageContainerMetadata `json:"container,omitempty"` +} + +func (r PackageMetadata) String() string { + return Stringify(r) +} + +// PackageContainerMetadata represents container metadata for docker container packages. +type PackageContainerMetadata struct { + Tags []string `json:"tags,omitempty"` +} + +func (r PackageContainerMetadata) String() string { + return Stringify(r) +} + +// PackageVersionBody represents the body field of a package version. +type PackageVersionBody struct { + Repo *Repository `json:"repository,omitempty"` + Info *PackageVersionBodyInfo `json:"info,omitempty"` +} + +func (b PackageVersionBody) String() string { + return Stringify(b) +} + +// PackageVersionBodyInfo represents the info field of a PackageVersionBody. +type PackageVersionBodyInfo struct { + Type *string `json:"type,omitempty"` + OID *string `json:"oid,omitempty"` + Mode *int64 `json:"mode,omitempty"` + Name *string `json:"name,omitempty"` + Path *string `json:"path,omitempty"` + Size *int64 `json:"size,omitempty"` + Collection *bool `json:"collection,omitempty"` +} + +func (bi PackageVersionBodyInfo) String() string { + return Stringify(bi) +} + +// PackageEventContainerMetadata represents metadata for container packages as part of a webhook event. +// See also PackageContainerMetadata. +type PackageEventContainerMetadata struct { + Labels map[string]any `json:"labels,omitempty"` + Manifest map[string]any `json:"manifest,omitempty"` + Tag *PackageEventContainerMetadataTag `json:"tag,omitempty"` +} + +func (m PackageEventContainerMetadata) String() string { + return Stringify(m) +} + +// PackageEventContainerMetadataTag represents a tag of a GitHub container package. +type PackageEventContainerMetadataTag struct { + Name *string `json:"name,omitempty"` + Digest *string `json:"digest,omitempty"` +} + +func (mt PackageEventContainerMetadataTag) String() string { + return Stringify(mt) +} + +// PackageNugetMetadata represents nuget metadata for a GitHub package. +type PackageNugetMetadata struct { + ID json.RawMessage `json:"id,omitempty"` // Can either be a int64 or string + Name *string `json:"name,omitempty"` + Value json.RawMessage `json:"value,omitempty"` // Can either be a bool, string, integer or object +} + +func (nm PackageNugetMetadata) String() string { + return Stringify(nm) +} + +// PackageNPMMetadata represents NPM metadata for a GitHub package. +type PackageNPMMetadata struct { + Name *string `json:"name,omitempty"` + Version *string `json:"version,omitempty"` + NPMUser *string `json:"npm_user,omitempty"` + Author map[string]string `json:"author,omitempty"` + Bugs map[string]string `json:"bugs,omitempty"` + Dependencies map[string]string `json:"dependencies,omitempty"` + DevDependencies map[string]string `json:"dev_dependencies,omitempty"` + PeerDependencies map[string]string `json:"peer_dependencies,omitempty"` + OptionalDependencies map[string]string `json:"optional_dependencies,omitempty"` + Description *string `json:"description,omitempty"` + Dist map[string]string `json:"dist,omitempty"` + GitHead *string `json:"git_head,omitempty"` + Homepage *string `json:"homepage,omitempty"` + License *string `json:"license,omitempty"` + Main *string `json:"main,omitempty"` + Repository map[string]string `json:"repository,omitempty"` + Scripts map[string]any `json:"scripts,omitempty"` + ID *string `json:"id,omitempty"` + NodeVersion *string `json:"node_version,omitempty"` + NPMVersion *string `json:"npm_version,omitempty"` + HasShrinkwrap *bool `json:"has_shrinkwrap,omitempty"` + Maintainers []interface{} `json:"maintainers,omitempty"` + Contributors []interface{} `json:"contributors,omitempty"` + Engines map[string]string `json:"engines,omitempty"` + Keywords []string `json:"keywords,omitempty"` + Files []string `json:"files,omitempty"` + Bin map[string]any `json:"bin,omitempty"` + Man map[string]any `json:"man,omitempty"` + Directories map[string]string `json:"directories,omitempty"` + OS []string `json:"os,omitempty"` + CPU []string `json:"cpu,omitempty"` + Readme *string `json:"readme,omitempty"` + InstallationCommand *string `json:"installation_command,omitempty"` + ReleaseID *int64 `json:"release_id,omitempty"` + CommitOID *string `json:"commit_oid,omitempty"` + PublishedViaActions *bool `json:"published_via_actions,omitempty"` + DeletedByID *int64 `json:"deleted_by_id,omitempty"` +} + +func (nm PackageNPMMetadata) String() string { + return Stringify(nm) +} diff --git a/vendor/github.com/google/go-github/v69/github/pulls.go b/vendor/github.com/google/go-github/v71/github/pulls.go similarity index 98% rename from vendor/github.com/google/go-github/v69/github/pulls.go rename to vendor/github.com/google/go-github/v71/github/pulls.go index 6448019..f3c6e92 100644 --- a/vendor/github.com/google/go-github/v69/github/pulls.go +++ b/vendor/github.com/google/go-github/v71/github/pulls.go @@ -169,10 +169,12 @@ func (s *PullRequestsService) List(ctx context.Context, owner string, repo strin return pulls, resp, nil } -// ListPullRequestsWithCommit returns pull requests associated with a commit SHA. +// ListPullRequestsWithCommit returns pull requests associated with a commit SHA +// or branch name. // -// The results may include open and closed pull requests. -// By default, the PullRequestListOptions State filters for "open". +// The results may include open and closed pull requests. If the commit SHA is +// not present in the repository's default branch, the result will only include +// open pull requests. // // GitHub API docs: https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit // diff --git a/vendor/github.com/google/go-github/v69/github/pulls_comments.go b/vendor/github.com/google/go-github/v71/github/pulls_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/pulls_comments.go rename to vendor/github.com/google/go-github/v71/github/pulls_comments.go diff --git a/vendor/github.com/google/go-github/v69/github/pulls_reviewers.go b/vendor/github.com/google/go-github/v71/github/pulls_reviewers.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/pulls_reviewers.go rename to vendor/github.com/google/go-github/v71/github/pulls_reviewers.go diff --git a/vendor/github.com/google/go-github/v69/github/pulls_reviews.go b/vendor/github.com/google/go-github/v71/github/pulls_reviews.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/pulls_reviews.go rename to vendor/github.com/google/go-github/v71/github/pulls_reviews.go diff --git a/vendor/github.com/google/go-github/v69/github/pulls_threads.go b/vendor/github.com/google/go-github/v71/github/pulls_threads.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/pulls_threads.go rename to vendor/github.com/google/go-github/v71/github/pulls_threads.go diff --git a/vendor/github.com/google/go-github/v69/github/rate_limit.go b/vendor/github.com/google/go-github/v71/github/rate_limit.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/rate_limit.go rename to vendor/github.com/google/go-github/v71/github/rate_limit.go diff --git a/vendor/github.com/google/go-github/v69/github/reactions.go b/vendor/github.com/google/go-github/v71/github/reactions.go similarity index 89% rename from vendor/github.com/google/go-github/v69/github/reactions.go rename to vendor/github.com/google/go-github/v71/github/reactions.go index 9f9f72f..5233f78 100644 --- a/vendor/github.com/google/go-github/v69/github/reactions.go +++ b/vendor/github.com/google/go-github/v71/github/reactions.go @@ -26,7 +26,8 @@ type Reaction struct { // Content is the type of reaction. // Possible values are: // "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", or "eyes". - Content *string `json:"content,omitempty"` + Content *string `json:"content,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` } // Reactions represents a summary of GitHub reactions. @@ -47,9 +48,8 @@ func (r Reaction) String() string { return Stringify(r) } -// ListCommentReactionOptions specifies the optional parameters to the -// ReactionsService.ListCommentReactions method. -type ListCommentReactionOptions struct { +// ListReactionOptions specifies the optional parameters to the list reactions endpoints. +type ListReactionOptions struct { // Content restricts the returned comment reactions to only those with the given type. // Omit this parameter to list all reactions to a commit comment. // Possible values are: "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", or "eyes". @@ -63,7 +63,7 @@ type ListCommentReactionOptions struct { // GitHub API docs: https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-commit-comment // //meta:operation GET /repos/{owner}/{repo}/comments/{comment_id}/reactions -func (s *ReactionsService) ListCommentReactions(ctx context.Context, owner, repo string, id int64, opts *ListCommentReactionOptions) ([]*Reaction, *Response, error) { +func (s *ReactionsService) ListCommentReactions(ctx context.Context, owner, repo string, id int64, opts *ListReactionOptions) ([]*Reaction, *Response, error) { u := fmt.Sprintf("repos/%v/%v/comments/%v/reactions", owner, repo, id) u, err := addOptions(u, opts) if err != nil { @@ -143,7 +143,7 @@ func (s *ReactionsService) DeleteCommentReactionByID(ctx context.Context, repoID // GitHub API docs: https://docs.github.com/rest/reactions/reactions#list-reactions-for-an-issue // //meta:operation GET /repos/{owner}/{repo}/issues/{issue_number}/reactions -func (s *ReactionsService) ListIssueReactions(ctx context.Context, owner, repo string, number int, opts *ListOptions) ([]*Reaction, *Response, error) { +func (s *ReactionsService) ListIssueReactions(ctx context.Context, owner, repo string, number int, opts *ListReactionOptions) ([]*Reaction, *Response, error) { u := fmt.Sprintf("repos/%v/%v/issues/%v/reactions", owner, repo, number) u, err := addOptions(u, opts) if err != nil { @@ -223,7 +223,7 @@ func (s *ReactionsService) DeleteIssueReactionByID(ctx context.Context, repoID, // GitHub API docs: https://docs.github.com/rest/reactions/reactions#list-reactions-for-an-issue-comment // //meta:operation GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions -func (s *ReactionsService) ListIssueCommentReactions(ctx context.Context, owner, repo string, id int64, opts *ListOptions) ([]*Reaction, *Response, error) { +func (s *ReactionsService) ListIssueCommentReactions(ctx context.Context, owner, repo string, id int64, opts *ListReactionOptions) ([]*Reaction, *Response, error) { u := fmt.Sprintf("repos/%v/%v/issues/comments/%v/reactions", owner, repo, id) u, err := addOptions(u, opts) if err != nil { @@ -303,7 +303,7 @@ func (s *ReactionsService) DeleteIssueCommentReactionByID(ctx context.Context, r // GitHub API docs: https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-pull-request-review-comment // //meta:operation GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions -func (s *ReactionsService) ListPullRequestCommentReactions(ctx context.Context, owner, repo string, id int64, opts *ListOptions) ([]*Reaction, *Response, error) { +func (s *ReactionsService) ListPullRequestCommentReactions(ctx context.Context, owner, repo string, id int64, opts *ListReactionOptions) ([]*Reaction, *Response, error) { u := fmt.Sprintf("repos/%v/%v/pulls/comments/%v/reactions", owner, repo, id) u, err := addOptions(u, opts) if err != nil { @@ -383,7 +383,7 @@ func (s *ReactionsService) DeletePullRequestCommentReactionByID(ctx context.Cont // GitHub API docs: https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-legacy // //meta:operation GET /teams/{team_id}/discussions/{discussion_number}/reactions -func (s *ReactionsService) ListTeamDiscussionReactions(ctx context.Context, teamID int64, discussionNumber int, opts *ListOptions) ([]*Reaction, *Response, error) { +func (s *ReactionsService) ListTeamDiscussionReactions(ctx context.Context, teamID int64, discussionNumber int, opts *ListReactionOptions) ([]*Reaction, *Response, error) { u := fmt.Sprintf("teams/%v/discussions/%v/reactions", teamID, discussionNumber) u, err := addOptions(u, opts) if err != nil { @@ -459,7 +459,7 @@ func (s *ReactionsService) DeleteTeamDiscussionReactionByOrgIDAndTeamID(ctx cont // GitHub API docs: https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment-legacy // //meta:operation GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions -func (s *ReactionsService) ListTeamDiscussionCommentReactions(ctx context.Context, teamID int64, discussionNumber, commentNumber int, opts *ListOptions) ([]*Reaction, *Response, error) { +func (s *ReactionsService) ListTeamDiscussionCommentReactions(ctx context.Context, teamID int64, discussionNumber, commentNumber int, opts *ListReactionOptions) ([]*Reaction, *Response, error) { u := fmt.Sprintf("teams/%v/discussions/%v/comments/%v/reactions", teamID, discussionNumber, commentNumber) u, err := addOptions(u, opts) if err != nil { @@ -568,3 +568,54 @@ func (s *ReactionsService) CreateReleaseReaction(ctx context.Context, owner, rep return m, resp, nil } + +// ListReleaseReactions lists the reactions for a release. +// +// GitHub API docs: https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-release +// +//meta:operation GET /repos/{owner}/{repo}/releases/{release_id}/reactions +func (s *ReactionsService) ListReleaseReactions(ctx context.Context, owner, repo string, releaseID int64, opts *ListReactionOptions) ([]*Reaction, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/releases/%v/reactions", owner, repo, releaseID) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept headers when APIs fully launch. + req.Header.Set("Accept", mediaTypeReactionsPreview) + + var m []*Reaction + resp, err := s.client.Do(ctx, req, &m) + if err != nil { + return nil, resp, err + } + + return m, resp, nil +} + +// DeleteReleaseReaction deletes the reaction for a release. +// +// GitHub API docs: https://docs.github.com/rest/reactions/reactions#delete-a-release-reaction +// +//meta:operation DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id} +func (s *ReactionsService) DeleteReleaseReaction(ctx context.Context, owner, repo string, releaseID, reactionID int64) (*Response, error) { + u := fmt.Sprintf("repos/%v/%v/releases/%v/reactions/%v", owner, repo, releaseID, reactionID) + + return s.deleteReaction(ctx, u) +} + +// DeleteReleaseReactionByID deletes the reaction for a release by repository ID. +// +// GitHub API docs: https://docs.github.com/rest/reactions/reactions#delete-a-release-reaction +// +//meta:operation DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id} +func (s *ReactionsService) DeleteReleaseReactionByID(ctx context.Context, repoID, releaseID, reactionID int64) (*Response, error) { + u := fmt.Sprintf("repositories/%v/releases/%v/reactions/%v", repoID, releaseID, reactionID) + + return s.deleteReaction(ctx, u) +} diff --git a/vendor/github.com/google/go-github/v69/github/repos.go b/vendor/github.com/google/go-github/v71/github/repos.go similarity index 99% rename from vendor/github.com/google/go-github/v69/github/repos.go rename to vendor/github.com/google/go-github/v71/github/repos.go index 9faed40..c4ef5d5 100644 --- a/vendor/github.com/google/go-github/v69/github/repos.go +++ b/vendor/github.com/google/go-github/v71/github/repos.go @@ -833,7 +833,7 @@ func (s *RepositoriesService) DisableVulnerabilityAlerts(ctx context.Context, ow // GetAutomatedSecurityFixes checks if the automated security fixes for a repository are enabled. // -// GitHub API docs: https://docs.github.com/rest/repos/repos#check-if-automated-security-fixes-are-enabled-for-a-repository +// GitHub API docs: https://docs.github.com/rest/repos/repos#check-if-dependabot-security-updates-are-enabled-for-a-repository // //meta:operation GET /repos/{owner}/{repo}/automated-security-fixes func (s *RepositoriesService) GetAutomatedSecurityFixes(ctx context.Context, owner, repository string) (*AutomatedSecurityFixes, *Response, error) { @@ -854,7 +854,7 @@ func (s *RepositoriesService) GetAutomatedSecurityFixes(ctx context.Context, own // EnableAutomatedSecurityFixes enables the automated security fixes for a repository. // -// GitHub API docs: https://docs.github.com/rest/repos/repos#enable-automated-security-fixes +// GitHub API docs: https://docs.github.com/rest/repos/repos#enable-dependabot-security-updates // //meta:operation PUT /repos/{owner}/{repo}/automated-security-fixes func (s *RepositoriesService) EnableAutomatedSecurityFixes(ctx context.Context, owner, repository string) (*Response, error) { @@ -870,7 +870,7 @@ func (s *RepositoriesService) EnableAutomatedSecurityFixes(ctx context.Context, // DisableAutomatedSecurityFixes disables vulnerability alerts and the dependency graph for a repository. // -// GitHub API docs: https://docs.github.com/rest/repos/repos#disable-automated-security-fixes +// GitHub API docs: https://docs.github.com/rest/repos/repos#disable-dependabot-security-updates // //meta:operation DELETE /repos/{owner}/{repo}/automated-security-fixes func (s *RepositoriesService) DisableAutomatedSecurityFixes(ctx context.Context, owner, repository string) (*Response, error) { diff --git a/vendor/github.com/google/go-github/v69/github/repos_actions_access.go b/vendor/github.com/google/go-github/v71/github/repos_actions_access.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_actions_access.go rename to vendor/github.com/google/go-github/v71/github/repos_actions_access.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_actions_allowed.go b/vendor/github.com/google/go-github/v71/github/repos_actions_allowed.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_actions_allowed.go rename to vendor/github.com/google/go-github/v71/github/repos_actions_allowed.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_actions_permissions.go b/vendor/github.com/google/go-github/v71/github/repos_actions_permissions.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_actions_permissions.go rename to vendor/github.com/google/go-github/v71/github/repos_actions_permissions.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_attestations.go b/vendor/github.com/google/go-github/v71/github/repos_attestations.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_attestations.go rename to vendor/github.com/google/go-github/v71/github/repos_attestations.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_autolinks.go b/vendor/github.com/google/go-github/v71/github/repos_autolinks.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_autolinks.go rename to vendor/github.com/google/go-github/v71/github/repos_autolinks.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_codeowners.go b/vendor/github.com/google/go-github/v71/github/repos_codeowners.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_codeowners.go rename to vendor/github.com/google/go-github/v71/github/repos_codeowners.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_collaborators.go b/vendor/github.com/google/go-github/v71/github/repos_collaborators.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_collaborators.go rename to vendor/github.com/google/go-github/v71/github/repos_collaborators.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_comments.go b/vendor/github.com/google/go-github/v71/github/repos_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_comments.go rename to vendor/github.com/google/go-github/v71/github/repos_comments.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_commits.go b/vendor/github.com/google/go-github/v71/github/repos_commits.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_commits.go rename to vendor/github.com/google/go-github/v71/github/repos_commits.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_community_health.go b/vendor/github.com/google/go-github/v71/github/repos_community_health.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_community_health.go rename to vendor/github.com/google/go-github/v71/github/repos_community_health.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_contents.go b/vendor/github.com/google/go-github/v71/github/repos_contents.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_contents.go rename to vendor/github.com/google/go-github/v71/github/repos_contents.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_deployment_branch_policies.go b/vendor/github.com/google/go-github/v71/github/repos_deployment_branch_policies.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_deployment_branch_policies.go rename to vendor/github.com/google/go-github/v71/github/repos_deployment_branch_policies.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_deployment_protection_rules.go b/vendor/github.com/google/go-github/v71/github/repos_deployment_protection_rules.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_deployment_protection_rules.go rename to vendor/github.com/google/go-github/v71/github/repos_deployment_protection_rules.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_deployments.go b/vendor/github.com/google/go-github/v71/github/repos_deployments.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_deployments.go rename to vendor/github.com/google/go-github/v71/github/repos_deployments.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_environments.go b/vendor/github.com/google/go-github/v71/github/repos_environments.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_environments.go rename to vendor/github.com/google/go-github/v71/github/repos_environments.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_forks.go b/vendor/github.com/google/go-github/v71/github/repos_forks.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_forks.go rename to vendor/github.com/google/go-github/v71/github/repos_forks.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_hooks.go b/vendor/github.com/google/go-github/v71/github/repos_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_hooks.go rename to vendor/github.com/google/go-github/v71/github/repos_hooks.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_hooks_configuration.go b/vendor/github.com/google/go-github/v71/github/repos_hooks_configuration.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_hooks_configuration.go rename to vendor/github.com/google/go-github/v71/github/repos_hooks_configuration.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_hooks_deliveries.go b/vendor/github.com/google/go-github/v71/github/repos_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_hooks_deliveries.go rename to vendor/github.com/google/go-github/v71/github/repos_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_invitations.go b/vendor/github.com/google/go-github/v71/github/repos_invitations.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_invitations.go rename to vendor/github.com/google/go-github/v71/github/repos_invitations.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_keys.go b/vendor/github.com/google/go-github/v71/github/repos_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_keys.go rename to vendor/github.com/google/go-github/v71/github/repos_keys.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_lfs.go b/vendor/github.com/google/go-github/v71/github/repos_lfs.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_lfs.go rename to vendor/github.com/google/go-github/v71/github/repos_lfs.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_merging.go b/vendor/github.com/google/go-github/v71/github/repos_merging.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_merging.go rename to vendor/github.com/google/go-github/v71/github/repos_merging.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_pages.go b/vendor/github.com/google/go-github/v71/github/repos_pages.go similarity index 91% rename from vendor/github.com/google/go-github/v69/github/repos_pages.go rename to vendor/github.com/google/go-github/v71/github/repos_pages.go index 6b9ba76..930f600 100644 --- a/vendor/github.com/google/go-github/v69/github/repos_pages.go +++ b/vendor/github.com/google/go-github/v71/github/repos_pages.go @@ -170,7 +170,36 @@ func (s *RepositoriesService) UpdatePages(ctx context.Context, owner, repo strin if err != nil { return resp, err } + return resp, nil +} +// PagesUpdateWithoutCNAME defines parameters for updating a GitHub Pages site on GitHub Enterprise Servers. +// Sending a request with a CNAME (any value, empty string, or null) results in a 400 error: "Custom domains are not available for GitHub Pages". +type PagesUpdateWithoutCNAME struct { + BuildType *string `json:"build_type,omitempty"` + Source *PagesSource `json:"source,omitempty"` + Public *bool `json:"public,omitempty"` + HTTPSEnforced *bool `json:"https_enforced,omitempty"` +} + +// UpdatePagesGHES updates GitHub Pages for the named repo in GitHub Enterprise Servers. +// +// GitHub API docs: https://docs.github.com/rest/pages/pages#update-information-about-a-github-pages-site +// +//meta:operation PUT /repos/{owner}/{repo}/pages +func (s *RepositoriesService) UpdatePagesGHES(ctx context.Context, owner, repo string, opts *PagesUpdateWithoutCNAME) (*Response, error) { + u := fmt.Sprintf("repos/%v/%v/pages", owner, repo) + + req, err := s.client.NewRequest("PUT", u, opts) + + if err != nil { + return nil, err + } + + resp, err := s.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } return resp, nil } diff --git a/vendor/github.com/google/go-github/v69/github/repos_prereceive_hooks.go b/vendor/github.com/google/go-github/v71/github/repos_prereceive_hooks.go similarity index 93% rename from vendor/github.com/google/go-github/v69/github/repos_prereceive_hooks.go rename to vendor/github.com/google/go-github/v71/github/repos_prereceive_hooks.go index e97075d..82f6ba0 100644 --- a/vendor/github.com/google/go-github/v69/github/repos_prereceive_hooks.go +++ b/vendor/github.com/google/go-github/v71/github/repos_prereceive_hooks.go @@ -24,7 +24,7 @@ func (p PreReceiveHook) String() string { // ListPreReceiveHooks lists all pre-receive hooks for the specified repository. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/repo-pre-receive-hooks#list-pre-receive-hooks-for-a-repository +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/repo-pre-receive-hooks#list-pre-receive-hooks-for-a-repository // //meta:operation GET /repos/{owner}/{repo}/pre-receive-hooks func (s *RepositoriesService) ListPreReceiveHooks(ctx context.Context, owner, repo string, opts *ListOptions) ([]*PreReceiveHook, *Response, error) { @@ -53,7 +53,7 @@ func (s *RepositoriesService) ListPreReceiveHooks(ctx context.Context, owner, re // GetPreReceiveHook returns a single specified pre-receive hook. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/repo-pre-receive-hooks#get-a-pre-receive-hook-for-a-repository +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/repo-pre-receive-hooks#get-a-pre-receive-hook-for-a-repository // //meta:operation GET /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id} func (s *RepositoriesService) GetPreReceiveHook(ctx context.Context, owner, repo string, id int64) (*PreReceiveHook, *Response, error) { @@ -77,7 +77,7 @@ func (s *RepositoriesService) GetPreReceiveHook(ctx context.Context, owner, repo // UpdatePreReceiveHook updates a specified pre-receive hook. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/repo-pre-receive-hooks#update-pre-receive-hook-enforcement-for-a-repository +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/repo-pre-receive-hooks#update-pre-receive-hook-enforcement-for-a-repository // //meta:operation PATCH /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id} func (s *RepositoriesService) UpdatePreReceiveHook(ctx context.Context, owner, repo string, id int64, hook *PreReceiveHook) (*PreReceiveHook, *Response, error) { @@ -101,7 +101,7 @@ func (s *RepositoriesService) UpdatePreReceiveHook(ctx context.Context, owner, r // DeletePreReceiveHook deletes a specified pre-receive hook. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/repo-pre-receive-hooks#remove-pre-receive-hook-enforcement-for-a-repository +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/repo-pre-receive-hooks#remove-pre-receive-hook-enforcement-for-a-repository // //meta:operation DELETE /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id} func (s *RepositoriesService) DeletePreReceiveHook(ctx context.Context, owner, repo string, id int64) (*Response, error) { diff --git a/vendor/github.com/google/go-github/v69/github/repos_properties.go b/vendor/github.com/google/go-github/v71/github/repos_properties.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_properties.go rename to vendor/github.com/google/go-github/v71/github/repos_properties.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_releases.go b/vendor/github.com/google/go-github/v71/github/repos_releases.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_releases.go rename to vendor/github.com/google/go-github/v71/github/repos_releases.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_rules.go b/vendor/github.com/google/go-github/v71/github/repos_rules.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_rules.go rename to vendor/github.com/google/go-github/v71/github/repos_rules.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_stats.go b/vendor/github.com/google/go-github/v71/github/repos_stats.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_stats.go rename to vendor/github.com/google/go-github/v71/github/repos_stats.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_statuses.go b/vendor/github.com/google/go-github/v71/github/repos_statuses.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_statuses.go rename to vendor/github.com/google/go-github/v71/github/repos_statuses.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_tags.go b/vendor/github.com/google/go-github/v71/github/repos_tags.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_tags.go rename to vendor/github.com/google/go-github/v71/github/repos_tags.go diff --git a/vendor/github.com/google/go-github/v69/github/repos_traffic.go b/vendor/github.com/google/go-github/v71/github/repos_traffic.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/repos_traffic.go rename to vendor/github.com/google/go-github/v71/github/repos_traffic.go diff --git a/vendor/github.com/google/go-github/v69/github/rules.go b/vendor/github.com/google/go-github/v71/github/rules.go similarity index 98% rename from vendor/github.com/google/go-github/v69/github/rules.go rename to vendor/github.com/google/go-github/v71/github/rules.go index 8312d95..985f0aa 100644 --- a/vendor/github.com/google/go-github/v69/github/rules.go +++ b/vendor/github.com/google/go-github/v71/github/rules.go @@ -395,12 +395,13 @@ type RequiredDeploymentsRuleParameters struct { // PullRequestRuleParameters represents the pull_request rule parameters. type PullRequestRuleParameters struct { - AllowedMergeMethods []MergeMethod `json:"allowed_merge_methods"` - DismissStaleReviewsOnPush bool `json:"dismiss_stale_reviews_on_push"` - RequireCodeOwnerReview bool `json:"require_code_owner_review"` - RequireLastPushApproval bool `json:"require_last_push_approval"` - RequiredApprovingReviewCount int `json:"required_approving_review_count"` - RequiredReviewThreadResolution bool `json:"required_review_thread_resolution"` + AllowedMergeMethods []MergeMethod `json:"allowed_merge_methods"` + AutomaticCopilotCodeReviewEnabled *bool `json:"automatic_copilot_code_review_enabled,omitempty"` + DismissStaleReviewsOnPush bool `json:"dismiss_stale_reviews_on_push"` + RequireCodeOwnerReview bool `json:"require_code_owner_review"` + RequireLastPushApproval bool `json:"require_last_push_approval"` + RequiredApprovingReviewCount int `json:"required_approving_review_count"` + RequiredReviewThreadResolution bool `json:"required_review_thread_resolution"` } // RequiredStatusChecksRuleParameters represents the required status checks rule parameters. diff --git a/vendor/github.com/google/go-github/v69/github/scim.go b/vendor/github.com/google/go-github/v71/github/scim.go similarity index 78% rename from vendor/github.com/google/go-github/v69/github/scim.go rename to vendor/github.com/google/go-github/v71/github/scim.go index 4b34c16..70f063c 100644 --- a/vendor/github.com/google/go-github/v69/github/scim.go +++ b/vendor/github.com/google/go-github/v71/github/scim.go @@ -17,6 +17,26 @@ import ( // GitHub API docs: https://docs.github.com/rest/scim type SCIMService service +// SCIMGroupAttributes represents supported SCIM Group attributes. +// +// GitHub API docs: https://docs.github.com/en/enterprise-cloud@latest/rest/enterprise-admin/scim#list-provisioned-scim-groups-for-an-enterprise +type SCIMGroupAttributes struct { + DisplayName *string `json:"displayName,omitempty"` // The name of the group, suitable for display to end-users. (Optional.) + Members []*SCIMDisplayReference `json:"members,omitempty"` // (Optional.) + Schemas []string `json:"schemas,omitempty"` // (Optional.) + ExternalID *string `json:"externalId,omitempty"` // (Optional.) + // Only populated as a result of calling ListSCIMProvisionedIdentitiesOptions: + ID *string `json:"id,omitempty"` + Meta *SCIMMeta `json:"meta,omitempty"` +} + +// SCIMDisplayReference represents a JSON SCIM (System for Cross-domain Identity Management) resource. +type SCIMDisplayReference struct { + Value string `json:"value"` // (Required.) + Ref string `json:"$ref"` // (Required.) + Display *string `json:"display,omitempty"` // (Optional.) +} + // SCIMUserAttributes represents supported SCIM User attributes. // // GitHub API docs: https://docs.github.com/rest/scim#supported-scim-user-attributes @@ -56,6 +76,15 @@ type SCIMMeta struct { Location *string `json:"location,omitempty"` } +// SCIMProvisionedGroups represents the result of calling ListSCIMProvisionedGroupsForEnterprise. +type SCIMProvisionedGroups struct { + Schemas []string `json:"schemas,omitempty"` + TotalResults *int `json:"totalResults,omitempty"` + ItemsPerPage *int `json:"itemsPerPage,omitempty"` + StartIndex *int `json:"startIndex,omitempty"` + Resources []*SCIMGroupAttributes `json:"Resources,omitempty"` +} + // SCIMProvisionedIdentities represents the result of calling ListSCIMProvisionedIdentities. type SCIMProvisionedIdentities struct { Schemas []string `json:"schemas,omitempty"` @@ -217,3 +246,25 @@ func (s *SCIMService) DeleteSCIMUserFromOrg(ctx context.Context, org, scimUserID return s.client.Do(ctx, req, nil) } + +// ListSCIMProvisionedGroupsForEnterprise lists SCIM provisioned groups for an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/scim#list-provisioned-scim-groups-for-an-enterprise +// +//meta:operation GET /scim/v2/enterprises/{enterprise}/Groups +func (s *SCIMService) ListSCIMProvisionedGroupsForEnterprise(ctx context.Context, enterprise string, opts *ListSCIMProvisionedIdentitiesOptions) (*SCIMProvisionedGroups, *Response, error) { + u := fmt.Sprintf("scim/v2/enterprises/%v/Groups", enterprise) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + groups := new(SCIMProvisionedGroups) + resp, err := s.client.Do(ctx, req, groups) + if err != nil { + return nil, resp, err + } + + return groups, resp, nil +} diff --git a/vendor/github.com/google/go-github/v69/github/search.go b/vendor/github.com/google/go-github/v71/github/search.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/search.go rename to vendor/github.com/google/go-github/v71/github/search.go diff --git a/vendor/github.com/google/go-github/v69/github/secret_scanning.go b/vendor/github.com/google/go-github/v71/github/secret_scanning.go similarity index 95% rename from vendor/github.com/google/go-github/v69/github/secret_scanning.go rename to vendor/github.com/google/go-github/v71/github/secret_scanning.go index fc0fe0c..4eeeba3 100644 --- a/vendor/github.com/google/go-github/v69/github/secret_scanning.go +++ b/vendor/github.com/google/go-github/v71/github/secret_scanning.go @@ -68,6 +68,16 @@ type SecretScanningAlertListOptions struct { // Valid resolutions are false_positive, wont_fix, revoked, pattern_edited, pattern_deleted or used_in_tests. Resolution string `url:"resolution,omitempty"` + // A comma-separated list of validities that, when present, will return alerts that match the validities in this list. + // Valid options are active, inactive, and unknown. + Validity string `url:"validity,omitempty"` + + // The direction to sort the results by. Possible values are: asc, desc. Default: desc. + Direction string `url:"direction,omitempty"` + + // The property by which to sort the results. Possible values are: created, updated. Default: created. + Sort string `url:"sort,omitempty"` + ListCursorOptions // List options can vary on the Enterprise type. diff --git a/vendor/github.com/google/go-github/v69/github/security_advisories.go b/vendor/github.com/google/go-github/v71/github/security_advisories.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/security_advisories.go rename to vendor/github.com/google/go-github/v71/github/security_advisories.go diff --git a/vendor/github.com/google/go-github/v69/github/strings.go b/vendor/github.com/google/go-github/v71/github/strings.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/strings.go rename to vendor/github.com/google/go-github/v71/github/strings.go diff --git a/vendor/github.com/google/go-github/v69/github/teams.go b/vendor/github.com/google/go-github/v71/github/teams.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/teams.go rename to vendor/github.com/google/go-github/v71/github/teams.go diff --git a/vendor/github.com/google/go-github/v69/github/teams_discussion_comments.go b/vendor/github.com/google/go-github/v71/github/teams_discussion_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/teams_discussion_comments.go rename to vendor/github.com/google/go-github/v71/github/teams_discussion_comments.go diff --git a/vendor/github.com/google/go-github/v69/github/teams_discussions.go b/vendor/github.com/google/go-github/v71/github/teams_discussions.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/teams_discussions.go rename to vendor/github.com/google/go-github/v71/github/teams_discussions.go diff --git a/vendor/github.com/google/go-github/v69/github/teams_members.go b/vendor/github.com/google/go-github/v71/github/teams_members.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/teams_members.go rename to vendor/github.com/google/go-github/v71/github/teams_members.go diff --git a/vendor/github.com/google/go-github/v69/github/timestamp.go b/vendor/github.com/google/go-github/v71/github/timestamp.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/timestamp.go rename to vendor/github.com/google/go-github/v71/github/timestamp.go diff --git a/vendor/github.com/google/go-github/v69/github/users.go b/vendor/github.com/google/go-github/v71/github/users.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/users.go rename to vendor/github.com/google/go-github/v71/github/users.go diff --git a/vendor/github.com/google/go-github/v69/github/users_administration.go b/vendor/github.com/google/go-github/v71/github/users_administration.go similarity index 91% rename from vendor/github.com/google/go-github/v69/github/users_administration.go rename to vendor/github.com/google/go-github/v71/github/users_administration.go index c0aa3b6..67fef61 100644 --- a/vendor/github.com/google/go-github/v69/github/users_administration.go +++ b/vendor/github.com/google/go-github/v71/github/users_administration.go @@ -12,7 +12,7 @@ import ( // PromoteSiteAdmin promotes a user to a site administrator of a GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/users#promote-a-user-to-be-a-site-administrator +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/users#promote-a-user-to-be-a-site-administrator // //meta:operation PUT /users/{username}/site_admin func (s *UsersService) PromoteSiteAdmin(ctx context.Context, user string) (*Response, error) { @@ -28,7 +28,7 @@ func (s *UsersService) PromoteSiteAdmin(ctx context.Context, user string) (*Resp // DemoteSiteAdmin demotes a user from site administrator of a GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/users#demote-a-site-administrator +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/users#demote-a-site-administrator // //meta:operation DELETE /users/{username}/site_admin func (s *UsersService) DemoteSiteAdmin(ctx context.Context, user string) (*Response, error) { @@ -49,7 +49,7 @@ type UserSuspendOptions struct { // Suspend a user on a GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/users#suspend-a-user +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/users#suspend-a-user // //meta:operation PUT /users/{username}/suspended func (s *UsersService) Suspend(ctx context.Context, user string, opts *UserSuspendOptions) (*Response, error) { @@ -65,7 +65,7 @@ func (s *UsersService) Suspend(ctx context.Context, user string, opts *UserSuspe // Unsuspend a user on a GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/users#unsuspend-a-user +// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/enterprise-admin/users#unsuspend-a-user // //meta:operation DELETE /users/{username}/suspended func (s *UsersService) Unsuspend(ctx context.Context, user string) (*Response, error) { diff --git a/vendor/github.com/google/go-github/v69/github/users_attestations.go b/vendor/github.com/google/go-github/v71/github/users_attestations.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/users_attestations.go rename to vendor/github.com/google/go-github/v71/github/users_attestations.go diff --git a/vendor/github.com/google/go-github/v69/github/users_blocking.go b/vendor/github.com/google/go-github/v71/github/users_blocking.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/users_blocking.go rename to vendor/github.com/google/go-github/v71/github/users_blocking.go diff --git a/vendor/github.com/google/go-github/v69/github/users_emails.go b/vendor/github.com/google/go-github/v71/github/users_emails.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/users_emails.go rename to vendor/github.com/google/go-github/v71/github/users_emails.go diff --git a/vendor/github.com/google/go-github/v69/github/users_followers.go b/vendor/github.com/google/go-github/v71/github/users_followers.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/users_followers.go rename to vendor/github.com/google/go-github/v71/github/users_followers.go diff --git a/vendor/github.com/google/go-github/v69/github/users_gpg_keys.go b/vendor/github.com/google/go-github/v71/github/users_gpg_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/users_gpg_keys.go rename to vendor/github.com/google/go-github/v71/github/users_gpg_keys.go diff --git a/vendor/github.com/google/go-github/v69/github/users_keys.go b/vendor/github.com/google/go-github/v71/github/users_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/users_keys.go rename to vendor/github.com/google/go-github/v71/github/users_keys.go diff --git a/vendor/github.com/google/go-github/v69/github/users_packages.go b/vendor/github.com/google/go-github/v71/github/users_packages.go similarity index 98% rename from vendor/github.com/google/go-github/v69/github/users_packages.go rename to vendor/github.com/google/go-github/v71/github/users_packages.go index 3ccf68a..b813dd9 100644 --- a/vendor/github.com/google/go-github/v69/github/users_packages.go +++ b/vendor/github.com/google/go-github/v71/github/users_packages.go @@ -8,6 +8,7 @@ package github import ( "context" "fmt" + "net/url" ) // ListPackages lists the packages for a user. Passing the empty string for "user" will @@ -55,9 +56,9 @@ func (s *UsersService) ListPackages(ctx context.Context, user string, opts *Pack func (s *UsersService) GetPackage(ctx context.Context, user, packageType, packageName string) (*Package, *Response, error) { var u string if user != "" { - u = fmt.Sprintf("users/%v/packages/%v/%v", user, packageType, packageName) + u = fmt.Sprintf("users/%v/packages/%v/%v", user, packageType, url.PathEscape(packageName)) } else { - u = fmt.Sprintf("user/packages/%v/%v", packageType, packageName) + u = fmt.Sprintf("user/packages/%v/%v", packageType, url.PathEscape(packageName)) } req, err := s.client.NewRequest("GET", u, nil) diff --git a/vendor/github.com/google/go-github/v69/github/users_ssh_signing_keys.go b/vendor/github.com/google/go-github/v71/github/users_ssh_signing_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/users_ssh_signing_keys.go rename to vendor/github.com/google/go-github/v71/github/users_ssh_signing_keys.go diff --git a/vendor/github.com/google/go-github/v69/github/with_appengine.go b/vendor/github.com/google/go-github/v71/github/with_appengine.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/with_appengine.go rename to vendor/github.com/google/go-github/v71/github/with_appengine.go diff --git a/vendor/github.com/google/go-github/v69/github/without_appengine.go b/vendor/github.com/google/go-github/v71/github/without_appengine.go similarity index 100% rename from vendor/github.com/google/go-github/v69/github/without_appengine.go rename to vendor/github.com/google/go-github/v71/github/without_appengine.go diff --git a/vendor/modules.txt b/vendor/modules.txt index 9b49578..4416443 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -45,8 +45,8 @@ github.com/alecthomas/chroma/lexers/w github.com/alecthomas/chroma/lexers/x github.com/alecthomas/chroma/lexers/y github.com/alecthomas/chroma/styles -# github.com/bradleyfalzon/ghinstallation/v2 v2.14.0 -## explicit; go 1.22.0 +# github.com/bradleyfalzon/ghinstallation/v2 v2.15.0 +## explicit; go 1.23.0 github.com/bradleyfalzon/ghinstallation/v2 # github.com/briandowns/spinner v1.23.2 ## explicit; go 1.17 @@ -96,9 +96,9 @@ github.com/gomarkdown/markdown/parser # github.com/google/go-github/v62 v62.0.0 ## explicit; go 1.21 github.com/google/go-github/v62/github -# github.com/google/go-github/v69 v69.0.0 -## explicit; go 1.22.0 -github.com/google/go-github/v69/github +# github.com/google/go-github/v71 v71.0.0 +## explicit; go 1.23.0 +github.com/google/go-github/v71/github # github.com/google/go-querystring v1.1.0 ## explicit; go 1.10 github.com/google/go-querystring/query