From 5d6ace6a2c73cbcae48ad40cb1cfe725c1f5c34e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2025 06:41:00 +0000 Subject: [PATCH] Bump github.com/bradleyfalzon/ghinstallation/v2 from 2.12.0 to 2.13.0 Bumps [github.com/bradleyfalzon/ghinstallation/v2](https://github.com/bradleyfalzon/ghinstallation) from 2.12.0 to 2.13.0. - [Release notes](https://github.com/bradleyfalzon/ghinstallation/releases) - [Commits](https://github.com/bradleyfalzon/ghinstallation/compare/v2.12.0...v2.13.0) --- updated-dependencies: - dependency-name: github.com/bradleyfalzon/ghinstallation/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 4 +- go.sum | 8 +- .../ghinstallation/v2/transport.go | 2 +- .../google/go-github/v66/github/copilot.go | 315 --- .../go-github/v66/github/orgs_projects.go | 64 - .../google/go-github/v66/github/projects.go | 634 ----- .../go-github/v66/github/repos_projects.go | 73 - .../go-github/v66/github/users_projects.go | 72 - .../google/go-github/{v66 => v68}/AUTHORS | 10 + .../google/go-github/{v66 => v68}/LICENSE | 0 .../go-github/{v66 => v68}/github/actions.go | 0 .../{v66 => v68}/github/actions_artifacts.go | 12 +- .../{v66 => v68}/github/actions_cache.go | 0 .../{v66 => v68}/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 | 26 +- .../{v66 => v68}/github/actions_runners.go | 0 .../{v66 => v68}/github/actions_secrets.go | 2 +- .../{v66 => v68}/github/actions_variables.go | 0 .../github/actions_workflow_jobs.go | 0 .../github/actions_workflow_runs.go | 0 .../{v66 => v68}/github/actions_workflows.go | 0 .../go-github/{v66 => v68}/github/activity.go | 0 .../{v66 => v68}/github/activity_events.go | 0 .../github/activity_notifications.go | 0 .../{v66 => v68}/github/activity_star.go | 0 .../{v66 => v68}/github/activity_watching.go | 0 .../go-github/{v66 => v68}/github/admin.go | 4 +- .../{v66 => v68}/github/admin_orgs.go | 6 +- .../{v66 => v68}/github/admin_stats.go | 2 +- .../{v66 => v68}/github/admin_users.go | 8 +- .../go-github/{v66 => v68}/github/apps.go | 34 +- .../{v66 => v68}/github/apps_hooks.go | 0 .../github/apps_hooks_deliveries.go | 0 .../{v66 => v68}/github/apps_installation.go | 0 .../{v66 => v68}/github/apps_manifest.go | 0 .../{v66 => v68}/github/apps_marketplace.go | 0 .../go-github/v68/github/attestations.go | 27 + .../{v66 => v68}/github/authorizations.go | 6 +- .../go-github/{v66 => v68}/github/billing.go | 0 .../go-github/{v66 => v68}/github/checks.go | 4 +- .../github/code_scanning.go} | 0 .../{v66 => v68}/github/codesofconduct.go | 4 +- .../{v66 => v68}/github/codespaces.go | 0 .../{v66 => v68}/github/codespaces_secrets.go | 0 .../google/go-github/v68/github/copilot.go | 570 +++++ .../{v66 => v68}/github/dependabot.go | 0 .../{v66 => v68}/github/dependabot_alerts.go | 0 .../{v66 => v68}/github/dependabot_secrets.go | 0 .../{v66 => v68}/github/dependency_graph.go | 0 .../github/dependency_graph_snapshots.go | 0 .../go-github/{v66 => v68}/github/doc.go | 6 +- .../go-github/{v66 => v68}/github/emojis.go | 2 +- .../{v66 => v68}/github/enterprise.go | 0 .../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 .../v68/github/enterprise_properties.go | 121 + .../go-github/{v66 => v68}/github/event.go | 0 .../{v66 => v68}/github/event_types.go | 153 +- .../go-github/{v66 => v68}/github/gists.go | 0 .../{v66 => v68}/github/gists_comments.go | 0 .../go-github/{v66 => v68}/github/git.go | 0 .../{v66 => v68}/github/git_blobs.go | 0 .../{v66 => v68}/github/git_commits.go | 3 +- .../go-github/{v66 => v68}/github/git_refs.go | 2 +- .../go-github/{v66 => v68}/github/git_tags.go | 0 .../{v66 => v68}/github/git_trees.go | 0 .../{v66 => v68}/github/github-accessors.go | 2104 ++++++++++++----- .../go-github/{v66 => v68}/github/github.go | 45 +- .../{v66 => v68}/github/gitignore.go | 0 .../{v66 => v68}/github/interactions.go | 0 .../{v66 => v68}/github/interactions_orgs.go | 2 +- .../{v66 => v68}/github/interactions_repos.go | 2 +- .../{v66 => v68}/github/issue_import.go | 0 .../go-github/{v66 => v68}/github/issues.go | 0 .../{v66 => v68}/github/issues_assignees.go | 0 .../{v66 => v68}/github/issues_comments.go | 0 .../{v66 => v68}/github/issues_events.go | 1 - .../{v66 => v68}/github/issues_labels.go | 2 +- .../{v66 => v68}/github/issues_milestones.go | 0 .../{v66 => v68}/github/issues_timeline.go | 11 +- .../go-github/{v66 => v68}/github/licenses.go | 0 .../go-github/{v66 => v68}/github/markdown.go | 6 +- .../go-github/{v66 => v68}/github/messages.go | 140 +- .../go-github/{v66 => v68}/github/meta.go | 0 .../{v66 => v68}/github/migrations.go | 4 +- .../github/migrations_source_import.go | 0 .../{v66 => v68}/github/migrations_user.go | 4 +- .../go-github/{v66 => v68}/github/orgs.go | 0 .../github/orgs_actions_allowed.go | 0 .../github/orgs_actions_permissions.go | 0 .../go-github/v68/github/orgs_attestations.go | 40 + .../{v66 => v68}/github/orgs_audit_log.go | 0 .../orgs_codesecurity_configurations.go | 284 +++ .../github/orgs_credential_authorizations.go | 0 .../github/orgs_custom_repository_roles.go | 23 + .../{v66 => v68}/github/orgs_hooks.go | 0 .../github/orgs_hooks_configuration.go | 0 .../github/orgs_hooks_deliveries.go | 0 .../{v66 => v68}/github/orgs_members.go | 0 .../github/orgs_organization_roles.go | 6 +- .../github/orgs_outside_collaborators.go | 0 .../{v66 => v68}/github/orgs_packages.go | 0 .../github/orgs_personal_access_tokens.go | 0 .../{v66 => v68}/github/orgs_properties.go | 13 +- .../{v66 => v68}/github/orgs_rules.go | 0 .../github/orgs_security_managers.go | 0 .../github/orgs_users_blocking.go | 0 .../go-github/{v66 => v68}/github/packages.go | 0 .../go-github/{v66 => v68}/github/pulls.go | 3 +- .../{v66 => v68}/github/pulls_comments.go | 0 .../{v66 => v68}/github/pulls_reviewers.go | 22 +- .../{v66 => v68}/github/pulls_reviews.go | 0 .../{v66 => v68}/github/pulls_threads.go | 0 .../{v66 => v68}/github/rate_limit.go | 0 .../{v66 => v68}/github/reactions.go | 14 +- .../go-github/{v66 => v68}/github/repos.go | 4 +- .../github/repos_actions_access.go | 0 .../github/repos_actions_allowed.go | 0 .../github/repos_actions_permissions.go | 0 .../v68/github/repos_attestations.go | 39 + .../{v66 => v68}/github/repos_autolinks.go | 0 .../{v66 => v68}/github/repos_codeowners.go | 0 .../github/repos_collaborators.go | 0 .../{v66 => v68}/github/repos_comments.go | 0 .../{v66 => v68}/github/repos_commits.go | 0 .../github/repos_community_health.go | 0 .../{v66 => v68}/github/repos_contents.go | 2 +- .../repos_deployment_branch_policies.go | 0 .../repos_deployment_protection_rules.go | 0 .../{v66 => v68}/github/repos_deployments.go | 6 +- .../{v66 => v68}/github/repos_environments.go | 4 +- .../{v66 => v68}/github/repos_forks.go | 0 .../{v66 => v68}/github/repos_hooks.go | 0 .../github/repos_hooks_configuration.go | 0 .../github/repos_hooks_deliveries.go | 0 .../{v66 => v68}/github/repos_invitations.go | 1 + .../{v66 => v68}/github/repos_keys.go | 0 .../{v66 => v68}/github/repos_lfs.go | 0 .../{v66 => v68}/github/repos_merging.go | 0 .../{v66 => v68}/github/repos_pages.go | 0 .../github/repos_prereceive_hooks.go | 8 +- .../{v66 => v68}/github/repos_properties.go | 0 .../{v66 => v68}/github/repos_releases.go | 9 +- .../{v66 => v68}/github/repos_rules.go | 304 ++- .../{v66 => v68}/github/repos_stats.go | 10 +- .../{v66 => v68}/github/repos_statuses.go | 0 .../{v66 => v68}/github/repos_tags.go | 15 +- .../{v66 => v68}/github/repos_traffic.go | 0 .../go-github/{v66 => v68}/github/scim.go | 0 .../go-github/{v66 => v68}/github/search.go | 2 +- .../{v66 => v68}/github/secret_scanning.go | 22 +- .../github/security_advisories.go | 0 .../go-github/{v66 => v68}/github/strings.go | 0 .../go-github/{v66 => v68}/github/teams.go | 94 +- .../github/teams_discussion_comments.go | 0 .../{v66 => v68}/github/teams_discussions.go | 0 .../{v66 => v68}/github/teams_members.go | 0 .../{v66 => v68}/github/timestamp.go | 2 +- .../go-github/{v66 => v68}/github/users.go | 12 +- .../github/users_administration.go | 8 +- .../v68/github/users_attestations.go | 40 + .../{v66 => v68}/github/users_blocking.go | 0 .../{v66 => v68}/github/users_emails.go | 2 +- .../{v66 => v68}/github/users_followers.go | 0 .../{v66 => v68}/github/users_gpg_keys.go | 0 .../{v66 => v68}/github/users_keys.go | 0 .../{v66 => v68}/github/users_packages.go | 0 .../github/users_ssh_signing_keys.go | 0 .../{v66 => v68}/github/with_appengine.go | 1 - .../{v66 => v68}/github/without_appengine.go | 1 - vendor/modules.txt | 6 +- 176 files changed, 3390 insertions(+), 2102 deletions(-) delete mode 100644 vendor/github.com/google/go-github/v66/github/copilot.go delete mode 100644 vendor/github.com/google/go-github/v66/github/orgs_projects.go delete mode 100644 vendor/github.com/google/go-github/v66/github/projects.go delete mode 100644 vendor/github.com/google/go-github/v66/github/repos_projects.go delete mode 100644 vendor/github.com/google/go-github/v66/github/users_projects.go rename vendor/github.com/google/go-github/{v66 => v68}/AUTHORS (97%) rename vendor/github.com/google/go-github/{v66 => v68}/LICENSE (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/actions.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/actions_artifacts.go (93%) rename vendor/github.com/google/go-github/{v66 => v68}/github/actions_cache.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/actions_oidc.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/actions_permissions_enterprise.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/actions_permissions_orgs.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/actions_required_workflows.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/actions_runner_groups.go (84%) rename vendor/github.com/google/go-github/{v66 => v68}/github/actions_runners.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/actions_secrets.go (99%) rename vendor/github.com/google/go-github/{v66 => v68}/github/actions_variables.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/actions_workflow_jobs.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/actions_workflow_runs.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/actions_workflows.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/activity.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/activity_events.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/activity_notifications.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/activity_star.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/activity_watching.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/admin.go (97%) rename vendor/github.com/google/go-github/{v66 => v68}/github/admin_orgs.go (93%) rename vendor/github.com/google/go-github/{v66 => v68}/github/admin_stats.go (98%) rename vendor/github.com/google/go-github/{v66 => v68}/github/admin_users.go (94%) rename vendor/github.com/google/go-github/{v66 => v68}/github/apps.go (87%) rename vendor/github.com/google/go-github/{v66 => v68}/github/apps_hooks.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/apps_hooks_deliveries.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/apps_installation.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/apps_manifest.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/apps_marketplace.go (100%) create mode 100644 vendor/github.com/google/go-github/v68/github/attestations.go rename vendor/github.com/google/go-github/{v66 => v68}/github/authorizations.go (98%) rename vendor/github.com/google/go-github/{v66 => v68}/github/billing.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/checks.go (99%) rename vendor/github.com/google/go-github/{v66/github/code-scanning.go => v68/github/code_scanning.go} (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/codesofconduct.go (95%) rename vendor/github.com/google/go-github/{v66 => v68}/github/codespaces.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/codespaces_secrets.go (100%) create mode 100644 vendor/github.com/google/go-github/v68/github/copilot.go rename vendor/github.com/google/go-github/{v66 => v68}/github/dependabot.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/dependabot_alerts.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/dependabot_secrets.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/dependency_graph.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/dependency_graph_snapshots.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/doc.go (98%) rename vendor/github.com/google/go-github/{v66 => v68}/github/emojis.go (95%) rename vendor/github.com/google/go-github/{v66 => v68}/github/enterprise.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/enterprise_actions_runner_groups.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/enterprise_actions_runners.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/enterprise_audit_log.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/enterprise_code_security_and_analysis.go (100%) create mode 100644 vendor/github.com/google/go-github/v68/github/enterprise_properties.go rename vendor/github.com/google/go-github/{v66 => v68}/github/event.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/event_types.go (95%) rename vendor/github.com/google/go-github/{v66 => v68}/github/gists.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/gists_comments.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/git.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/git_blobs.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/git_commits.go (98%) rename vendor/github.com/google/go-github/{v66 => v68}/github/git_refs.go (98%) rename vendor/github.com/google/go-github/{v66 => v68}/github/git_tags.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/git_trees.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/github-accessors.go (94%) rename vendor/github.com/google/go-github/{v66 => v68}/github/github.go (98%) rename vendor/github.com/google/go-github/{v66 => v68}/github/gitignore.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/interactions.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/interactions_orgs.go (97%) rename vendor/github.com/google/go-github/{v66 => v68}/github/interactions_repos.go (97%) rename vendor/github.com/google/go-github/{v66 => v68}/github/issue_import.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/issues.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/issues_assignees.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/issues_comments.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/issues_events.go (98%) rename vendor/github.com/google/go-github/{v66 => v68}/github/issues_labels.go (99%) rename vendor/github.com/google/go-github/{v66 => v68}/github/issues_milestones.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/issues_timeline.go (94%) rename vendor/github.com/google/go-github/{v66 => v68}/github/licenses.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/markdown.go (93%) rename vendor/github.com/google/go-github/{v66 => v68}/github/messages.go (69%) rename vendor/github.com/google/go-github/{v66 => v68}/github/meta.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/migrations.go (98%) rename vendor/github.com/google/go-github/{v66 => v68}/github/migrations_source_import.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/migrations_user.go (98%) rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs_actions_allowed.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs_actions_permissions.go (100%) create mode 100644 vendor/github.com/google/go-github/v68/github/orgs_attestations.go rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs_audit_log.go (100%) create mode 100644 vendor/github.com/google/go-github/v68/github/orgs_codesecurity_configurations.go rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs_credential_authorizations.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs_custom_repository_roles.go (85%) rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs_hooks.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs_hooks_configuration.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs_hooks_deliveries.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs_members.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs_organization_roles.go (96%) rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs_outside_collaborators.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs_packages.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs_personal_access_tokens.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs_properties.go (96%) rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs_rules.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs_security_managers.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/orgs_users_blocking.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/packages.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/pulls.go (99%) rename vendor/github.com/google/go-github/{v66 => v68}/github/pulls_comments.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/pulls_reviewers.go (76%) rename vendor/github.com/google/go-github/{v66 => v68}/github/pulls_reviews.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/pulls_threads.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/rate_limit.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/reactions.go (98%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos.go (99%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_actions_access.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_actions_allowed.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_actions_permissions.go (100%) create mode 100644 vendor/github.com/google/go-github/v68/github/repos_attestations.go rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_autolinks.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_codeowners.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_collaborators.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_comments.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_commits.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_community_health.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_contents.go (99%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_deployment_branch_policies.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_deployment_protection_rules.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_deployments.go (98%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_environments.go (99%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_forks.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_hooks.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_hooks_configuration.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_hooks_deliveries.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_invitations.go (98%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_keys.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_lfs.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_merging.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_pages.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_prereceive_hooks.go (93%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_properties.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_releases.go (97%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_rules.go (62%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_stats.go (98%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_statuses.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_tags.go (62%) rename vendor/github.com/google/go-github/{v66 => v68}/github/repos_traffic.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/scim.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/search.go (99%) rename vendor/github.com/google/go-github/{v66 => v68}/github/secret_scanning.go (93%) rename vendor/github.com/google/go-github/{v66 => v68}/github/security_advisories.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/strings.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/teams.go (94%) rename vendor/github.com/google/go-github/{v66 => v68}/github/teams_discussion_comments.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/teams_discussions.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/teams_members.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/timestamp.go (95%) rename vendor/github.com/google/go-github/{v66 => v68}/github/users.go (94%) rename vendor/github.com/google/go-github/{v66 => v68}/github/users_administration.go (91%) create mode 100644 vendor/github.com/google/go-github/v68/github/users_attestations.go rename vendor/github.com/google/go-github/{v66 => v68}/github/users_blocking.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/users_emails.go (98%) rename vendor/github.com/google/go-github/{v66 => v68}/github/users_followers.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/users_gpg_keys.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/users_keys.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/users_packages.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/users_ssh_signing_keys.go (100%) rename vendor/github.com/google/go-github/{v66 => v68}/github/with_appengine.go (95%) rename vendor/github.com/google/go-github/{v66 => v68}/github/without_appengine.go (95%) diff --git a/go.mod b/go.mod index 72d88bde..afc66503 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ toolchain go1.23.0 require ( github.com/BurntSushi/toml v1.4.0 - github.com/bradleyfalzon/ghinstallation/v2 v2.12.0 + github.com/bradleyfalzon/ghinstallation/v2 v2.13.0 github.com/cloudbase/garm-provider-common v0.1.4 github.com/felixge/httpsnoop v1.0.4 github.com/go-openapi/errors v0.22.0 @@ -56,7 +56,7 @@ require ( github.com/go-openapi/validate v0.24.0 // indirect github.com/go-sql-driver/mysql v1.8.1 // indirect github.com/golang-jwt/jwt/v4 v4.5.1 // indirect - github.com/google/go-github/v66 v66.0.0 // indirect + github.com/google/go-github/v68 v68.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jinzhu/inflection v1.0.0 // indirect diff --git a/go.sum b/go.sum index cdae378d..f179c93c 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,8 @@ github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3d github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bradleyfalzon/ghinstallation/v2 v2.12.0 h1:k8oVjGhZel2qmCUsYwSE34jPNT9DL2wCBOtugsHv26g= -github.com/bradleyfalzon/ghinstallation/v2 v2.12.0/go.mod h1:V4gJcNyAftH0rXpRp1SUVUuh+ACxOH1xOk/ZzkRHltg= +github.com/bradleyfalzon/ghinstallation/v2 v2.13.0 h1:5FhjW93/YLQJDmPdeyMPw7IjAPzqsr+0jHPfrPz0sZI= +github.com/bradleyfalzon/ghinstallation/v2 v2.13.0/go.mod h1:EJ6fgedVEHa2kUyBTTvslJCXJafS/mhJNNKEOCspZXQ= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -68,8 +68,8 @@ 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-github/v57 v57.0.0 h1:L+Y3UPTY8ALM8x+TV0lg+IEBI+upibemtBD8Q9u7zHs= github.com/google/go-github/v57 v57.0.0/go.mod h1:s0omdnye0hvK/ecLvpsGfJMiRt85PimQh4oygmLIxHw= -github.com/google/go-github/v66 v66.0.0 h1:ADJsaXj9UotwdgK8/iFZtv7MLc8E8WBl62WLd/D/9+M= -github.com/google/go-github/v66 v66.0.0/go.mod h1:+4SO9Zkuyf8ytMj0csN1NR/5OTR+MfqPp8P8dVlcvY4= +github.com/google/go-github/v68 v68.0.0 h1:ZW57zeNZiXTdQ16qrDiZ0k6XucrxZ2CGmoTvcCyQG6s= +github.com/google/go-github/v68 v68.0.0/go.mod h1:K9HAUBovM2sLwM408A18h+wd9vqdLOEqTUCbnRIcx68= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= diff --git a/vendor/github.com/bradleyfalzon/ghinstallation/v2/transport.go b/vendor/github.com/bradleyfalzon/ghinstallation/v2/transport.go index 8541d206..c153061b 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/v66/github" + "github.com/google/go-github/v68/github" ) const ( diff --git a/vendor/github.com/google/go-github/v66/github/copilot.go b/vendor/github.com/google/go-github/v66/github/copilot.go deleted file mode 100644 index 2697b718..00000000 --- a/vendor/github.com/google/go-github/v66/github/copilot.go +++ /dev/null @@ -1,315 +0,0 @@ -// Copyright 2023 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" - "encoding/json" - "fmt" -) - -// CopilotService provides access to the Copilot-related functions -// in the GitHub API. -// -// GitHub API docs: https://docs.github.com/en/rest/copilot/ -type CopilotService service - -// CopilotOrganizationDetails represents the details of an organization's Copilot for Business subscription. -type CopilotOrganizationDetails struct { - SeatBreakdown *CopilotSeatBreakdown `json:"seat_breakdown"` - PublicCodeSuggestions string `json:"public_code_suggestions"` - CopilotChat string `json:"copilot_chat"` - SeatManagementSetting string `json:"seat_management_setting"` -} - -// CopilotSeatBreakdown represents the breakdown of Copilot for Business seats for the organization. -type CopilotSeatBreakdown struct { - Total int `json:"total"` - AddedThisCycle int `json:"added_this_cycle"` - PendingCancellation int `json:"pending_cancellation"` - PendingInvitation int `json:"pending_invitation"` - ActiveThisCycle int `json:"active_this_cycle"` - InactiveThisCycle int `json:"inactive_this_cycle"` -} - -// ListCopilotSeatsResponse represents the Copilot for Business seat assignments for an organization. -type ListCopilotSeatsResponse struct { - TotalSeats int64 `json:"total_seats"` - Seats []*CopilotSeatDetails `json:"seats"` -} - -// CopilotSeatDetails represents the details of a Copilot for Business seat. -type CopilotSeatDetails struct { - // Assignee can either be a User, Team, or Organization. - Assignee interface{} `json:"assignee"` - AssigningTeam *Team `json:"assigning_team,omitempty"` - PendingCancellationDate *string `json:"pending_cancellation_date,omitempty"` - LastActivityAt *Timestamp `json:"last_activity_at,omitempty"` - LastActivityEditor *string `json:"last_activity_editor,omitempty"` - CreatedAt *Timestamp `json:"created_at"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` -} - -// SeatAssignments represents the number of seats assigned. -type SeatAssignments struct { - SeatsCreated int `json:"seats_created"` -} - -// SeatCancellations represents the number of seats cancelled. -type SeatCancellations struct { - SeatsCancelled int `json:"seats_cancelled"` -} - -func (cp *CopilotSeatDetails) UnmarshalJSON(data []byte) error { - // Using an alias to avoid infinite recursion when calling json.Unmarshal - type alias CopilotSeatDetails - var seatDetail alias - - if err := json.Unmarshal(data, &seatDetail); err != nil { - return err - } - - cp.AssigningTeam = seatDetail.AssigningTeam - cp.PendingCancellationDate = seatDetail.PendingCancellationDate - cp.LastActivityAt = seatDetail.LastActivityAt - cp.LastActivityEditor = seatDetail.LastActivityEditor - cp.CreatedAt = seatDetail.CreatedAt - cp.UpdatedAt = seatDetail.UpdatedAt - - switch v := seatDetail.Assignee.(type) { - case map[string]interface{}: - jsonData, err := json.Marshal(seatDetail.Assignee) - if err != nil { - return err - } - - if v["type"] == nil { - return fmt.Errorf("assignee type field is not set") - } - - if t, ok := v["type"].(string); ok && t == "User" { - user := &User{} - if err := json.Unmarshal(jsonData, user); err != nil { - return err - } - cp.Assignee = user - } else if t, ok := v["type"].(string); ok && t == "Team" { - team := &Team{} - if err := json.Unmarshal(jsonData, team); err != nil { - return err - } - cp.Assignee = team - } else if t, ok := v["type"].(string); ok && t == "Organization" { - organization := &Organization{} - if err := json.Unmarshal(jsonData, organization); err != nil { - return err - } - cp.Assignee = organization - } else { - return fmt.Errorf("unsupported assignee type %v", v["type"]) - } - default: - return fmt.Errorf("unsupported assignee type %T", v) - } - - return nil -} - -// GetUser gets the User from the CopilotSeatDetails if the assignee is a user. -func (cp *CopilotSeatDetails) GetUser() (*User, bool) { u, ok := cp.Assignee.(*User); return u, ok } - -// GetTeam gets the Team from the CopilotSeatDetails if the assignee is a team. -func (cp *CopilotSeatDetails) GetTeam() (*Team, bool) { t, ok := cp.Assignee.(*Team); return t, ok } - -// GetOrganization gets the Organization from the CopilotSeatDetails if the assignee is an organization. -func (cp *CopilotSeatDetails) GetOrganization() (*Organization, bool) { - o, ok := cp.Assignee.(*Organization) - return o, ok -} - -// GetCopilotBilling gets Copilot for Business billing information and settings for an organization. -// -// GitHub API docs: https://docs.github.com/rest/copilot/copilot-user-management#get-copilot-seat-information-and-settings-for-an-organization -// -//meta:operation GET /orgs/{org}/copilot/billing -func (s *CopilotService) GetCopilotBilling(ctx context.Context, org string) (*CopilotOrganizationDetails, *Response, error) { - u := fmt.Sprintf("orgs/%v/copilot/billing", org) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var copilotDetails *CopilotOrganizationDetails - resp, err := s.client.Do(ctx, req, &copilotDetails) - if err != nil { - return nil, resp, err - } - - return copilotDetails, resp, nil -} - -// ListCopilotSeats lists Copilot for Business seat assignments for an organization. -// -// To paginate through all seats, populate 'Page' with the number of the last page. -// -// GitHub API docs: https://docs.github.com/rest/copilot/copilot-user-management#list-all-copilot-seat-assignments-for-an-organization -// -//meta:operation GET /orgs/{org}/copilot/billing/seats -func (s *CopilotService) ListCopilotSeats(ctx context.Context, org string, opts *ListOptions) (*ListCopilotSeatsResponse, *Response, error) { - u := fmt.Sprintf("orgs/%v/copilot/billing/seats", org) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var copilotSeats *ListCopilotSeatsResponse - resp, err := s.client.Do(ctx, req, &copilotSeats) - if err != nil { - return nil, resp, err - } - - return copilotSeats, resp, nil -} - -// AddCopilotTeams adds teams to the Copilot for Business subscription for an organization. -// -// GitHub API docs: https://docs.github.com/rest/copilot/copilot-user-management#add-teams-to-the-copilot-subscription-for-an-organization -// -//meta:operation POST /orgs/{org}/copilot/billing/selected_teams -func (s *CopilotService) AddCopilotTeams(ctx context.Context, org string, teamNames []string) (*SeatAssignments, *Response, error) { - u := fmt.Sprintf("orgs/%v/copilot/billing/selected_teams", org) - - body := struct { - SelectedTeams []string `json:"selected_teams"` - }{ - SelectedTeams: teamNames, - } - - req, err := s.client.NewRequest("POST", u, body) - if err != nil { - return nil, nil, err - } - - var seatAssignments *SeatAssignments - resp, err := s.client.Do(ctx, req, &seatAssignments) - if err != nil { - return nil, resp, err - } - - return seatAssignments, resp, nil -} - -// RemoveCopilotTeams removes teams from the Copilot for Business subscription for an organization. -// -// GitHub API docs: https://docs.github.com/rest/copilot/copilot-user-management#remove-teams-from-the-copilot-subscription-for-an-organization -// -//meta:operation DELETE /orgs/{org}/copilot/billing/selected_teams -func (s *CopilotService) RemoveCopilotTeams(ctx context.Context, org string, teamNames []string) (*SeatCancellations, *Response, error) { - u := fmt.Sprintf("orgs/%v/copilot/billing/selected_teams", org) - - body := struct { - SelectedTeams []string `json:"selected_teams"` - }{ - SelectedTeams: teamNames, - } - - req, err := s.client.NewRequest("DELETE", u, body) - if err != nil { - return nil, nil, err - } - - var seatCancellations *SeatCancellations - resp, err := s.client.Do(ctx, req, &seatCancellations) - if err != nil { - return nil, resp, err - } - - return seatCancellations, resp, nil -} - -// AddCopilotUsers adds users to the Copilot for Business subscription for an organization -// -// GitHub API docs: https://docs.github.com/rest/copilot/copilot-user-management#add-users-to-the-copilot-subscription-for-an-organization -// -//meta:operation POST /orgs/{org}/copilot/billing/selected_users -func (s *CopilotService) AddCopilotUsers(ctx context.Context, org string, users []string) (*SeatAssignments, *Response, error) { - u := fmt.Sprintf("orgs/%v/copilot/billing/selected_users", org) - - body := struct { - SelectedUsernames []string `json:"selected_usernames"` - }{ - SelectedUsernames: users, - } - - req, err := s.client.NewRequest("POST", u, body) - if err != nil { - return nil, nil, err - } - - var seatAssignments *SeatAssignments - resp, err := s.client.Do(ctx, req, &seatAssignments) - if err != nil { - return nil, resp, err - } - - return seatAssignments, resp, nil -} - -// RemoveCopilotUsers removes users from the Copilot for Business subscription for an organization. -// -// GitHub API docs: https://docs.github.com/rest/copilot/copilot-user-management#remove-users-from-the-copilot-subscription-for-an-organization -// -//meta:operation DELETE /orgs/{org}/copilot/billing/selected_users -func (s *CopilotService) RemoveCopilotUsers(ctx context.Context, org string, users []string) (*SeatCancellations, *Response, error) { - u := fmt.Sprintf("orgs/%v/copilot/billing/selected_users", org) - - body := struct { - SelectedUsernames []string `json:"selected_usernames"` - }{ - SelectedUsernames: users, - } - - req, err := s.client.NewRequest("DELETE", u, body) - if err != nil { - return nil, nil, err - } - - var seatCancellations *SeatCancellations - resp, err := s.client.Do(ctx, req, &seatCancellations) - if err != nil { - return nil, resp, err - } - - return seatCancellations, resp, nil -} - -// GetSeatDetails gets Copilot for Business seat assignment details for a user. -// -// GitHub API docs: https://docs.github.com/rest/copilot/copilot-user-management#get-copilot-seat-assignment-details-for-a-user -// -//meta:operation GET /orgs/{org}/members/{username}/copilot -func (s *CopilotService) GetSeatDetails(ctx context.Context, org, user string) (*CopilotSeatDetails, *Response, error) { - u := fmt.Sprintf("orgs/%v/members/%v/copilot", org, user) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var seatDetails *CopilotSeatDetails - resp, err := s.client.Do(ctx, req, &seatDetails) - if err != nil { - return nil, resp, err - } - - return seatDetails, resp, nil -} diff --git a/vendor/github.com/google/go-github/v66/github/orgs_projects.go b/vendor/github.com/google/go-github/v66/github/orgs_projects.go deleted file mode 100644 index 454d8cf1..00000000 --- a/vendor/github.com/google/go-github/v66/github/orgs_projects.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2017 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" -) - -// ListProjects lists the projects for an organization. -// -// GitHub API docs: https://docs.github.com/rest/projects/projects#list-organization-projects -// -//meta:operation GET /orgs/{org}/projects -func (s *OrganizationsService) ListProjects(ctx context.Context, org string, opts *ProjectListOptions) ([]*Project, *Response, error) { - u := fmt.Sprintf("orgs/%v/projects", 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 - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - var projects []*Project - resp, err := s.client.Do(ctx, req, &projects) - if err != nil { - return nil, resp, err - } - - return projects, resp, nil -} - -// CreateProject creates a GitHub Project for the specified organization. -// -// GitHub API docs: https://docs.github.com/rest/projects/projects#create-an-organization-project -// -//meta:operation POST /orgs/{org}/projects -func (s *OrganizationsService) CreateProject(ctx context.Context, org string, opts *ProjectOptions) (*Project, *Response, error) { - u := fmt.Sprintf("orgs/%v/projects", org) - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - project := &Project{} - resp, err := s.client.Do(ctx, req, project) - if err != nil { - return nil, resp, err - } - - return project, resp, nil -} diff --git a/vendor/github.com/google/go-github/v66/github/projects.go b/vendor/github.com/google/go-github/v66/github/projects.go deleted file mode 100644 index c5c42f89..00000000 --- a/vendor/github.com/google/go-github/v66/github/projects.go +++ /dev/null @@ -1,634 +0,0 @@ -// Copyright 2016 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" -) - -// ProjectsService provides access to the projects functions in the -// GitHub API. -// -// GitHub API docs: https://docs.github.com/rest/projects -type ProjectsService service - -// Project represents a GitHub Project. -type Project struct { - ID *int64 `json:"id,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - ColumnsURL *string `json:"columns_url,omitempty"` - OwnerURL *string `json:"owner_url,omitempty"` - Name *string `json:"name,omitempty"` - Body *string `json:"body,omitempty"` - Number *int `json:"number,omitempty"` - State *string `json:"state,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - NodeID *string `json:"node_id,omitempty"` - OrganizationPermission *string `json:"organization_permission,omitempty"` - Private *bool `json:"private,omitempty"` - - // The User object that generated the project. - Creator *User `json:"creator,omitempty"` -} - -func (p Project) String() string { - return Stringify(p) -} - -// GetProject gets a GitHub Project for a repo. -// -// GitHub API docs: https://docs.github.com/rest/projects/projects#get-a-project -// -//meta:operation GET /projects/{project_id} -func (s *ProjectsService) GetProject(ctx context.Context, id int64) (*Project, *Response, error) { - u := fmt.Sprintf("projects/%v", id) - 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", mediaTypeProjectsPreview) - - project := &Project{} - resp, err := s.client.Do(ctx, req, project) - if err != nil { - return nil, resp, err - } - - return project, resp, nil -} - -// ProjectOptions specifies the parameters to the -// RepositoriesService.CreateProject and -// ProjectsService.UpdateProject methods. -type ProjectOptions struct { - // The name of the project. (Required for creation; optional for update.) - Name *string `json:"name,omitempty"` - // The body of the project. (Optional.) - Body *string `json:"body,omitempty"` - - // The following field(s) are only applicable for update. - // They should be left with zero values for creation. - - // State of the project. Either "open" or "closed". (Optional.) - State *string `json:"state,omitempty"` - // The permission level that all members of the project's organization - // will have on this project. - // Setting the organization permission is only available - // for organization projects. (Optional.) - OrganizationPermission *string `json:"organization_permission,omitempty"` - // Sets visibility of the project within the organization. - // Setting visibility is only available - // for organization projects.(Optional.) - Private *bool `json:"private,omitempty"` -} - -// UpdateProject updates a repository project. -// -// GitHub API docs: https://docs.github.com/rest/projects/projects#update-a-project -// -//meta:operation PATCH /projects/{project_id} -func (s *ProjectsService) UpdateProject(ctx context.Context, id int64, opts *ProjectOptions) (*Project, *Response, error) { - u := fmt.Sprintf("projects/%v", id) - req, err := s.client.NewRequest("PATCH", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - project := &Project{} - resp, err := s.client.Do(ctx, req, project) - if err != nil { - return nil, resp, err - } - - return project, resp, nil -} - -// DeleteProject deletes a GitHub Project from a repository. -// -// GitHub API docs: https://docs.github.com/rest/projects/projects#delete-a-project -// -//meta:operation DELETE /projects/{project_id} -func (s *ProjectsService) DeleteProject(ctx context.Context, id int64) (*Response, error) { - u := fmt.Sprintf("projects/%v", id) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - return s.client.Do(ctx, req, nil) -} - -// ProjectColumn represents a column of a GitHub Project. -// -// GitHub API docs: https://docs.github.com/rest/repos/projects/ -type ProjectColumn struct { - ID *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - URL *string `json:"url,omitempty"` - ProjectURL *string `json:"project_url,omitempty"` - CardsURL *string `json:"cards_url,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - NodeID *string `json:"node_id,omitempty"` -} - -// ListProjectColumns lists the columns of a GitHub Project for a repo. -// -// GitHub API docs: https://docs.github.com/rest/projects/columns#list-project-columns -// -//meta:operation GET /projects/{project_id}/columns -func (s *ProjectsService) ListProjectColumns(ctx context.Context, projectID int64, opts *ListOptions) ([]*ProjectColumn, *Response, error) { - u := fmt.Sprintf("projects/%v/columns", projectID) - 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", mediaTypeProjectsPreview) - - columns := []*ProjectColumn{} - resp, err := s.client.Do(ctx, req, &columns) - if err != nil { - return nil, resp, err - } - - return columns, resp, nil -} - -// GetProjectColumn gets a column of a GitHub Project for a repo. -// -// GitHub API docs: https://docs.github.com/rest/projects/columns#get-a-project-column -// -//meta:operation GET /projects/columns/{column_id} -func (s *ProjectsService) GetProjectColumn(ctx context.Context, id int64) (*ProjectColumn, *Response, error) { - u := fmt.Sprintf("projects/columns/%v", id) - 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", mediaTypeProjectsPreview) - - column := &ProjectColumn{} - resp, err := s.client.Do(ctx, req, column) - if err != nil { - return nil, resp, err - } - - return column, resp, nil -} - -// ProjectColumnOptions specifies the parameters to the -// ProjectsService.CreateProjectColumn and -// ProjectsService.UpdateProjectColumn methods. -type ProjectColumnOptions struct { - // The name of the project column. (Required for creation and update.) - Name string `json:"name"` -} - -// CreateProjectColumn creates a column for the specified (by number) project. -// -// GitHub API docs: https://docs.github.com/rest/projects/columns#create-a-project-column -// -//meta:operation POST /projects/{project_id}/columns -func (s *ProjectsService) CreateProjectColumn(ctx context.Context, projectID int64, opts *ProjectColumnOptions) (*ProjectColumn, *Response, error) { - u := fmt.Sprintf("projects/%v/columns", projectID) - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - column := &ProjectColumn{} - resp, err := s.client.Do(ctx, req, column) - if err != nil { - return nil, resp, err - } - - return column, resp, nil -} - -// UpdateProjectColumn updates a column of a GitHub Project. -// -// GitHub API docs: https://docs.github.com/rest/projects/columns#update-an-existing-project-column -// -//meta:operation PATCH /projects/columns/{column_id} -func (s *ProjectsService) UpdateProjectColumn(ctx context.Context, columnID int64, opts *ProjectColumnOptions) (*ProjectColumn, *Response, error) { - u := fmt.Sprintf("projects/columns/%v", columnID) - req, err := s.client.NewRequest("PATCH", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - column := &ProjectColumn{} - resp, err := s.client.Do(ctx, req, column) - if err != nil { - return nil, resp, err - } - - return column, resp, nil -} - -// DeleteProjectColumn deletes a column from a GitHub Project. -// -// GitHub API docs: https://docs.github.com/rest/projects/columns#delete-a-project-column -// -//meta:operation DELETE /projects/columns/{column_id} -func (s *ProjectsService) DeleteProjectColumn(ctx context.Context, columnID int64) (*Response, error) { - u := fmt.Sprintf("projects/columns/%v", columnID) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - return s.client.Do(ctx, req, nil) -} - -// ProjectColumnMoveOptions specifies the parameters to the -// ProjectsService.MoveProjectColumn method. -type ProjectColumnMoveOptions struct { - // Position can be one of "first", "last", or "after:", where - // is the ID of a column in the same project. (Required.) - Position string `json:"position"` -} - -// MoveProjectColumn moves a column within a GitHub Project. -// -// GitHub API docs: https://docs.github.com/rest/projects/columns#move-a-project-column -// -//meta:operation POST /projects/columns/{column_id}/moves -func (s *ProjectsService) MoveProjectColumn(ctx context.Context, columnID int64, opts *ProjectColumnMoveOptions) (*Response, error) { - u := fmt.Sprintf("projects/columns/%v/moves", columnID) - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - return s.client.Do(ctx, req, nil) -} - -// ProjectCard represents a card in a column of a GitHub Project. -// -// GitHub API docs: https://docs.github.com/rest/projects/cards/#get-a-project-card -type ProjectCard struct { - URL *string `json:"url,omitempty"` - ColumnURL *string `json:"column_url,omitempty"` - ContentURL *string `json:"content_url,omitempty"` - ID *int64 `json:"id,omitempty"` - Note *string `json:"note,omitempty"` - Creator *User `json:"creator,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - NodeID *string `json:"node_id,omitempty"` - Archived *bool `json:"archived,omitempty"` - - // The following fields are only populated by Webhook events. - ColumnID *int64 `json:"column_id,omitempty"` - - // The following fields are only populated by Events API. - ProjectID *int64 `json:"project_id,omitempty"` - ProjectURL *string `json:"project_url,omitempty"` - ColumnName *string `json:"column_name,omitempty"` - PreviousColumnName *string `json:"previous_column_name,omitempty"` // Populated in "moved_columns_in_project" event deliveries. -} - -// ProjectCardListOptions specifies the optional parameters to the -// ProjectsService.ListProjectCards method. -type ProjectCardListOptions struct { - // ArchivedState is used to list all, archived, or not_archived project cards. - // Defaults to not_archived when you omit this parameter. - ArchivedState *string `url:"archived_state,omitempty"` - - ListOptions -} - -// ListProjectCards lists the cards in a column of a GitHub Project. -// -// GitHub API docs: https://docs.github.com/rest/projects/cards#list-project-cards -// -//meta:operation GET /projects/columns/{column_id}/cards -func (s *ProjectsService) ListProjectCards(ctx context.Context, columnID int64, opts *ProjectCardListOptions) ([]*ProjectCard, *Response, error) { - u := fmt.Sprintf("projects/columns/%v/cards", columnID) - 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", mediaTypeProjectsPreview) - - cards := []*ProjectCard{} - resp, err := s.client.Do(ctx, req, &cards) - if err != nil { - return nil, resp, err - } - - return cards, resp, nil -} - -// GetProjectCard gets a card in a column of a GitHub Project. -// -// GitHub API docs: https://docs.github.com/rest/projects/cards#get-a-project-card -// -//meta:operation GET /projects/columns/cards/{card_id} -func (s *ProjectsService) GetProjectCard(ctx context.Context, cardID int64) (*ProjectCard, *Response, error) { - u := fmt.Sprintf("projects/columns/cards/%v", cardID) - 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", mediaTypeProjectsPreview) - - card := &ProjectCard{} - resp, err := s.client.Do(ctx, req, card) - if err != nil { - return nil, resp, err - } - - return card, resp, nil -} - -// ProjectCardOptions specifies the parameters to the -// ProjectsService.CreateProjectCard and -// ProjectsService.UpdateProjectCard methods. -type ProjectCardOptions struct { - // The note of the card. Note and ContentID are mutually exclusive. - Note string `json:"note,omitempty"` - // The ID (not Number) of the Issue to associate with this card. - // Note and ContentID are mutually exclusive. - ContentID int64 `json:"content_id,omitempty"` - // The type of content to associate with this card. Possible values are: "Issue" and "PullRequest". - ContentType string `json:"content_type,omitempty"` - // Use true to archive a project card. - // Specify false if you need to restore a previously archived project card. - Archived *bool `json:"archived,omitempty"` -} - -// CreateProjectCard creates a card in the specified column of a GitHub Project. -// -// GitHub API docs: https://docs.github.com/rest/projects/cards#create-a-project-card -// -//meta:operation POST /projects/columns/{column_id}/cards -func (s *ProjectsService) CreateProjectCard(ctx context.Context, columnID int64, opts *ProjectCardOptions) (*ProjectCard, *Response, error) { - u := fmt.Sprintf("projects/columns/%v/cards", columnID) - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - card := &ProjectCard{} - resp, err := s.client.Do(ctx, req, card) - if err != nil { - return nil, resp, err - } - - return card, resp, nil -} - -// UpdateProjectCard updates a card of a GitHub Project. -// -// GitHub API docs: https://docs.github.com/rest/projects/cards#update-an-existing-project-card -// -//meta:operation PATCH /projects/columns/cards/{card_id} -func (s *ProjectsService) UpdateProjectCard(ctx context.Context, cardID int64, opts *ProjectCardOptions) (*ProjectCard, *Response, error) { - u := fmt.Sprintf("projects/columns/cards/%v", cardID) - req, err := s.client.NewRequest("PATCH", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - card := &ProjectCard{} - resp, err := s.client.Do(ctx, req, card) - if err != nil { - return nil, resp, err - } - - return card, resp, nil -} - -// DeleteProjectCard deletes a card from a GitHub Project. -// -// GitHub API docs: https://docs.github.com/rest/projects/cards#delete-a-project-card -// -//meta:operation DELETE /projects/columns/cards/{card_id} -func (s *ProjectsService) DeleteProjectCard(ctx context.Context, cardID int64) (*Response, error) { - u := fmt.Sprintf("projects/columns/cards/%v", cardID) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - return s.client.Do(ctx, req, nil) -} - -// ProjectCardMoveOptions specifies the parameters to the -// ProjectsService.MoveProjectCard method. -type ProjectCardMoveOptions struct { - // Position can be one of "top", "bottom", or "after:", where - // is the ID of a card in the same project. - Position string `json:"position"` - // ColumnID is the ID of a column in the same project. Note that ColumnID - // is required when using Position "after:" when that card is in - // another column; otherwise it is optional. - ColumnID int64 `json:"column_id,omitempty"` -} - -// MoveProjectCard moves a card within a GitHub Project. -// -// GitHub API docs: https://docs.github.com/rest/projects/cards#move-a-project-card -// -//meta:operation POST /projects/columns/cards/{card_id}/moves -func (s *ProjectsService) MoveProjectCard(ctx context.Context, cardID int64, opts *ProjectCardMoveOptions) (*Response, error) { - u := fmt.Sprintf("projects/columns/cards/%v/moves", cardID) - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - return s.client.Do(ctx, req, nil) -} - -// ProjectCollaboratorOptions specifies the optional parameters to the -// ProjectsService.AddProjectCollaborator method. -type ProjectCollaboratorOptions struct { - // Permission specifies the permission to grant to the collaborator. - // Possible values are: - // "read" - can read, but not write to or administer this project. - // "write" - can read and write, but not administer this project. - // "admin" - can read, write and administer this project. - // - // Default value is "write" - Permission *string `json:"permission,omitempty"` -} - -// AddProjectCollaborator adds a collaborator to an organization project and sets -// their permission level. You must be an organization owner or a project admin to add a collaborator. -// -// GitHub API docs: https://docs.github.com/rest/projects/collaborators#add-project-collaborator -// -//meta:operation PUT /projects/{project_id}/collaborators/{username} -func (s *ProjectsService) AddProjectCollaborator(ctx context.Context, id int64, username string, opts *ProjectCollaboratorOptions) (*Response, error) { - u := fmt.Sprintf("projects/%v/collaborators/%v", id, username) - req, err := s.client.NewRequest("PUT", u, opts) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - return s.client.Do(ctx, req, nil) -} - -// RemoveProjectCollaborator removes a collaborator from an organization project. -// You must be an organization owner or a project admin to remove a collaborator. -// -// GitHub API docs: https://docs.github.com/rest/projects/collaborators#remove-user-as-a-collaborator -// -//meta:operation DELETE /projects/{project_id}/collaborators/{username} -func (s *ProjectsService) RemoveProjectCollaborator(ctx context.Context, id int64, username string) (*Response, error) { - u := fmt.Sprintf("projects/%v/collaborators/%v", id, username) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - return s.client.Do(ctx, req, nil) -} - -// ListCollaboratorOptions specifies the optional parameters to the -// ProjectsService.ListProjectCollaborators method. -type ListCollaboratorOptions struct { - // Affiliation specifies how collaborators should be filtered by their affiliation. - // Possible values are: - // "outside" - All outside collaborators of an organization-owned repository - // "direct" - All collaborators with permissions to an organization-owned repository, - // regardless of organization membership status - // "all" - All collaborators the authenticated user can see - // - // Default value is "all". - Affiliation *string `url:"affiliation,omitempty"` - - ListOptions -} - -// ListProjectCollaborators lists the collaborators for an organization project. For a project, -// the list of collaborators includes outside collaborators, organization members that are direct -// collaborators, organization members with access through team memberships, organization members -// with access through default organization permissions, and organization owners. You must be an -// organization owner or a project admin to list collaborators. -// -// GitHub API docs: https://docs.github.com/rest/projects/collaborators#list-project-collaborators -// -//meta:operation GET /projects/{project_id}/collaborators -func (s *ProjectsService) ListProjectCollaborators(ctx context.Context, id int64, opts *ListCollaboratorOptions) ([]*User, *Response, error) { - u := fmt.Sprintf("projects/%v/collaborators", id) - 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 header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - var users []*User - resp, err := s.client.Do(ctx, req, &users) - if err != nil { - return nil, resp, err - } - - return users, resp, nil -} - -// ProjectPermissionLevel represents the permission level an organization -// member has for a given project. -type ProjectPermissionLevel struct { - // Possible values: "admin", "write", "read", "none" - Permission *string `json:"permission,omitempty"` - - User *User `json:"user,omitempty"` -} - -// ReviewProjectCollaboratorPermission returns the collaborator's permission level for an organization -// project. Possible values for the permission key: "admin", "write", "read", "none". -// You must be an organization owner or a project admin to review a user's permission level. -// -// GitHub API docs: https://docs.github.com/rest/projects/collaborators#get-project-permission-for-a-user -// -//meta:operation GET /projects/{project_id}/collaborators/{username}/permission -func (s *ProjectsService) ReviewProjectCollaboratorPermission(ctx context.Context, id int64, username string) (*ProjectPermissionLevel, *Response, error) { - u := fmt.Sprintf("projects/%v/collaborators/%v/permission", id, username) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - ppl := new(ProjectPermissionLevel) - resp, err := s.client.Do(ctx, req, ppl) - if err != nil { - return nil, resp, err - } - return ppl, resp, nil -} diff --git a/vendor/github.com/google/go-github/v66/github/repos_projects.go b/vendor/github.com/google/go-github/v66/github/repos_projects.go deleted file mode 100644 index 9269d4e9..00000000 --- a/vendor/github.com/google/go-github/v66/github/repos_projects.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2017 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" -) - -// ProjectListOptions specifies the optional parameters to the -// OrganizationsService.ListProjects and RepositoriesService.ListProjects methods. -type ProjectListOptions struct { - // Indicates the state of the projects to return. Can be either open, closed, or all. Default: open - State string `url:"state,omitempty"` - - ListOptions -} - -// ListProjects lists the projects for a repo. -// -// GitHub API docs: https://docs.github.com/rest/projects/projects#list-repository-projects -// -//meta:operation GET /repos/{owner}/{repo}/projects -func (s *RepositoriesService) ListProjects(ctx context.Context, owner, repo string, opts *ProjectListOptions) ([]*Project, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/projects", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - var projects []*Project - resp, err := s.client.Do(ctx, req, &projects) - if err != nil { - return nil, resp, err - } - - return projects, resp, nil -} - -// CreateProject creates a GitHub Project for the specified repository. -// -// GitHub API docs: https://docs.github.com/rest/projects/projects#create-a-repository-project -// -//meta:operation POST /repos/{owner}/{repo}/projects -func (s *RepositoriesService) CreateProject(ctx context.Context, owner, repo string, opts *ProjectOptions) (*Project, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/projects", owner, repo) - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - project := &Project{} - resp, err := s.client.Do(ctx, req, project) - if err != nil { - return nil, resp, err - } - - return project, resp, nil -} diff --git a/vendor/github.com/google/go-github/v66/github/users_projects.go b/vendor/github.com/google/go-github/v66/github/users_projects.go deleted file mode 100644 index 0ab57e5c..00000000 --- a/vendor/github.com/google/go-github/v66/github/users_projects.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2019 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" -) - -// ListProjects lists the projects for the specified user. -// -// GitHub API docs: https://docs.github.com/rest/projects/projects#list-user-projects -// -//meta:operation GET /users/{username}/projects -func (s *UsersService) ListProjects(ctx context.Context, user string, opts *ProjectListOptions) ([]*Project, *Response, error) { - u := fmt.Sprintf("users/%v/projects", user) - 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 header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - var projects []*Project - resp, err := s.client.Do(ctx, req, &projects) - if err != nil { - return nil, resp, err - } - - return projects, resp, nil -} - -// CreateUserProjectOptions specifies the parameters to the UsersService.CreateProject method. -type CreateUserProjectOptions struct { - // The name of the project. (Required.) - Name string `json:"name"` - // The description of the project. (Optional.) - Body *string `json:"body,omitempty"` -} - -// CreateProject creates a GitHub Project for the current user. -// -// GitHub API docs: https://docs.github.com/rest/projects/projects#create-a-user-project -// -//meta:operation POST /user/projects -func (s *UsersService) CreateProject(ctx context.Context, opts *CreateUserProjectOptions) (*Project, *Response, error) { - u := "user/projects" - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - project := &Project{} - resp, err := s.client.Do(ctx, req, project) - if err != nil { - return nil, resp, err - } - - return project, resp, nil -} diff --git a/vendor/github.com/google/go-github/v66/AUTHORS b/vendor/github.com/google/go-github/v68/AUTHORS similarity index 97% rename from vendor/github.com/google/go-github/v66/AUTHORS rename to vendor/github.com/google/go-github/v68/AUTHORS index d2116450..a6104ffa 100644 --- a/vendor/github.com/google/go-github/v66/AUTHORS +++ b/vendor/github.com/google/go-github/v68/AUTHORS @@ -20,6 +20,7 @@ Abhishek Sharma Abhishek Veeramalla aboy Adam Kohring +Aditya Mahendrakar adrienzieba afdesk Ahmad Nurus S @@ -39,6 +40,7 @@ Alex Su Alex Unger Alexander Harkness Alexey Alekhin +Alexis Couvreur Alexis Gauthiez Ali Farooq Alin Balutoiu @@ -48,6 +50,7 @@ Amey Sakhadeo Anders Janmyr Andreas Deininger Andreas Garnæs +Andrew Gillis Andrew Ryabchun Andrew Svoboda Andriyun @@ -110,6 +113,7 @@ chandresh-pancholi Charles Fenwick Elliott Charlie Yan Chmouel Boudjnah +Chris Allen Lane Chris King Chris Mc Chris Raborg @@ -170,6 +174,7 @@ eperm Erick Fejta Erik Elkins Erik Nobel +Erwan Finot erwinvaneyk Evan Anderson Evan Elias @@ -207,6 +212,7 @@ Hari haran Harikesh00 haya14busa haya14busa +Henrik Lundström Hiroki Ito Hubot Jr Huy Tr @@ -219,6 +225,7 @@ Ioannis Georgoulas Isao Jonas ishan upadhyay isqua +Ivan Martos Jacob Valdemar Jake Krammer Jake Scaltreto @@ -343,6 +350,7 @@ MichaÅ‚ Glapa Michelangelo Morrillo Miguel Elias dos Santos Mike Chen +Miles Crabill Mishin Nikolai mohammad ali <2018cs92@student.uet.edu.pk> Mohammed AlDujaili @@ -373,6 +381,7 @@ ns-cweber nxya Ole Orhagen Oleg Kovalov +Oleksandr Redko OndÅ™ej Kupka Ori Talmor Osama Faqhruldin @@ -472,6 +481,7 @@ SoundCloud, Ltd. Sridhar Mocherla SriVignessh Pss Stefan Sedich +Steve Hipwell Steve Teuber Stian Eikeland Suhaib Mujahid diff --git a/vendor/github.com/google/go-github/v66/LICENSE b/vendor/github.com/google/go-github/v68/LICENSE similarity index 100% rename from vendor/github.com/google/go-github/v66/LICENSE rename to vendor/github.com/google/go-github/v68/LICENSE diff --git a/vendor/github.com/google/go-github/v66/github/actions.go b/vendor/github.com/google/go-github/v68/github/actions.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/actions.go rename to vendor/github.com/google/go-github/v68/github/actions.go diff --git a/vendor/github.com/google/go-github/v66/github/actions_artifacts.go b/vendor/github.com/google/go-github/v68/github/actions_artifacts.go similarity index 93% rename from vendor/github.com/google/go-github/v66/github/actions_artifacts.go rename to vendor/github.com/google/go-github/v68/github/actions_artifacts.go index f804b809..e05a9a84 100644 --- a/vendor/github.com/google/go-github/v66/github/actions_artifacts.go +++ b/vendor/github.com/google/go-github/v68/github/actions_artifacts.go @@ -50,12 +50,22 @@ type ArtifactList struct { Artifacts []*Artifact `json:"artifacts,omitempty"` } +// ListArtifactsOptions specifies the optional parameters to the +// ActionsService.ListArtifacts method. +type ListArtifactsOptions struct { + // Name represents the name field of an artifact. + // When specified, only artifacts with this name will be returned. + Name *string `url:"name,omitempty"` + + ListOptions +} + // ListArtifacts lists all artifacts that belong to a repository. // // GitHub API docs: https://docs.github.com/rest/actions/artifacts#list-artifacts-for-a-repository // //meta:operation GET /repos/{owner}/{repo}/actions/artifacts -func (s *ActionsService) ListArtifacts(ctx context.Context, owner, repo string, opts *ListOptions) (*ArtifactList, *Response, error) { +func (s *ActionsService) ListArtifacts(ctx context.Context, owner, repo string, opts *ListArtifactsOptions) (*ArtifactList, *Response, error) { u := fmt.Sprintf("repos/%v/%v/actions/artifacts", owner, repo) u, err := addOptions(u, opts) if err != nil { diff --git a/vendor/github.com/google/go-github/v66/github/actions_cache.go b/vendor/github.com/google/go-github/v68/github/actions_cache.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/actions_cache.go rename to vendor/github.com/google/go-github/v68/github/actions_cache.go diff --git a/vendor/github.com/google/go-github/v66/github/actions_oidc.go b/vendor/github.com/google/go-github/v68/github/actions_oidc.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/actions_oidc.go rename to vendor/github.com/google/go-github/v68/github/actions_oidc.go diff --git a/vendor/github.com/google/go-github/v66/github/actions_permissions_enterprise.go b/vendor/github.com/google/go-github/v68/github/actions_permissions_enterprise.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/actions_permissions_enterprise.go rename to vendor/github.com/google/go-github/v68/github/actions_permissions_enterprise.go diff --git a/vendor/github.com/google/go-github/v66/github/actions_permissions_orgs.go b/vendor/github.com/google/go-github/v68/github/actions_permissions_orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/actions_permissions_orgs.go rename to vendor/github.com/google/go-github/v68/github/actions_permissions_orgs.go diff --git a/vendor/github.com/google/go-github/v66/github/actions_required_workflows.go b/vendor/github.com/google/go-github/v68/github/actions_required_workflows.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/actions_required_workflows.go rename to vendor/github.com/google/go-github/v68/github/actions_required_workflows.go diff --git a/vendor/github.com/google/go-github/v66/github/actions_runner_groups.go b/vendor/github.com/google/go-github/v68/github/actions_runner_groups.go similarity index 84% rename from vendor/github.com/google/go-github/v66/github/actions_runner_groups.go rename to vendor/github.com/google/go-github/v68/github/actions_runner_groups.go index a1f453f3..b2ee32f6 100644 --- a/vendor/github.com/google/go-github/v66/github/actions_runner_groups.go +++ b/vendor/github.com/google/go-github/v68/github/actions_runner_groups.go @@ -80,7 +80,7 @@ type ListOrgRunnerGroupOptions struct { // ListOrganizationRunnerGroups lists all self-hosted runner groups configured in an organization. // -// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#list-self-hosted-runner-groups-for-an-organization +// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#list-self-hosted-runner-groups-for-an-organization // //meta:operation GET /orgs/{org}/actions/runner-groups func (s *ActionsService) ListOrganizationRunnerGroups(ctx context.Context, org string, opts *ListOrgRunnerGroupOptions) (*RunnerGroups, *Response, error) { @@ -106,7 +106,7 @@ func (s *ActionsService) ListOrganizationRunnerGroups(ctx context.Context, org s // GetOrganizationRunnerGroup gets a specific self-hosted runner group for an organization using its RunnerGroup ID. // -// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#get-a-self-hosted-runner-group-for-an-organization +// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#get-a-self-hosted-runner-group-for-an-organization // //meta:operation GET /orgs/{org}/actions/runner-groups/{runner_group_id} func (s *ActionsService) GetOrganizationRunnerGroup(ctx context.Context, org string, groupID int64) (*RunnerGroup, *Response, error) { @@ -127,7 +127,7 @@ func (s *ActionsService) GetOrganizationRunnerGroup(ctx context.Context, org str // DeleteOrganizationRunnerGroup deletes a self-hosted runner group from an organization. // -// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#delete-a-self-hosted-runner-group-from-an-organization +// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#delete-a-self-hosted-runner-group-from-an-organization // //meta:operation DELETE /orgs/{org}/actions/runner-groups/{runner_group_id} func (s *ActionsService) DeleteOrganizationRunnerGroup(ctx context.Context, org string, groupID int64) (*Response, error) { @@ -143,7 +143,7 @@ func (s *ActionsService) DeleteOrganizationRunnerGroup(ctx context.Context, org // CreateOrganizationRunnerGroup creates a new self-hosted runner group for an organization. // -// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#create-a-self-hosted-runner-group-for-an-organization +// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#create-a-self-hosted-runner-group-for-an-organization // //meta:operation POST /orgs/{org}/actions/runner-groups func (s *ActionsService) CreateOrganizationRunnerGroup(ctx context.Context, org string, createReq CreateRunnerGroupRequest) (*RunnerGroup, *Response, error) { @@ -164,7 +164,7 @@ func (s *ActionsService) CreateOrganizationRunnerGroup(ctx context.Context, org // UpdateOrganizationRunnerGroup updates a self-hosted runner group for an organization. // -// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#update-a-self-hosted-runner-group-for-an-organization +// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#update-a-self-hosted-runner-group-for-an-organization // //meta:operation PATCH /orgs/{org}/actions/runner-groups/{runner_group_id} func (s *ActionsService) UpdateOrganizationRunnerGroup(ctx context.Context, org string, groupID int64, updateReq UpdateRunnerGroupRequest) (*RunnerGroup, *Response, error) { @@ -185,7 +185,7 @@ func (s *ActionsService) UpdateOrganizationRunnerGroup(ctx context.Context, org // ListRepositoryAccessRunnerGroup lists the repositories with access to a self-hosted runner group configured in an organization. // -// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#list-repository-access-to-a-self-hosted-runner-group-in-an-organization +// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#list-repository-access-to-a-self-hosted-runner-group-in-an-organization // //meta:operation GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories func (s *ActionsService) ListRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID int64, opts *ListOptions) (*ListRepositories, *Response, error) { @@ -212,7 +212,7 @@ func (s *ActionsService) ListRepositoryAccessRunnerGroup(ctx context.Context, or // SetRepositoryAccessRunnerGroup replaces the list of repositories that have access to a self-hosted runner group configured in an organization // with a new List of repositories. // -// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#set-repository-access-for-a-self-hosted-runner-group-in-an-organization +// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#set-repository-access-for-a-self-hosted-runner-group-in-an-organization // //meta:operation PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories func (s *ActionsService) SetRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID int64, ids SetRepoAccessRunnerGroupRequest) (*Response, error) { @@ -229,7 +229,7 @@ func (s *ActionsService) SetRepositoryAccessRunnerGroup(ctx context.Context, org // AddRepositoryAccessRunnerGroup adds a repository to the list of selected repositories that can access a self-hosted runner group. // The runner group must have visibility set to 'selected'. // -// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#add-repository-access-to-a-self-hosted-runner-group-in-an-organization +// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#add-repository-access-to-a-self-hosted-runner-group-in-an-organization // //meta:operation PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id} func (s *ActionsService) AddRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID, repoID int64) (*Response, error) { @@ -246,7 +246,7 @@ func (s *ActionsService) AddRepositoryAccessRunnerGroup(ctx context.Context, org // RemoveRepositoryAccessRunnerGroup removes a repository from the list of selected repositories that can access a self-hosted runner group. // The runner group must have visibility set to 'selected'. // -// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization +// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization // //meta:operation DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id} func (s *ActionsService) RemoveRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID, repoID int64) (*Response, error) { @@ -262,7 +262,7 @@ func (s *ActionsService) RemoveRepositoryAccessRunnerGroup(ctx context.Context, // ListRunnerGroupRunners lists self-hosted runners that are in a specific organization group. // -// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#list-self-hosted-runners-in-a-group-for-an-organization +// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#list-self-hosted-runners-in-a-group-for-an-organization // //meta:operation GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners func (s *ActionsService) ListRunnerGroupRunners(ctx context.Context, org string, groupID int64, opts *ListOptions) (*Runners, *Response, error) { @@ -289,7 +289,7 @@ func (s *ActionsService) ListRunnerGroupRunners(ctx context.Context, org string, // SetRunnerGroupRunners replaces the list of self-hosted runners that are part of an organization runner group // with a new list of runners. // -// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#set-self-hosted-runners-in-a-group-for-an-organization +// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#set-self-hosted-runners-in-a-group-for-an-organization // //meta:operation PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners func (s *ActionsService) SetRunnerGroupRunners(ctx context.Context, org string, groupID int64, ids SetRunnerGroupRunnersRequest) (*Response, error) { @@ -305,7 +305,7 @@ func (s *ActionsService) SetRunnerGroupRunners(ctx context.Context, org string, // AddRunnerGroupRunners adds a self-hosted runner to a runner group configured in an organization. // -// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#add-a-self-hosted-runner-to-a-group-for-an-organization +// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#add-a-self-hosted-runner-to-a-group-for-an-organization // //meta:operation PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id} func (s *ActionsService) AddRunnerGroupRunners(ctx context.Context, org string, groupID, runnerID int64) (*Response, error) { @@ -322,7 +322,7 @@ func (s *ActionsService) AddRunnerGroupRunners(ctx context.Context, org string, // RemoveRunnerGroupRunners removes a self-hosted runner from a group configured in an organization. // The runner is then returned to the default group. // -// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#remove-a-self-hosted-runner-from-a-group-for-an-organization +// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#remove-a-self-hosted-runner-from-a-group-for-an-organization // //meta:operation DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id} func (s *ActionsService) RemoveRunnerGroupRunners(ctx context.Context, org string, groupID, runnerID int64) (*Response, error) { diff --git a/vendor/github.com/google/go-github/v66/github/actions_runners.go b/vendor/github.com/google/go-github/v68/github/actions_runners.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/actions_runners.go rename to vendor/github.com/google/go-github/v68/github/actions_runners.go diff --git a/vendor/github.com/google/go-github/v66/github/actions_secrets.go b/vendor/github.com/google/go-github/v68/github/actions_secrets.go similarity index 99% rename from vendor/github.com/google/go-github/v66/github/actions_secrets.go rename to vendor/github.com/google/go-github/v68/github/actions_secrets.go index ec519838..cba85c10 100644 --- a/vendor/github.com/google/go-github/v66/github/actions_secrets.go +++ b/vendor/github.com/google/go-github/v68/github/actions_secrets.go @@ -39,7 +39,7 @@ func (p *PublicKey) UnmarshalJSON(data []byte) error { case string: p.KeyID = &v case float64: - p.KeyID = String(strconv.FormatFloat(v, 'f', -1, 64)) + p.KeyID = Ptr(strconv.FormatFloat(v, 'f', -1, 64)) default: return fmt.Errorf("unable to unmarshal %T as a string", v) } diff --git a/vendor/github.com/google/go-github/v66/github/actions_variables.go b/vendor/github.com/google/go-github/v68/github/actions_variables.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/actions_variables.go rename to vendor/github.com/google/go-github/v68/github/actions_variables.go diff --git a/vendor/github.com/google/go-github/v66/github/actions_workflow_jobs.go b/vendor/github.com/google/go-github/v68/github/actions_workflow_jobs.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/actions_workflow_jobs.go rename to vendor/github.com/google/go-github/v68/github/actions_workflow_jobs.go diff --git a/vendor/github.com/google/go-github/v66/github/actions_workflow_runs.go b/vendor/github.com/google/go-github/v68/github/actions_workflow_runs.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/actions_workflow_runs.go rename to vendor/github.com/google/go-github/v68/github/actions_workflow_runs.go diff --git a/vendor/github.com/google/go-github/v66/github/actions_workflows.go b/vendor/github.com/google/go-github/v68/github/actions_workflows.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/actions_workflows.go rename to vendor/github.com/google/go-github/v68/github/actions_workflows.go diff --git a/vendor/github.com/google/go-github/v66/github/activity.go b/vendor/github.com/google/go-github/v68/github/activity.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/activity.go rename to vendor/github.com/google/go-github/v68/github/activity.go diff --git a/vendor/github.com/google/go-github/v66/github/activity_events.go b/vendor/github.com/google/go-github/v68/github/activity_events.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/activity_events.go rename to vendor/github.com/google/go-github/v68/github/activity_events.go diff --git a/vendor/github.com/google/go-github/v66/github/activity_notifications.go b/vendor/github.com/google/go-github/v68/github/activity_notifications.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/activity_notifications.go rename to vendor/github.com/google/go-github/v68/github/activity_notifications.go diff --git a/vendor/github.com/google/go-github/v66/github/activity_star.go b/vendor/github.com/google/go-github/v68/github/activity_star.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/activity_star.go rename to vendor/github.com/google/go-github/v68/github/activity_star.go diff --git a/vendor/github.com/google/go-github/v66/github/activity_watching.go b/vendor/github.com/google/go-github/v68/github/activity_watching.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/activity_watching.go rename to vendor/github.com/google/go-github/v68/github/activity_watching.go diff --git a/vendor/github.com/google/go-github/v66/github/admin.go b/vendor/github.com/google/go-github/v68/github/admin.go similarity index 97% rename from vendor/github.com/google/go-github/v66/github/admin.go rename to vendor/github.com/google/go-github/v68/github/admin.go index e93c2266..adf55d64 100644 --- a/vendor/github.com/google/go-github/v66/github/admin.go +++ b/vendor/github.com/google/go-github/v68/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.12/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-user +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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.12/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-team +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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/v66/github/admin_orgs.go b/vendor/github.com/google/go-github/v68/github/admin_orgs.go similarity index 93% rename from vendor/github.com/google/go-github/v66/github/admin_orgs.go rename to vendor/github.com/google/go-github/v68/github/admin_orgs.go index cb11fe47..8b50756b 100644 --- a/vendor/github.com/google/go-github/v66/github/admin_orgs.go +++ b/vendor/github.com/google/go-github/v68/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.12/rest/enterprise-admin/orgs#create-an-organization +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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.12/rest/enterprise-admin/orgs#update-an-organization-name +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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.12/rest/enterprise-admin/orgs#update-an-organization-name +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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/v66/github/admin_stats.go b/vendor/github.com/google/go-github/v68/github/admin_stats.go similarity index 98% rename from vendor/github.com/google/go-github/v66/github/admin_stats.go rename to vendor/github.com/google/go-github/v68/github/admin_stats.go index 70412625..f012d798 100644 --- a/vendor/github.com/google/go-github/v66/github/admin_stats.go +++ b/vendor/github.com/google/go-github/v68/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.12/rest/enterprise-admin/admin-stats#get-all-statistics +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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/v66/github/admin_users.go b/vendor/github.com/google/go-github/v68/github/admin_users.go similarity index 94% rename from vendor/github.com/google/go-github/v66/github/admin_users.go rename to vendor/github.com/google/go-github/v68/github/admin_users.go index 82e568a0..6877cef4 100644 --- a/vendor/github.com/google/go-github/v66/github/admin_users.go +++ b/vendor/github.com/google/go-github/v68/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.12/rest/enterprise-admin/users#create-a-user +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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.12/rest/enterprise-admin/users#delete-a-user +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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.12/rest/enterprise-admin/users#create-an-impersonation-oauth-token +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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.12/rest/enterprise-admin/users#delete-an-impersonation-oauth-token +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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/v66/github/apps.go b/vendor/github.com/google/go-github/v68/github/apps.go similarity index 87% rename from vendor/github.com/google/go-github/v66/github/apps.go rename to vendor/github.com/google/go-github/v68/github/apps.go index 2f74c2c2..3dd392d0 100644 --- a/vendor/github.com/google/go-github/v66/github/apps.go +++ b/vendor/github.com/google/go-github/v68/github/apps.go @@ -80,22 +80,47 @@ type InstallationPermissions struct { Actions *string `json:"actions,omitempty"` ActionsVariables *string `json:"actions_variables,omitempty"` Administration *string `json:"administration,omitempty"` + Attestations *string `json:"attestations,omitempty"` Blocking *string `json:"blocking,omitempty"` Checks *string `json:"checks,omitempty"` + Codespaces *string `json:"codespaces,omitempty"` + CodespacesLifecycleAdmin *string `json:"codespaces_lifecycle_admin,omitempty"` + CodespacesMetadata *string `json:"codespaces_metadata,omitempty"` + CodespacesSecrets *string `json:"codespaces_secrets,omitempty"` + CodespacesUserSecrets *string `json:"codespaces_user_secrets,omitempty"` Contents *string `json:"contents,omitempty"` ContentReferences *string `json:"content_references,omitempty"` + CopilotMessages *string `json:"copilot_messages,omitempty"` + DependabotSecrets *string `json:"dependabot_secrets,omitempty"` Deployments *string `json:"deployments,omitempty"` + Discussions *string `json:"discussions,omitempty"` Emails *string `json:"emails,omitempty"` Environments *string `json:"environments,omitempty"` Followers *string `json:"followers,omitempty"` + Gists *string `json:"gists,omitempty"` + GitSigningSSHPublicKeys *string `json:"git_signing_ssh_public_keys,omitempty"` + GPGKeys *string `json:"gpg_keys,omitempty"` + InteractionLimits *string `json:"interaction_limits,omitempty"` Issues *string `json:"issues,omitempty"` + Keys *string `json:"keys,omitempty"` Metadata *string `json:"metadata,omitempty"` Members *string `json:"members,omitempty"` + MergeQueues *string `json:"merge_queues,omitempty"` + OrganizationActionsVariables *string `json:"organization_actions_variables,omitempty"` OrganizationAdministration *string `json:"organization_administration,omitempty"` + OrganizationAnnouncementBanners *string `json:"organization_announcement_banners,omitempty"` + OrganizationAPIInsights *string `json:"organization_api_insights,omitempty"` + OrganizationCodespaces *string `json:"organization_codespaces,omitempty"` + OrganizationCodespacesSecrets *string `json:"organization_codespaces_secrets,omitempty"` + OrganizationCodespacesSettings *string `json:"organization_codespaces_settings,omitempty"` + OrganizationCopilotSeatManagement *string `json:"organization_copilot_seat_management,omitempty"` OrganizationCustomProperties *string `json:"organization_custom_properties,omitempty"` OrganizationCustomRoles *string `json:"organization_custom_roles,omitempty"` OrganizationCustomOrgRoles *string `json:"organization_custom_org_roles,omitempty"` + OrganizationDependabotSecrets *string `json:"organization_dependabot_secrets,omitempty"` + OrganizationEvents *string `json:"organization_events,omitempty"` OrganizationHooks *string `json:"organization_hooks,omitempty"` + OrganizationKnowledgeBases *string `json:"organization_knowledge_bases,omitempty"` OrganizationPackages *string `json:"organization_packages,omitempty"` OrganizationPersonalAccessTokens *string `json:"organization_personal_access_tokens,omitempty"` OrganizationPersonalAccessTokenRequests *string `json:"organization_personal_access_token_requests,omitempty"` @@ -107,7 +132,11 @@ type InstallationPermissions struct { OrganizationUserBlocking *string `json:"organization_user_blocking,omitempty"` Packages *string `json:"packages,omitempty"` Pages *string `json:"pages,omitempty"` + Plan *string `json:"plan,omitempty"` + Profile *string `json:"profile,omitempty"` PullRequests *string `json:"pull_requests,omitempty"` + RepositoryAdvisories *string `json:"repository_advisories,omitempty"` + RepositoryCustomProperties *string `json:"repository_custom_properties,omitempty"` RepositoryHooks *string `json:"repository_hooks,omitempty"` RepositoryProjects *string `json:"repository_projects,omitempty"` RepositoryPreReceiveHooks *string `json:"repository_pre_receive_hooks,omitempty"` @@ -115,9 +144,12 @@ type InstallationPermissions struct { SecretScanningAlerts *string `json:"secret_scanning_alerts,omitempty"` SecurityEvents *string `json:"security_events,omitempty"` SingleFile *string `json:"single_file,omitempty"` + Starring *string `json:"starring,omitempty"` Statuses *string `json:"statuses,omitempty"` TeamDiscussions *string `json:"team_discussions,omitempty"` + UserEvents *string `json:"user_events,omitempty"` VulnerabilityAlerts *string `json:"vulnerability_alerts,omitempty"` + Watching *string `json:"watching,omitempty"` Workflows *string `json:"workflows,omitempty"` } @@ -393,7 +425,7 @@ func (s *AppsService) CreateInstallationTokenListRepos(ctx context.Context, id i //meta:operation POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments func (s *AppsService) CreateAttachment(ctx context.Context, contentReferenceID int64, title, body string) (*Attachment, *Response, error) { u := fmt.Sprintf("content_references/%v/attachments", contentReferenceID) - payload := &Attachment{Title: String(title), Body: String(body)} + payload := &Attachment{Title: Ptr(title), Body: Ptr(body)} req, err := s.client.NewRequest("POST", u, payload) if err != nil { return nil, nil, err diff --git a/vendor/github.com/google/go-github/v66/github/apps_hooks.go b/vendor/github.com/google/go-github/v68/github/apps_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/apps_hooks.go rename to vendor/github.com/google/go-github/v68/github/apps_hooks.go diff --git a/vendor/github.com/google/go-github/v66/github/apps_hooks_deliveries.go b/vendor/github.com/google/go-github/v68/github/apps_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/apps_hooks_deliveries.go rename to vendor/github.com/google/go-github/v68/github/apps_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v66/github/apps_installation.go b/vendor/github.com/google/go-github/v68/github/apps_installation.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/apps_installation.go rename to vendor/github.com/google/go-github/v68/github/apps_installation.go diff --git a/vendor/github.com/google/go-github/v66/github/apps_manifest.go b/vendor/github.com/google/go-github/v68/github/apps_manifest.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/apps_manifest.go rename to vendor/github.com/google/go-github/v68/github/apps_manifest.go diff --git a/vendor/github.com/google/go-github/v66/github/apps_marketplace.go b/vendor/github.com/google/go-github/v68/github/apps_marketplace.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/apps_marketplace.go rename to vendor/github.com/google/go-github/v68/github/apps_marketplace.go diff --git a/vendor/github.com/google/go-github/v68/github/attestations.go b/vendor/github.com/google/go-github/v68/github/attestations.go new file mode 100644 index 00000000..618d5d73 --- /dev/null +++ b/vendor/github.com/google/go-github/v68/github/attestations.go @@ -0,0 +1,27 @@ +// Copyright 2024 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" +) + +// Attestation represents an artifact attestation associated with a repository. +// The provided bundle can be used to verify the provenance of artifacts. +// +// https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds +type Attestation struct { + // The attestation's Sigstore Bundle. + // Refer to the sigstore bundle specification for more info: + // https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto + Bundle json.RawMessage `json:"bundle"` + RepositoryID int64 `json:"repository_id"` +} + +// AttestationsResponse represents a collection of artifact attestations. +type AttestationsResponse struct { + Attestations []*Attestation `json:"attestations"` +} diff --git a/vendor/github.com/google/go-github/v66/github/authorizations.go b/vendor/github.com/google/go-github/v68/github/authorizations.go similarity index 98% rename from vendor/github.com/google/go-github/v66/github/authorizations.go rename to vendor/github.com/google/go-github/v68/github/authorizations.go index 9bfff733..8b8a67d5 100644 --- a/vendor/github.com/google/go-github/v66/github/authorizations.go +++ b/vendor/github.com/google/go-github/v68/github/authorizations.go @@ -15,7 +15,7 @@ import ( // GitHub API docs: https://docs.github.com/rest/oauth/#scopes type Scope string -// This is the set of scopes for GitHub API V3 +// This is the set of scopes for GitHub API V3. const ( ScopeNone Scope = "(no scope)" // REVISIT: is this actually returned, or just a documentation artifact? ScopeUser Scope = "user" @@ -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.12/rest/enterprise-admin/users#create-an-impersonation-oauth-token +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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.12/rest/enterprise-admin/users#delete-an-impersonation-oauth-token +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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/v66/github/billing.go b/vendor/github.com/google/go-github/v68/github/billing.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/billing.go rename to vendor/github.com/google/go-github/v68/github/billing.go diff --git a/vendor/github.com/google/go-github/v66/github/checks.go b/vendor/github.com/google/go-github/v68/github/checks.go similarity index 99% rename from vendor/github.com/google/go-github/v66/github/checks.go rename to vendor/github.com/google/go-github/v68/github/checks.go index 71e50c15..711be207 100644 --- a/vendor/github.com/google/go-github/v66/github/checks.go +++ b/vendor/github.com/google/go-github/v68/github/checks.go @@ -401,7 +401,7 @@ type CheckSuitePreferenceResults struct { Repository *Repository `json:"repository,omitempty"` } -// PreferenceList represents a list of auto trigger checks for repository +// PreferenceList represents a list of auto trigger checks for repository. type PreferenceList struct { AutoTriggerChecks []*AutoTriggerCheck `json:"auto_trigger_checks,omitempty"` // A slice of auto trigger checks that can be set for a check suite in a repository. } @@ -429,7 +429,7 @@ func (s *ChecksService) SetCheckSuitePreferences(ctx context.Context, owner, rep return checkSuitePrefResults, resp, nil } -// CreateCheckSuiteOptions sets up parameters to manually create a check suites +// CreateCheckSuiteOptions sets up parameters to manually create a check suites. type CreateCheckSuiteOptions struct { HeadSHA string `json:"head_sha"` // The sha of the head commit. (Required.) HeadBranch *string `json:"head_branch,omitempty"` // The name of the head branch where the code changes are implemented. diff --git a/vendor/github.com/google/go-github/v66/github/code-scanning.go b/vendor/github.com/google/go-github/v68/github/code_scanning.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/code-scanning.go rename to vendor/github.com/google/go-github/v68/github/code_scanning.go diff --git a/vendor/github.com/google/go-github/v66/github/codesofconduct.go b/vendor/github.com/google/go-github/v68/github/codesofconduct.go similarity index 95% rename from vendor/github.com/google/go-github/v66/github/codesofconduct.go rename to vendor/github.com/google/go-github/v68/github/codesofconduct.go index 7d7f9ef8..aba05741 100644 --- a/vendor/github.com/google/go-github/v66/github/codesofconduct.go +++ b/vendor/github.com/google/go-github/v68/github/codesofconduct.go @@ -50,7 +50,7 @@ func (s *CodesOfConductService) List(ctx context.Context) ([]*CodeOfConduct, *Re // ListCodesOfConduct returns all codes of conduct. // -// Deprecated: Use CodesOfConductService.List instead +// Deprecated: Use CodesOfConductService.List instead. func (c *Client) ListCodesOfConduct(ctx context.Context) ([]*CodeOfConduct, *Response, error) { return c.CodesOfConduct.List(ctx) } @@ -81,7 +81,7 @@ func (s *CodesOfConductService) Get(ctx context.Context, key string) (*CodeOfCon // GetCodeOfConduct returns an individual code of conduct. // -// Deprecated: Use CodesOfConductService.Get instead +// Deprecated: Use CodesOfConductService.Get instead. func (c *Client) GetCodeOfConduct(ctx context.Context, key string) (*CodeOfConduct, *Response, error) { return c.CodesOfConduct.Get(ctx, key) } diff --git a/vendor/github.com/google/go-github/v66/github/codespaces.go b/vendor/github.com/google/go-github/v68/github/codespaces.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/codespaces.go rename to vendor/github.com/google/go-github/v68/github/codespaces.go diff --git a/vendor/github.com/google/go-github/v66/github/codespaces_secrets.go b/vendor/github.com/google/go-github/v68/github/codespaces_secrets.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/codespaces_secrets.go rename to vendor/github.com/google/go-github/v68/github/codespaces_secrets.go diff --git a/vendor/github.com/google/go-github/v68/github/copilot.go b/vendor/github.com/google/go-github/v68/github/copilot.go new file mode 100644 index 00000000..a2b2aa09 --- /dev/null +++ b/vendor/github.com/google/go-github/v68/github/copilot.go @@ -0,0 +1,570 @@ +// Copyright 2023 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" + "encoding/json" + "errors" + "fmt" + "time" +) + +// CopilotService provides access to the Copilot-related functions +// in the GitHub API. +// +// GitHub API docs: https://docs.github.com/en/rest/copilot/ +type CopilotService service + +// CopilotOrganizationDetails represents the details of an organization's Copilot for Business subscription. +type CopilotOrganizationDetails struct { + SeatBreakdown *CopilotSeatBreakdown `json:"seat_breakdown"` + PublicCodeSuggestions string `json:"public_code_suggestions"` + CopilotChat string `json:"copilot_chat"` + SeatManagementSetting string `json:"seat_management_setting"` +} + +// CopilotSeatBreakdown represents the breakdown of Copilot for Business seats for the organization. +type CopilotSeatBreakdown struct { + Total int `json:"total"` + AddedThisCycle int `json:"added_this_cycle"` + PendingCancellation int `json:"pending_cancellation"` + PendingInvitation int `json:"pending_invitation"` + ActiveThisCycle int `json:"active_this_cycle"` + InactiveThisCycle int `json:"inactive_this_cycle"` +} + +// ListCopilotSeatsResponse represents the Copilot for Business seat assignments for an organization. +type ListCopilotSeatsResponse struct { + TotalSeats int64 `json:"total_seats"` + Seats []*CopilotSeatDetails `json:"seats"` +} + +// CopilotSeatDetails represents the details of a Copilot for Business seat. +type CopilotSeatDetails struct { + // Assignee can either be a User, Team, or Organization. + Assignee interface{} `json:"assignee"` + AssigningTeam *Team `json:"assigning_team,omitempty"` + PendingCancellationDate *string `json:"pending_cancellation_date,omitempty"` + LastActivityAt *Timestamp `json:"last_activity_at,omitempty"` + LastActivityEditor *string `json:"last_activity_editor,omitempty"` + CreatedAt *Timestamp `json:"created_at"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + PlanType *string `json:"plan_type,omitempty"` +} + +// SeatAssignments represents the number of seats assigned. +type SeatAssignments struct { + SeatsCreated int `json:"seats_created"` +} + +// SeatCancellations represents the number of seats cancelled. +type SeatCancellations struct { + SeatsCancelled int `json:"seats_cancelled"` +} + +// CopilotMetricsListOptions represents the optional parameters to the CopilotService get metrics methods. +type CopilotMetricsListOptions struct { + Since *time.Time `url:"since,omitempty"` + Until *time.Time `url:"until,omitempty"` + + ListOptions +} + +// CopilotIDECodeCompletionsLanguage represents Copilot usage metrics for completions in the IDE for a language. +type CopilotIDECodeCompletionsLanguage struct { + Name string `json:"name"` + TotalEngagedUsers int `json:"total_engaged_users"` +} + +// CopilotIDECodeCompletionsModelLanguage represents Copilot usage metrics for completions in the IDE for a model and language. +type CopilotIDECodeCompletionsModelLanguage struct { + Name string `json:"name"` + TotalEngagedUsers int `json:"total_engaged_users"` + TotalCodeSuggestions int `json:"total_code_suggestions"` + TotalCodeAcceptances int `json:"total_code_acceptances"` + TotalCodeLinesSuggested int `json:"total_code_lines_suggested"` + TotalCodeLinesAccepted int `json:"total_code_lines_accepted"` +} + +// CopilotIDECodeCompletionsModel represents Copilot usage metrics for completions in the IDE for a model. +type CopilotIDECodeCompletionsModel struct { + Name string `json:"name"` + IsCustomModel bool `json:"is_custom_model"` + CustomModelTrainingDate *string `json:"custom_model_training_date,omitempty"` + TotalEngagedUsers int `json:"total_engaged_users"` + Languages []*CopilotIDECodeCompletionsModelLanguage `json:"languages"` +} + +// CopilotIDECodeCompletionsEditor represents Copilot usage metrics for completions in the IDE for an editor. +type CopilotIDECodeCompletionsEditor struct { + Name string `json:"name"` + TotalEngagedUsers int `json:"total_engaged_users"` + Models []*CopilotIDECodeCompletionsModel `json:"models"` +} + +// CopilotIDECodeCompletions represents Copilot usage metrics for Copilot code completions in the IDE, categorized by editor, model and language. +type CopilotIDECodeCompletions struct { + TotalEngagedUsers int `json:"total_engaged_users"` + Languages []*CopilotIDECodeCompletionsLanguage `json:"languages"` + Editors []*CopilotIDECodeCompletionsEditor `json:"editors"` +} + +// CopilotIDEChatModel represents Copilot usage metrics for chatting with a model in the IDE. +type CopilotIDEChatModel struct { + Name string `json:"name"` + IsCustomModel bool `json:"is_custom_model"` + CustomModelTrainingDate *string `json:"custom_model_training_date,omitempty"` + TotalEngagedUsers int `json:"total_engaged_users"` + TotalChats int `json:"total_chats"` + TotalChatInsertionEvents int `json:"total_chat_insertion_events"` + TotalChatCopyEvents int `json:"total_chat_copy_events"` +} + +// CopilotIDEChatEditor represents Copilot usage metrics for chatting with a model in the IDE, categorized by editor and model. +type CopilotIDEChatEditor struct { + Name string `json:"name"` + TotalEngagedUsers int `json:"total_engaged_users"` + Models []*CopilotIDEChatModel `json:"models"` +} + +// CopilotIDEChat represents Copilot usage metrics for Copilot Chat in the IDE, categorized by editor and model. +type CopilotIDEChat struct { + TotalEngagedUsers int `json:"total_engaged_users"` + Editors []*CopilotIDEChatEditor `json:"editors"` +} + +// CopilotDotcomChatModel represents Copilot usage metrics for chatting with a model in the webbrowser. +type CopilotDotcomChatModel struct { + Name string `json:"name"` + IsCustomModel bool `json:"is_custom_model"` + CustomModelTrainingDate *string `json:"custom_model_training_date,omitempty"` + TotalEngagedUsers int `json:"total_engaged_users"` + TotalChats int `json:"total_chats"` +} + +// CopilotDotcomChat represents Copilot usage metrics for Copilot Chat in the webbrowser, categorized by model. +type CopilotDotcomChat struct { + TotalEngagedUsers int `json:"total_engaged_users"` + Models []*CopilotDotcomChatModel `json:"models"` +} + +// CopilotDotcomPullRequestsModel represents Copilot usage metrics for pull requests in the webbrowser, categorized by model. +type CopilotDotcomPullRequestsModel struct { + Name string `json:"name"` + IsCustomModel bool `json:"is_custom_model"` + CustomModelTrainingDate *string `json:"custom_model_training_date,omitempty"` + TotalPRSummariesCreated int `json:"total_pr_summaries_created"` + TotalEngagedUsers int `json:"total_engaged_users"` +} + +// CopilotDotcomPullRequestsRepository represents Copilot usage metrics for pull requests in the webbrowser, categorized by repository. +type CopilotDotcomPullRequestsRepository struct { + Name string `json:"name"` + TotalEngagedUsers int `json:"total_engaged_users"` + Models []*CopilotDotcomPullRequestsModel `json:"models"` +} + +// CopilotDotcomPullRequests represents Copilot usage metrics for pull requests in the webbrowser, categorized by repository and model. +type CopilotDotcomPullRequests struct { + TotalEngagedUsers int `json:"total_engaged_users"` + Repositories []*CopilotDotcomPullRequestsRepository `json:"repositories"` +} + +// CopilotMetrics represents Copilot usage metrics for a given day. +type CopilotMetrics struct { + Date string `json:"date"` + TotalActiveUsers *int `json:"total_active_users,omitempty"` + TotalEngagedUsers *int `json:"total_engaged_users,omitempty"` + CopilotIDECodeCompletions *CopilotIDECodeCompletions `json:"copilot_ide_code_completions,omitempty"` + CopilotIDEChat *CopilotIDEChat `json:"copilot_ide_chat,omitempty"` + CopilotDotcomChat *CopilotDotcomChat `json:"copilot_dotcom_chat,omitempty"` + CopilotDotcomPullRequests *CopilotDotcomPullRequests `json:"copilot_dotcom_pull_requests,omitempty"` +} + +func (cp *CopilotSeatDetails) UnmarshalJSON(data []byte) error { + // Using an alias to avoid infinite recursion when calling json.Unmarshal + type alias CopilotSeatDetails + var seatDetail alias + + if err := json.Unmarshal(data, &seatDetail); err != nil { + return err + } + + cp.AssigningTeam = seatDetail.AssigningTeam + cp.PendingCancellationDate = seatDetail.PendingCancellationDate + cp.LastActivityAt = seatDetail.LastActivityAt + cp.LastActivityEditor = seatDetail.LastActivityEditor + cp.CreatedAt = seatDetail.CreatedAt + cp.UpdatedAt = seatDetail.UpdatedAt + cp.PlanType = seatDetail.PlanType + + switch v := seatDetail.Assignee.(type) { + case map[string]interface{}: + jsonData, err := json.Marshal(seatDetail.Assignee) + if err != nil { + return err + } + + if v["type"] == nil { + return errors.New("assignee type field is not set") + } + + if t, ok := v["type"].(string); ok && t == "User" { + user := &User{} + if err := json.Unmarshal(jsonData, user); err != nil { + return err + } + cp.Assignee = user + } else if t, ok := v["type"].(string); ok && t == "Team" { + team := &Team{} + if err := json.Unmarshal(jsonData, team); err != nil { + return err + } + cp.Assignee = team + } else if t, ok := v["type"].(string); ok && t == "Organization" { + organization := &Organization{} + if err := json.Unmarshal(jsonData, organization); err != nil { + return err + } + cp.Assignee = organization + } else { + return fmt.Errorf("unsupported assignee type %v", v["type"]) + } + default: + return fmt.Errorf("unsupported assignee type %T", v) + } + + return nil +} + +// GetUser gets the User from the CopilotSeatDetails if the assignee is a user. +func (cp *CopilotSeatDetails) GetUser() (*User, bool) { u, ok := cp.Assignee.(*User); return u, ok } + +// GetTeam gets the Team from the CopilotSeatDetails if the assignee is a team. +func (cp *CopilotSeatDetails) GetTeam() (*Team, bool) { t, ok := cp.Assignee.(*Team); return t, ok } + +// GetOrganization gets the Organization from the CopilotSeatDetails if the assignee is an organization. +func (cp *CopilotSeatDetails) GetOrganization() (*Organization, bool) { + o, ok := cp.Assignee.(*Organization) + return o, ok +} + +// GetCopilotBilling gets Copilot for Business billing information and settings for an organization. +// +// GitHub API docs: https://docs.github.com/rest/copilot/copilot-user-management#get-copilot-seat-information-and-settings-for-an-organization +// +//meta:operation GET /orgs/{org}/copilot/billing +func (s *CopilotService) GetCopilotBilling(ctx context.Context, org string) (*CopilotOrganizationDetails, *Response, error) { + u := fmt.Sprintf("orgs/%v/copilot/billing", org) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var copilotDetails *CopilotOrganizationDetails + resp, err := s.client.Do(ctx, req, &copilotDetails) + if err != nil { + return nil, resp, err + } + + return copilotDetails, resp, nil +} + +// ListCopilotSeats lists Copilot for Business seat assignments for an organization. +// +// To paginate through all seats, populate 'Page' with the number of the last page. +// +// GitHub API docs: https://docs.github.com/rest/copilot/copilot-user-management#list-all-copilot-seat-assignments-for-an-organization +// +//meta:operation GET /orgs/{org}/copilot/billing/seats +func (s *CopilotService) ListCopilotSeats(ctx context.Context, org string, opts *ListOptions) (*ListCopilotSeatsResponse, *Response, error) { + u := fmt.Sprintf("orgs/%v/copilot/billing/seats", org) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var copilotSeats *ListCopilotSeatsResponse + resp, err := s.client.Do(ctx, req, &copilotSeats) + if err != nil { + return nil, resp, err + } + + return copilotSeats, resp, nil +} + +// ListCopilotEnterpriseSeats lists Copilot for Business seat assignments for an enterprise. +// +// To paginate through all seats, populate 'Page' with the number of the last page. +// +// GitHub API docs: https://docs.github.com/rest/copilot/copilot-user-management#list-all-copilot-seat-assignments-for-an-enterprise +// +//meta:operation GET /enterprises/{enterprise}/copilot/billing/seats +func (s *CopilotService) ListCopilotEnterpriseSeats(ctx context.Context, enterprise string, opts *ListOptions) (*ListCopilotSeatsResponse, *Response, error) { + u := fmt.Sprintf("enterprises/%v/copilot/billing/seats", enterprise) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var copilotSeats *ListCopilotSeatsResponse + resp, err := s.client.Do(ctx, req, &copilotSeats) + if err != nil { + return nil, resp, err + } + + return copilotSeats, resp, nil +} + +// AddCopilotTeams adds teams to the Copilot for Business subscription for an organization. +// +// GitHub API docs: https://docs.github.com/rest/copilot/copilot-user-management#add-teams-to-the-copilot-subscription-for-an-organization +// +//meta:operation POST /orgs/{org}/copilot/billing/selected_teams +func (s *CopilotService) AddCopilotTeams(ctx context.Context, org string, teamNames []string) (*SeatAssignments, *Response, error) { + u := fmt.Sprintf("orgs/%v/copilot/billing/selected_teams", org) + + body := struct { + SelectedTeams []string `json:"selected_teams"` + }{ + SelectedTeams: teamNames, + } + + req, err := s.client.NewRequest("POST", u, body) + if err != nil { + return nil, nil, err + } + + var seatAssignments *SeatAssignments + resp, err := s.client.Do(ctx, req, &seatAssignments) + if err != nil { + return nil, resp, err + } + + return seatAssignments, resp, nil +} + +// RemoveCopilotTeams removes teams from the Copilot for Business subscription for an organization. +// +// GitHub API docs: https://docs.github.com/rest/copilot/copilot-user-management#remove-teams-from-the-copilot-subscription-for-an-organization +// +//meta:operation DELETE /orgs/{org}/copilot/billing/selected_teams +func (s *CopilotService) RemoveCopilotTeams(ctx context.Context, org string, teamNames []string) (*SeatCancellations, *Response, error) { + u := fmt.Sprintf("orgs/%v/copilot/billing/selected_teams", org) + + body := struct { + SelectedTeams []string `json:"selected_teams"` + }{ + SelectedTeams: teamNames, + } + + req, err := s.client.NewRequest("DELETE", u, body) + if err != nil { + return nil, nil, err + } + + var seatCancellations *SeatCancellations + resp, err := s.client.Do(ctx, req, &seatCancellations) + if err != nil { + return nil, resp, err + } + + return seatCancellations, resp, nil +} + +// AddCopilotUsers adds users to the Copilot for Business subscription for an organization +// +// GitHub API docs: https://docs.github.com/rest/copilot/copilot-user-management#add-users-to-the-copilot-subscription-for-an-organization +// +//meta:operation POST /orgs/{org}/copilot/billing/selected_users +func (s *CopilotService) AddCopilotUsers(ctx context.Context, org string, users []string) (*SeatAssignments, *Response, error) { + u := fmt.Sprintf("orgs/%v/copilot/billing/selected_users", org) + + body := struct { + SelectedUsernames []string `json:"selected_usernames"` + }{ + SelectedUsernames: users, + } + + req, err := s.client.NewRequest("POST", u, body) + if err != nil { + return nil, nil, err + } + + var seatAssignments *SeatAssignments + resp, err := s.client.Do(ctx, req, &seatAssignments) + if err != nil { + return nil, resp, err + } + + return seatAssignments, resp, nil +} + +// RemoveCopilotUsers removes users from the Copilot for Business subscription for an organization. +// +// GitHub API docs: https://docs.github.com/rest/copilot/copilot-user-management#remove-users-from-the-copilot-subscription-for-an-organization +// +//meta:operation DELETE /orgs/{org}/copilot/billing/selected_users +func (s *CopilotService) RemoveCopilotUsers(ctx context.Context, org string, users []string) (*SeatCancellations, *Response, error) { + u := fmt.Sprintf("orgs/%v/copilot/billing/selected_users", org) + + body := struct { + SelectedUsernames []string `json:"selected_usernames"` + }{ + SelectedUsernames: users, + } + + req, err := s.client.NewRequest("DELETE", u, body) + if err != nil { + return nil, nil, err + } + + var seatCancellations *SeatCancellations + resp, err := s.client.Do(ctx, req, &seatCancellations) + if err != nil { + return nil, resp, err + } + + return seatCancellations, resp, nil +} + +// GetSeatDetails gets Copilot for Business seat assignment details for a user. +// +// GitHub API docs: https://docs.github.com/rest/copilot/copilot-user-management#get-copilot-seat-assignment-details-for-a-user +// +//meta:operation GET /orgs/{org}/members/{username}/copilot +func (s *CopilotService) GetSeatDetails(ctx context.Context, org, user string) (*CopilotSeatDetails, *Response, error) { + u := fmt.Sprintf("orgs/%v/members/%v/copilot", org, user) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var seatDetails *CopilotSeatDetails + resp, err := s.client.Do(ctx, req, &seatDetails) + if err != nil { + return nil, resp, err + } + + return seatDetails, resp, nil +} + +// GetEnterpriseMetrics gets Copilot usage metrics for an enterprise. +// +// GitHub API docs: https://docs.github.com/rest/copilot/copilot-metrics#get-copilot-metrics-for-an-enterprise +// +//meta:operation GET /enterprises/{enterprise}/copilot/metrics +func (s *CopilotService) GetEnterpriseMetrics(ctx context.Context, enterprise string, opts *CopilotMetricsListOptions) ([]*CopilotMetrics, *Response, error) { + u := fmt.Sprintf("enterprises/%v/copilot/metrics", enterprise) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var metrics []*CopilotMetrics + resp, err := s.client.Do(ctx, req, &metrics) + if err != nil { + return nil, resp, err + } + + return metrics, resp, nil +} + +// GetEnterpriseTeamMetrics gets Copilot usage metrics for an enterprise team. +// +// GitHub API docs: https://docs.github.com/rest/copilot/copilot-metrics#get-copilot-metrics-for-an-enterprise-team +// +//meta:operation GET /enterprises/{enterprise}/team/{team_slug}/copilot/metrics +func (s *CopilotService) GetEnterpriseTeamMetrics(ctx context.Context, enterprise, team string, opts *CopilotMetricsListOptions) ([]*CopilotMetrics, *Response, error) { + u := fmt.Sprintf("enterprises/%v/team/%v/copilot/metrics", enterprise, team) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var metrics []*CopilotMetrics + resp, err := s.client.Do(ctx, req, &metrics) + if err != nil { + return nil, resp, err + } + + return metrics, resp, nil +} + +// GetOrganizationMetrics gets Copilot usage metrics for an organization. +// +// GitHub API docs: https://docs.github.com/rest/copilot/copilot-metrics#get-copilot-metrics-for-an-organization +// +//meta:operation GET /orgs/{org}/copilot/metrics +func (s *CopilotService) GetOrganizationMetrics(ctx context.Context, org string, opts *CopilotMetricsListOptions) ([]*CopilotMetrics, *Response, error) { + u := fmt.Sprintf("orgs/%v/copilot/metrics", org) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var metrics []*CopilotMetrics + resp, err := s.client.Do(ctx, req, &metrics) + if err != nil { + return nil, resp, err + } + + return metrics, resp, nil +} + +// GetOrganizationTeamMetrics gets Copilot usage metrics for an organization team. +// +// GitHub API docs: https://docs.github.com/rest/copilot/copilot-metrics#get-copilot-metrics-for-a-team +// +//meta:operation GET /orgs/{org}/team/{team_slug}/copilot/metrics +func (s *CopilotService) GetOrganizationTeamMetrics(ctx context.Context, org, team string, opts *CopilotMetricsListOptions) ([]*CopilotMetrics, *Response, error) { + u := fmt.Sprintf("orgs/%v/team/%v/copilot/metrics", org, team) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var metrics []*CopilotMetrics + resp, err := s.client.Do(ctx, req, &metrics) + if err != nil { + return nil, resp, err + } + + return metrics, resp, nil +} diff --git a/vendor/github.com/google/go-github/v66/github/dependabot.go b/vendor/github.com/google/go-github/v68/github/dependabot.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/dependabot.go rename to vendor/github.com/google/go-github/v68/github/dependabot.go diff --git a/vendor/github.com/google/go-github/v66/github/dependabot_alerts.go b/vendor/github.com/google/go-github/v68/github/dependabot_alerts.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/dependabot_alerts.go rename to vendor/github.com/google/go-github/v68/github/dependabot_alerts.go diff --git a/vendor/github.com/google/go-github/v66/github/dependabot_secrets.go b/vendor/github.com/google/go-github/v68/github/dependabot_secrets.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/dependabot_secrets.go rename to vendor/github.com/google/go-github/v68/github/dependabot_secrets.go diff --git a/vendor/github.com/google/go-github/v66/github/dependency_graph.go b/vendor/github.com/google/go-github/v68/github/dependency_graph.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/dependency_graph.go rename to vendor/github.com/google/go-github/v68/github/dependency_graph.go diff --git a/vendor/github.com/google/go-github/v66/github/dependency_graph_snapshots.go b/vendor/github.com/google/go-github/v68/github/dependency_graph_snapshots.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/dependency_graph_snapshots.go rename to vendor/github.com/google/go-github/v68/github/dependency_graph_snapshots.go diff --git a/vendor/github.com/google/go-github/v66/github/doc.go b/vendor/github.com/google/go-github/v68/github/doc.go similarity index 98% rename from vendor/github.com/google/go-github/v66/github/doc.go rename to vendor/github.com/google/go-github/v68/github/doc.go index 7196394f..4a0f163a 100644 --- a/vendor/github.com/google/go-github/v66/github/doc.go +++ b/vendor/github.com/google/go-github/v68/github/doc.go @@ -8,7 +8,7 @@ Package github provides a client for using the GitHub API. Usage: - import "github.com/google/go-github/v66/github" // with go modules enabled (GO111MODULE=on or outside GOPATH) + import "github.com/google/go-github/v68/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 @@ -156,8 +156,8 @@ bool, and int values. For example: // create a new private repository named "foo" repo := &github.Repository{ - Name: github.String("foo"), - Private: github.Bool(true), + Name: github.Ptr("foo"), + Private: github.Ptr(true), } client.Repositories.Create(ctx, "", repo) diff --git a/vendor/github.com/google/go-github/v66/github/emojis.go b/vendor/github.com/google/go-github/v68/github/emojis.go similarity index 95% rename from vendor/github.com/google/go-github/v66/github/emojis.go rename to vendor/github.com/google/go-github/v68/github/emojis.go index 93ef232f..b7a03dd9 100644 --- a/vendor/github.com/google/go-github/v66/github/emojis.go +++ b/vendor/github.com/google/go-github/v68/github/emojis.go @@ -34,7 +34,7 @@ func (s *EmojisService) List(ctx context.Context) (map[string]string, *Response, // ListEmojis returns the emojis available to use on GitHub. // -// Deprecated: Use EmojisService.List instead +// Deprecated: Use EmojisService.List instead. func (c *Client) ListEmojis(ctx context.Context) (map[string]string, *Response, error) { return c.Emojis.List(ctx) } diff --git a/vendor/github.com/google/go-github/v66/github/enterprise.go b/vendor/github.com/google/go-github/v68/github/enterprise.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/enterprise.go rename to vendor/github.com/google/go-github/v68/github/enterprise.go diff --git a/vendor/github.com/google/go-github/v66/github/enterprise_actions_runner_groups.go b/vendor/github.com/google/go-github/v68/github/enterprise_actions_runner_groups.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/enterprise_actions_runner_groups.go rename to vendor/github.com/google/go-github/v68/github/enterprise_actions_runner_groups.go diff --git a/vendor/github.com/google/go-github/v66/github/enterprise_actions_runners.go b/vendor/github.com/google/go-github/v68/github/enterprise_actions_runners.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/enterprise_actions_runners.go rename to vendor/github.com/google/go-github/v68/github/enterprise_actions_runners.go diff --git a/vendor/github.com/google/go-github/v66/github/enterprise_audit_log.go b/vendor/github.com/google/go-github/v68/github/enterprise_audit_log.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/enterprise_audit_log.go rename to vendor/github.com/google/go-github/v68/github/enterprise_audit_log.go diff --git a/vendor/github.com/google/go-github/v66/github/enterprise_code_security_and_analysis.go b/vendor/github.com/google/go-github/v68/github/enterprise_code_security_and_analysis.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/enterprise_code_security_and_analysis.go rename to vendor/github.com/google/go-github/v68/github/enterprise_code_security_and_analysis.go diff --git a/vendor/github.com/google/go-github/v68/github/enterprise_properties.go b/vendor/github.com/google/go-github/v68/github/enterprise_properties.go new file mode 100644 index 00000000..bc5ab55a --- /dev/null +++ b/vendor/github.com/google/go-github/v68/github/enterprise_properties.go @@ -0,0 +1,121 @@ +// Copyright 2024 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" +) + +// GetAllCustomProperties gets all custom properties that are defined for the specified enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/custom-properties#get-custom-properties-for-an-enterprise +// +//meta:operation GET /enterprises/{enterprise}/properties/schema +func (s *EnterpriseService) GetAllCustomProperties(ctx context.Context, enterprise string) ([]*CustomProperty, *Response, error) { + u := fmt.Sprintf("enterprises/%v/properties/schema", enterprise) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var customProperties []*CustomProperty + resp, err := s.client.Do(ctx, req, &customProperties) + if err != nil { + return nil, resp, err + } + + return customProperties, resp, nil +} + +// CreateOrUpdateCustomProperties creates new or updates existing custom properties that are defined for the specified enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/custom-properties#create-or-update-custom-properties-for-an-enterprise +// +//meta:operation PATCH /enterprises/{enterprise}/properties/schema +func (s *EnterpriseService) CreateOrUpdateCustomProperties(ctx context.Context, enterprise string, properties []*CustomProperty) ([]*CustomProperty, *Response, error) { + u := fmt.Sprintf("enterprises/%v/properties/schema", enterprise) + + params := struct { + Properties []*CustomProperty `json:"properties"` + }{ + Properties: properties, + } + + req, err := s.client.NewRequest("PATCH", u, params) + if err != nil { + return nil, nil, err + } + + var customProperties []*CustomProperty + resp, err := s.client.Do(ctx, req, &customProperties) + if err != nil { + return nil, resp, err + } + + return customProperties, resp, nil +} + +// GetCustomProperty gets a custom property that is defined for the specified enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/custom-properties#get-a-custom-property-for-an-enterprise +// +//meta:operation GET /enterprises/{enterprise}/properties/schema/{custom_property_name} +func (s *EnterpriseService) GetCustomProperty(ctx context.Context, enterprise, customPropertyName string) (*CustomProperty, *Response, error) { + u := fmt.Sprintf("enterprises/%v/properties/schema/%v", enterprise, customPropertyName) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var customProperty *CustomProperty + resp, err := s.client.Do(ctx, req, &customProperty) + if err != nil { + return nil, resp, err + } + + return customProperty, resp, nil +} + +// CreateOrUpdateCustomProperty creates a new or updates an existing custom property that is defined for the specified enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/custom-properties#create-or-update-a-custom-property-for-an-enterprise +// +//meta:operation PUT /enterprises/{enterprise}/properties/schema/{custom_property_name} +func (s *EnterpriseService) CreateOrUpdateCustomProperty(ctx context.Context, enterprise, customPropertyName string, property *CustomProperty) (*CustomProperty, *Response, error) { + u := fmt.Sprintf("enterprises/%v/properties/schema/%v", enterprise, customPropertyName) + + req, err := s.client.NewRequest("PUT", u, property) + if err != nil { + return nil, nil, err + } + + var customProperty *CustomProperty + resp, err := s.client.Do(ctx, req, &customProperty) + if err != nil { + return nil, resp, err + } + + return customProperty, resp, nil +} + +// RemoveCustomProperty removes a custom property that is defined for the specified enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/custom-properties#remove-a-custom-property-for-an-enterprise +// +//meta:operation DELETE /enterprises/{enterprise}/properties/schema/{custom_property_name} +func (s *EnterpriseService) RemoveCustomProperty(ctx context.Context, enterprise, customPropertyName string) (*Response, error) { + u := fmt.Sprintf("enterprises/%v/properties/schema/%v", enterprise, customPropertyName) + + 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/v66/github/event.go b/vendor/github.com/google/go-github/v68/github/event.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/event.go rename to vendor/github.com/google/go-github/v68/github/event.go diff --git a/vendor/github.com/google/go-github/v66/github/event_types.go b/vendor/github.com/google/go-github/v68/github/event_types.go similarity index 95% rename from vendor/github.com/google/go-github/v66/github/event_types.go rename to vendor/github.com/google/go-github/v68/github/event_types.go index fbe56b20..37e62c2f 100644 --- a/vendor/github.com/google/go-github/v66/github/event_types.go +++ b/vendor/github.com/google/go-github/v68/github/event_types.go @@ -29,6 +29,19 @@ type BranchProtectionRuleEvent struct { Installation *Installation `json:"installation,omitempty"` } +// BranchProtectionConfigurationEvent is triggered when there is a change to branch protection configurations for a repository. +// The Webhook event name is "branch_protection_configuration". +// +// GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#branch_protection_configuration +type BranchProtectionConfigurationEvent struct { + Action *string `json:"action,omitempty"` + Repo *Repository `json:"repository,omitempty"` + Org *Organization `json:"organization,omitempty"` + Enterprise *Enterprise `json:"enterprise,omitempty"` + Sender *User `json:"sender,omitempty"` + Installation *Installation `json:"installation,omitempty"` +} + // CheckRunEvent is triggered when a check run is "created", "completed", or "rerequested". // The Webhook event name is "check_run". // @@ -119,6 +132,43 @@ type CreateEvent struct { Installation *Installation `json:"installation,omitempty"` } +// CustomPropertyEvent represents a created, deleted or updated custom property. +// The Webhook event name is "custom_property". +// +// Note: this is related to custom property configuration at the enterprise or organization level. +// See CustomPropertyValuesEvent for activity related to custom property values for a repository. +// +// GitHub API docs: https://docs.github.com/en/webhooks/webhook-events-and-payloads#custom_property +type CustomPropertyEvent struct { + // Action possible values are: "created", "deleted", "updated". + Action *string `json:"action,omitempty"` + Definition *CustomProperty `json:"definition,omitempty"` + + // The following fields are only populated by Webhook events. + Enterprise *Enterprise `json:"enterprise,omitempty"` + Installation *Installation `json:"installation,omitempty"` + Org *Organization `json:"organization,omitempty"` + Sender *User `json:"sender,omitempty"` +} + +// CustomPropertyValuesEvent represents an update to a custom property. +// The Webhook event name is "custom_property_values". +// +// GitHub API docs: https://docs.github.com/en/webhooks/webhook-events-and-payloads#custom_property_values +type CustomPropertyValuesEvent struct { + // Action possible values are: "updated". + Action *string `json:"action,omitempty"` + NewPropertyValues []*CustomPropertyValue `json:"new_property_values,omitempty"` + OldPropertyValues []*CustomPropertyValue `json:"old_property_values,omitempty"` + + // The following fields are only populated by Webhook events. + Enterprise *Enterprise `json:"enterprise,omitempty"` + Installation *Installation `json:"installation,omitempty"` + Repo *Repository `json:"repository,omitempty"` + Org *Organization `json:"organization,omitempty"` + Sender *User `json:"sender,omitempty"` +} + // DeleteEvent represents a deleted branch or tag. // The Webhook event name is "delete". // @@ -753,8 +803,7 @@ type MemberChanges struct { // // GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#member type MemberEvent struct { - // Action is the action that was performed. Possible values are: - //"added", "edited", "removed". + // Action is the action that was performed. Possible values are: "added", "edited", "removed". Action *string `json:"action,omitempty"` Member *User `json:"member,omitempty"` Changes *MemberChanges `json:"changes,omitempty"` @@ -1034,63 +1083,13 @@ type PingEvent struct { Installation *Installation `json:"installation,omitempty"` } -// ProjectEvent is triggered when project is created, modified or deleted. -// The webhook event name is "project". -// -// GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#project -type ProjectEvent struct { - Action *string `json:"action,omitempty"` - Changes *ProjectChange `json:"changes,omitempty"` - Project *Project `json:"project,omitempty"` - - // The following fields are only populated by Webhook events. - Repo *Repository `json:"repository,omitempty"` - Org *Organization `json:"organization,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// ProjectCardEvent is triggered when a project card is created, updated, moved, converted to an issue, or deleted. -// The webhook event name is "project_card". -// -// GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#project_card -type ProjectCardEvent struct { - Action *string `json:"action,omitempty"` - Changes *ProjectCardChange `json:"changes,omitempty"` - AfterID *int64 `json:"after_id,omitempty"` - ProjectCard *ProjectCard `json:"project_card,omitempty"` - - // The following fields are only populated by Webhook events. - Repo *Repository `json:"repository,omitempty"` - Org *Organization `json:"organization,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// ProjectColumnEvent is triggered when a project column is created, updated, moved, or deleted. -// The webhook event name is "project_column". -// -// GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#project_column -type ProjectColumnEvent struct { - Action *string `json:"action,omitempty"` - Changes *ProjectColumnChange `json:"changes,omitempty"` - AfterID *int64 `json:"after_id,omitempty"` - ProjectColumn *ProjectColumn `json:"project_column,omitempty"` - - // The following fields are only populated by Webhook events. - Repo *Repository `json:"repository,omitempty"` - Org *Organization `json:"organization,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - // ProjectV2Event is triggered when there is activity relating to an organization-level project. // The Webhook event name is "projects_v2". // // GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#projects_v2 type ProjectV2Event struct { - Action *string `json:"action,omitempty"` - ProjectsV2 *ProjectsV2 `json:"projects_v2,omitempty"` + Action *string `json:"action,omitempty"` + ProjectsV2 *ProjectV2 `json:"projects_v2,omitempty"` // The following fields are only populated by Webhook events. Installation *Installation `json:"installation,omitempty"` @@ -1098,8 +1097,8 @@ type ProjectV2Event struct { Sender *User `json:"sender,omitempty"` } -// ProjectsV2 represents a projects v2 project. -type ProjectsV2 struct { +// ProjectV2 represents a v2 project. +type ProjectV2 struct { ID *int64 `json:"id,omitempty"` NodeID *string `json:"node_id,omitempty"` Owner *User `json:"owner,omitempty"` @@ -1114,6 +1113,17 @@ type ProjectsV2 struct { Number *int `json:"number,omitempty"` ShortDescription *string `json:"short_description,omitempty"` DeletedBy *User `json:"deleted_by,omitempty"` + + // Fields migrated from the Project (classic) struct: + URL *string `json:"url,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + ColumnsURL *string `json:"columns_url,omitempty"` + OwnerURL *string `json:"owner_url,omitempty"` + Name *string `json:"name,omitempty"` + Body *string `json:"body,omitempty"` + State *string `json:"state,omitempty"` + OrganizationPermission *string `json:"organization_permission,omitempty"` + Private *bool `json:"private,omitempty"` } // ProjectV2ItemEvent is triggered when there is activity relating to an item on an organization-level project. @@ -1505,6 +1515,22 @@ type RepositoryImportEvent struct { Sender *User `json:"sender,omitempty"` } +// RepositoryRulesetEvent triggers whenever there is a change to the repository's ruleset configuration. +// +// This can include updates to protection rules, required status checks, code owners, or other related configurations. +// +// GitHub API docs: https://docs.github.com/en/webhooks/webhook-events-and-payloads#repository_ruleset +type RepositoryRulesetEvent struct { + Action *string `json:"action,omitempty"` + Enterprise *Enterprise `json:"enterprise,omitempty"` + Installation *Installation `json:"installation,omitempty"` + Organization *Organization `json:"organization,omitempty"` + Repository *Repository `json:"repository,omitempty"` + RepositoryRuleset *RepositoryRuleset `json:"repository_ruleset"` + Changes *RepositoryRulesetEditedChanges `json:"changes,omitempty"` + Sender *User `json:"sender"` +} + // RepositoryVulnerabilityAlertEvent is triggered when a security alert is created, dismissed, or resolved. // // GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#repository_vulnerability_alert @@ -1565,6 +1591,20 @@ type SecretScanningAlertEvent struct { Installation *Installation `json:"installation,omitempty"` } +// SecretScanningAlertLocationEvent is triggered when there is activity relating to the locations of a secret in a secret scanning alert. +// The Webhook event name is "secret_scanning_alert_location". +// +// GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#secret_scanning_alert_location +type SecretScanningAlertLocationEvent struct { + Action *string `json:"action,omitempty"` + Alert *SecretScanningAlert `json:"alert,omitempty"` + Installation *Installation `json:"installation,omitempty"` + Location *SecretScanningAlertLocation `json:"location,omitempty"` + Organization *Organization `json:"organization,omitempty"` + Repo *Repository `json:"repository,omitempty"` + Sender *User `json:"sender,omitempty"` +} + // SecurityAndAnalysisEvent is triggered when code security and analysis features // are enabled or disabled for a repository. // @@ -1745,6 +1785,7 @@ type WorkflowJobEvent struct { Repo *Repository `json:"repository,omitempty"` Sender *User `json:"sender,omitempty"` Installation *Installation `json:"installation,omitempty"` + Deployment *Deployment `json:"deployment,omitempty"` } // WorkflowRunEvent is triggered when a GitHub Actions workflow run is requested or completed. diff --git a/vendor/github.com/google/go-github/v66/github/gists.go b/vendor/github.com/google/go-github/v68/github/gists.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/gists.go rename to vendor/github.com/google/go-github/v68/github/gists.go diff --git a/vendor/github.com/google/go-github/v66/github/gists_comments.go b/vendor/github.com/google/go-github/v68/github/gists_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/gists_comments.go rename to vendor/github.com/google/go-github/v68/github/gists_comments.go diff --git a/vendor/github.com/google/go-github/v66/github/git.go b/vendor/github.com/google/go-github/v68/github/git.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/git.go rename to vendor/github.com/google/go-github/v68/github/git.go diff --git a/vendor/github.com/google/go-github/v66/github/git_blobs.go b/vendor/github.com/google/go-github/v68/github/git_blobs.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/git_blobs.go rename to vendor/github.com/google/go-github/v68/github/git_blobs.go diff --git a/vendor/github.com/google/go-github/v66/github/git_commits.go b/vendor/github.com/google/go-github/v68/github/git_commits.go similarity index 98% rename from vendor/github.com/google/go-github/v66/github/git_commits.go rename to vendor/github.com/google/go-github/v68/github/git_commits.go index 573d38be..d7ed3ecb 100644 --- a/vendor/github.com/google/go-github/v66/github/git_commits.go +++ b/vendor/github.com/google/go-github/v68/github/git_commits.go @@ -49,7 +49,6 @@ type Commit struct { Message *string `json:"message,omitempty"` Tree *Tree `json:"tree,omitempty"` Parents []*Commit `json:"parents,omitempty"` - Stats *CommitStats `json:"stats,omitempty"` HTMLURL *string `json:"html_url,omitempty"` URL *string `json:"url,omitempty"` Verification *SignatureVerification `json:"verification,omitempty"` @@ -129,7 +128,7 @@ type CreateCommitOptions struct { //meta:operation POST /repos/{owner}/{repo}/git/commits func (s *GitService) CreateCommit(ctx context.Context, owner string, repo string, commit *Commit, opts *CreateCommitOptions) (*Commit, *Response, error) { if commit == nil { - return nil, nil, fmt.Errorf("commit must be provided") + return nil, nil, errors.New("commit must be provided") } if opts == nil { opts = &CreateCommitOptions{} diff --git a/vendor/github.com/google/go-github/v66/github/git_refs.go b/vendor/github.com/google/go-github/v68/github/git_refs.go similarity index 98% rename from vendor/github.com/google/go-github/v66/github/git_refs.go rename to vendor/github.com/google/go-github/v68/github/git_refs.go index ad7b10d7..91eb6dd4 100644 --- a/vendor/github.com/google/go-github/v66/github/git_refs.go +++ b/vendor/github.com/google/go-github/v68/github/git_refs.go @@ -127,7 +127,7 @@ func (s *GitService) CreateRef(ctx context.Context, owner string, repo string, r u := fmt.Sprintf("repos/%v/%v/git/refs", owner, repo) req, err := s.client.NewRequest("POST", u, &createRefRequest{ // back-compat with previous behavior that didn't require 'refs/' prefix - Ref: String("refs/" + strings.TrimPrefix(*ref.Ref, "refs/")), + Ref: Ptr("refs/" + strings.TrimPrefix(*ref.Ref, "refs/")), SHA: ref.Object.SHA, }) if err != nil { diff --git a/vendor/github.com/google/go-github/v66/github/git_tags.go b/vendor/github.com/google/go-github/v68/github/git_tags.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/git_tags.go rename to vendor/github.com/google/go-github/v68/github/git_tags.go diff --git a/vendor/github.com/google/go-github/v66/github/git_trees.go b/vendor/github.com/google/go-github/v68/github/git_trees.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/git_trees.go rename to vendor/github.com/google/go-github/v68/github/git_trees.go diff --git a/vendor/github.com/google/go-github/v66/github/github-accessors.go b/vendor/github.com/google/go-github/v68/github/github-accessors.go similarity index 94% rename from vendor/github.com/google/go-github/v66/github/github-accessors.go rename to vendor/github.com/google/go-github/v68/github/github-accessors.go index f8e303c4..0800c02c 100644 --- a/vendor/github.com/google/go-github/v66/github/github-accessors.go +++ b/vendor/github.com/google/go-github/v68/github/github-accessors.go @@ -1646,6 +1646,54 @@ func (b *BranchPolicy) GetProtectedBranches() bool { return *b.ProtectedBranches } +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (b *BranchProtectionConfigurationEvent) GetAction() string { + if b == nil || b.Action == nil { + return "" + } + return *b.Action +} + +// GetEnterprise returns the Enterprise field. +func (b *BranchProtectionConfigurationEvent) GetEnterprise() *Enterprise { + if b == nil { + return nil + } + return b.Enterprise +} + +// GetInstallation returns the Installation field. +func (b *BranchProtectionConfigurationEvent) GetInstallation() *Installation { + if b == nil { + return nil + } + return b.Installation +} + +// GetOrg returns the Org field. +func (b *BranchProtectionConfigurationEvent) GetOrg() *Organization { + if b == nil { + return nil + } + return b.Org +} + +// GetRepo returns the Repo field. +func (b *BranchProtectionConfigurationEvent) GetRepo() *Repository { + if b == nil { + return nil + } + return b.Repo +} + +// GetSender returns the Sender field. +func (b *BranchProtectionConfigurationEvent) GetSender() *User { + if b == nil { + return nil + } + return b.Sender +} + // GetAdminEnforced returns the AdminEnforced field if it's non-nil, zero value otherwise. func (b *BranchProtectionRule) GetAdminEnforced() bool { if b == nil || b.AdminEnforced == nil { @@ -2662,6 +2710,190 @@ func (c *CodeSearchResult) GetTotal() int { return *c.Total } +// GetAdvancedSecurity returns the AdvancedSecurity field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetAdvancedSecurity() string { + if c == nil || c.AdvancedSecurity == nil { + return "" + } + return *c.AdvancedSecurity +} + +// GetCodeScanningDefaultSetup returns the CodeScanningDefaultSetup field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetCodeScanningDefaultSetup() string { + if c == nil || c.CodeScanningDefaultSetup == nil { + return "" + } + return *c.CodeScanningDefaultSetup +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetCreatedAt() Timestamp { + if c == nil || c.CreatedAt == nil { + return Timestamp{} + } + return *c.CreatedAt +} + +// GetDependabotAlerts returns the DependabotAlerts field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetDependabotAlerts() string { + if c == nil || c.DependabotAlerts == nil { + return "" + } + return *c.DependabotAlerts +} + +// GetDependabotSecurityUpdates returns the DependabotSecurityUpdates field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetDependabotSecurityUpdates() string { + if c == nil || c.DependabotSecurityUpdates == nil { + return "" + } + return *c.DependabotSecurityUpdates +} + +// GetDependencyGraph returns the DependencyGraph field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetDependencyGraph() string { + if c == nil || c.DependencyGraph == nil { + return "" + } + return *c.DependencyGraph +} + +// GetDependencyGraphAutosubmitAction returns the DependencyGraphAutosubmitAction field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetDependencyGraphAutosubmitAction() string { + if c == nil || c.DependencyGraphAutosubmitAction == nil { + return "" + } + return *c.DependencyGraphAutosubmitAction +} + +// GetDependencyGraphAutosubmitActionOptions returns the DependencyGraphAutosubmitActionOptions field. +func (c *CodeSecurityConfiguration) GetDependencyGraphAutosubmitActionOptions() *DependencyGraphAutosubmitActionOptions { + if c == nil { + return nil + } + return c.DependencyGraphAutosubmitActionOptions +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetDescription() string { + if c == nil || c.Description == nil { + return "" + } + return *c.Description +} + +// GetEnforcement returns the Enforcement field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetEnforcement() string { + if c == nil || c.Enforcement == nil { + return "" + } + return *c.Enforcement +} + +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetHTMLURL() string { + if c == nil || c.HTMLURL == nil { + return "" + } + return *c.HTMLURL +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetID() int64 { + if c == nil || c.ID == nil { + return 0 + } + return *c.ID +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetName() string { + if c == nil || c.Name == nil { + return "" + } + return *c.Name +} + +// GetPrivateVulnerabilityReporting returns the PrivateVulnerabilityReporting field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetPrivateVulnerabilityReporting() string { + if c == nil || c.PrivateVulnerabilityReporting == nil { + return "" + } + return *c.PrivateVulnerabilityReporting +} + +// GetSecretScanning returns the SecretScanning field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetSecretScanning() string { + if c == nil || c.SecretScanning == nil { + return "" + } + return *c.SecretScanning +} + +// GetSecretScanningNonProviderPatterns returns the SecretScanningNonProviderPatterns field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetSecretScanningNonProviderPatterns() string { + if c == nil || c.SecretScanningNonProviderPatterns == nil { + return "" + } + return *c.SecretScanningNonProviderPatterns +} + +// GetSecretScanningPushProtection returns the SecretScanningPushProtection field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetSecretScanningPushProtection() string { + if c == nil || c.SecretScanningPushProtection == nil { + return "" + } + return *c.SecretScanningPushProtection +} + +// GetSecretScanningValidityChecks returns the SecretScanningValidityChecks field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetSecretScanningValidityChecks() string { + if c == nil || c.SecretScanningValidityChecks == nil { + return "" + } + return *c.SecretScanningValidityChecks +} + +// GetTargetType returns the TargetType field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetTargetType() string { + if c == nil || c.TargetType == nil { + return "" + } + return *c.TargetType +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetUpdatedAt() Timestamp { + if c == nil || c.UpdatedAt == nil { + return Timestamp{} + } + return *c.UpdatedAt +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfiguration) GetURL() string { + if c == nil || c.URL == nil { + return "" + } + return *c.URL +} + +// GetConfiguration returns the Configuration field. +func (c *CodeSecurityConfigurationWithDefaultForNewRepos) GetConfiguration() *CodeSecurityConfiguration { + if c == nil { + return nil + } + return c.Configuration +} + +// GetDefaultForNewRepos returns the DefaultForNewRepos field if it's non-nil, zero value otherwise. +func (c *CodeSecurityConfigurationWithDefaultForNewRepos) GetDefaultForNewRepos() string { + if c == nil || c.DefaultForNewRepos == nil { + return "" + } + return *c.DefaultForNewRepos +} + // GetBillableOwner returns the BillableOwner field. func (c *Codespace) GetBillableOwner() *User { if c == nil { @@ -3310,14 +3542,6 @@ func (c *Commit) GetSHA() string { return *c.SHA } -// GetStats returns the Stats field. -func (c *Commit) GetStats() *CommitStats { - if c == nil { - return nil - } - return c.Stats -} - // GetTree returns the Tree field. func (c *Commit) GetTree() *Tree { if c == nil { @@ -4062,6 +4286,102 @@ func (c *ContributorStats) GetTotal() int { return *c.Total } +// GetCustomModelTrainingDate returns the CustomModelTrainingDate field if it's non-nil, zero value otherwise. +func (c *CopilotDotcomChatModel) GetCustomModelTrainingDate() string { + if c == nil || c.CustomModelTrainingDate == nil { + return "" + } + return *c.CustomModelTrainingDate +} + +// GetCustomModelTrainingDate returns the CustomModelTrainingDate field if it's non-nil, zero value otherwise. +func (c *CopilotDotcomPullRequestsModel) GetCustomModelTrainingDate() string { + if c == nil || c.CustomModelTrainingDate == nil { + return "" + } + return *c.CustomModelTrainingDate +} + +// GetCustomModelTrainingDate returns the CustomModelTrainingDate field if it's non-nil, zero value otherwise. +func (c *CopilotIDEChatModel) GetCustomModelTrainingDate() string { + if c == nil || c.CustomModelTrainingDate == nil { + return "" + } + return *c.CustomModelTrainingDate +} + +// GetCustomModelTrainingDate returns the CustomModelTrainingDate field if it's non-nil, zero value otherwise. +func (c *CopilotIDECodeCompletionsModel) GetCustomModelTrainingDate() string { + if c == nil || c.CustomModelTrainingDate == nil { + return "" + } + return *c.CustomModelTrainingDate +} + +// GetCopilotDotcomChat returns the CopilotDotcomChat field. +func (c *CopilotMetrics) GetCopilotDotcomChat() *CopilotDotcomChat { + if c == nil { + return nil + } + return c.CopilotDotcomChat +} + +// GetCopilotDotcomPullRequests returns the CopilotDotcomPullRequests field. +func (c *CopilotMetrics) GetCopilotDotcomPullRequests() *CopilotDotcomPullRequests { + if c == nil { + return nil + } + return c.CopilotDotcomPullRequests +} + +// GetCopilotIDEChat returns the CopilotIDEChat field. +func (c *CopilotMetrics) GetCopilotIDEChat() *CopilotIDEChat { + if c == nil { + return nil + } + return c.CopilotIDEChat +} + +// GetCopilotIDECodeCompletions returns the CopilotIDECodeCompletions field. +func (c *CopilotMetrics) GetCopilotIDECodeCompletions() *CopilotIDECodeCompletions { + if c == nil { + return nil + } + return c.CopilotIDECodeCompletions +} + +// GetTotalActiveUsers returns the TotalActiveUsers field if it's non-nil, zero value otherwise. +func (c *CopilotMetrics) GetTotalActiveUsers() int { + if c == nil || c.TotalActiveUsers == nil { + return 0 + } + return *c.TotalActiveUsers +} + +// GetTotalEngagedUsers returns the TotalEngagedUsers field if it's non-nil, zero value otherwise. +func (c *CopilotMetrics) GetTotalEngagedUsers() int { + if c == nil || c.TotalEngagedUsers == nil { + return 0 + } + return *c.TotalEngagedUsers +} + +// GetSince returns the Since field if it's non-nil, zero value otherwise. +func (c *CopilotMetricsListOptions) GetSince() time.Time { + if c == nil || c.Since == nil { + return time.Time{} + } + return *c.Since +} + +// GetUntil returns the Until field if it's non-nil, zero value otherwise. +func (c *CopilotMetricsListOptions) GetUntil() time.Time { + if c == nil || c.Until == nil { + return time.Time{} + } + return *c.Until +} + // GetSeatBreakdown returns the SeatBreakdown field. func (c *CopilotOrganizationDetails) GetSeatBreakdown() *CopilotSeatBreakdown { if c == nil { @@ -4110,6 +4430,14 @@ func (c *CopilotSeatDetails) GetPendingCancellationDate() string { return *c.PendingCancellationDate } +// GetPlanType returns the PlanType field if it's non-nil, zero value otherwise. +func (c *CopilotSeatDetails) GetPlanType() string { + if c == nil || c.PlanType == nil { + return "" + } + return *c.PlanType +} + // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. func (c *CopilotSeatDetails) GetUpdatedAt() Timestamp { if c == nil || c.UpdatedAt == nil { @@ -4542,14 +4870,6 @@ func (c *CreateUpdateRequiredWorkflowOptions) GetWorkflowFilePath() string { return *c.WorkflowFilePath } -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (c *CreateUserProjectOptions) GetBody() string { - if c == nil || c.Body == nil { - return "" - } - return *c.Body -} - // GetEmail returns the Email field if it's non-nil, zero value otherwise. func (c *CreateUserRequest) GetEmail() string { if c == nil || c.Email == nil { @@ -4846,6 +5166,14 @@ func (c *CustomProperty) GetRequired() bool { return *c.Required } +// GetSourceType returns the SourceType field if it's non-nil, zero value otherwise. +func (c *CustomProperty) GetSourceType() string { + if c == nil || c.SourceType == nil { + return "" + } + return *c.SourceType +} + // GetValuesEditableBy returns the ValuesEditableBy field if it's non-nil, zero value otherwise. func (c *CustomProperty) GetValuesEditableBy() string { if c == nil || c.ValuesEditableBy == nil { @@ -4854,6 +5182,102 @@ func (c *CustomProperty) GetValuesEditableBy() string { return *c.ValuesEditableBy } +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (c *CustomPropertyEvent) GetAction() string { + if c == nil || c.Action == nil { + return "" + } + return *c.Action +} + +// GetDefinition returns the Definition field. +func (c *CustomPropertyEvent) GetDefinition() *CustomProperty { + if c == nil { + return nil + } + return c.Definition +} + +// GetEnterprise returns the Enterprise field. +func (c *CustomPropertyEvent) GetEnterprise() *Enterprise { + if c == nil { + return nil + } + return c.Enterprise +} + +// GetInstallation returns the Installation field. +func (c *CustomPropertyEvent) GetInstallation() *Installation { + if c == nil { + return nil + } + return c.Installation +} + +// GetOrg returns the Org field. +func (c *CustomPropertyEvent) GetOrg() *Organization { + if c == nil { + return nil + } + return c.Org +} + +// GetSender returns the Sender field. +func (c *CustomPropertyEvent) GetSender() *User { + if c == nil { + return nil + } + return c.Sender +} + +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (c *CustomPropertyValuesEvent) GetAction() string { + if c == nil || c.Action == nil { + return "" + } + return *c.Action +} + +// GetEnterprise returns the Enterprise field. +func (c *CustomPropertyValuesEvent) GetEnterprise() *Enterprise { + if c == nil { + return nil + } + return c.Enterprise +} + +// GetInstallation returns the Installation field. +func (c *CustomPropertyValuesEvent) GetInstallation() *Installation { + if c == nil { + return nil + } + return c.Installation +} + +// GetOrg returns the Org field. +func (c *CustomPropertyValuesEvent) GetOrg() *Organization { + if c == nil { + return nil + } + return c.Org +} + +// GetRepo returns the Repo field. +func (c *CustomPropertyValuesEvent) GetRepo() *Repository { + if c == nil { + return nil + } + return c.Repo +} + +// GetSender returns the Sender field. +func (c *CustomPropertyValuesEvent) GetSender() *User { + if c == nil { + return nil + } + return c.Sender +} + // GetBaseRole returns the BaseRole field if it's non-nil, zero value otherwise. func (c *CustomRepoRoles) GetBaseRole() string { if c == nil || c.BaseRole == nil { @@ -5358,6 +5782,14 @@ func (d *Dependency) GetScope() string { return *d.Scope } +// GetLabeledRunners returns the LabeledRunners field if it's non-nil, zero value otherwise. +func (d *DependencyGraphAutosubmitActionOptions) GetLabeledRunners() bool { + if d == nil || d.LabeledRunners == nil { + return false + } + return *d.LabeledRunners +} + // GetDetector returns the Detector field. func (d *DependencyGraphSnapshot) GetDetector() *DependencyGraphSnapshotDetector { if d == nil { @@ -9022,6 +9454,14 @@ func (i *InstallationPermissions) GetAdministration() string { return *i.Administration } +// GetAttestations returns the Attestations field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetAttestations() string { + if i == nil || i.Attestations == nil { + return "" + } + return *i.Attestations +} + // GetBlocking returns the Blocking field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetBlocking() string { if i == nil || i.Blocking == nil { @@ -9038,6 +9478,46 @@ func (i *InstallationPermissions) GetChecks() string { return *i.Checks } +// GetCodespaces returns the Codespaces field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetCodespaces() string { + if i == nil || i.Codespaces == nil { + return "" + } + return *i.Codespaces +} + +// GetCodespacesLifecycleAdmin returns the CodespacesLifecycleAdmin field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetCodespacesLifecycleAdmin() string { + if i == nil || i.CodespacesLifecycleAdmin == nil { + return "" + } + return *i.CodespacesLifecycleAdmin +} + +// GetCodespacesMetadata returns the CodespacesMetadata field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetCodespacesMetadata() string { + if i == nil || i.CodespacesMetadata == nil { + return "" + } + return *i.CodespacesMetadata +} + +// GetCodespacesSecrets returns the CodespacesSecrets field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetCodespacesSecrets() string { + if i == nil || i.CodespacesSecrets == nil { + return "" + } + return *i.CodespacesSecrets +} + +// GetCodespacesUserSecrets returns the CodespacesUserSecrets field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetCodespacesUserSecrets() string { + if i == nil || i.CodespacesUserSecrets == nil { + return "" + } + return *i.CodespacesUserSecrets +} + // GetContentReferences returns the ContentReferences field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetContentReferences() string { if i == nil || i.ContentReferences == nil { @@ -9054,6 +9534,22 @@ func (i *InstallationPermissions) GetContents() string { return *i.Contents } +// GetCopilotMessages returns the CopilotMessages field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetCopilotMessages() string { + if i == nil || i.CopilotMessages == nil { + return "" + } + return *i.CopilotMessages +} + +// GetDependabotSecrets returns the DependabotSecrets field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetDependabotSecrets() string { + if i == nil || i.DependabotSecrets == nil { + return "" + } + return *i.DependabotSecrets +} + // GetDeployments returns the Deployments field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetDeployments() string { if i == nil || i.Deployments == nil { @@ -9062,6 +9558,14 @@ func (i *InstallationPermissions) GetDeployments() string { return *i.Deployments } +// GetDiscussions returns the Discussions field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetDiscussions() string { + if i == nil || i.Discussions == nil { + return "" + } + return *i.Discussions +} + // GetEmails returns the Emails field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetEmails() string { if i == nil || i.Emails == nil { @@ -9086,6 +9590,38 @@ func (i *InstallationPermissions) GetFollowers() string { return *i.Followers } +// GetGists returns the Gists field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetGists() string { + if i == nil || i.Gists == nil { + return "" + } + return *i.Gists +} + +// GetGitSigningSSHPublicKeys returns the GitSigningSSHPublicKeys field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetGitSigningSSHPublicKeys() string { + if i == nil || i.GitSigningSSHPublicKeys == nil { + return "" + } + return *i.GitSigningSSHPublicKeys +} + +// GetGPGKeys returns the GPGKeys field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetGPGKeys() string { + if i == nil || i.GPGKeys == nil { + return "" + } + return *i.GPGKeys +} + +// GetInteractionLimits returns the InteractionLimits field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetInteractionLimits() string { + if i == nil || i.InteractionLimits == nil { + return "" + } + return *i.InteractionLimits +} + // GetIssues returns the Issues field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetIssues() string { if i == nil || i.Issues == nil { @@ -9094,6 +9630,14 @@ func (i *InstallationPermissions) GetIssues() string { return *i.Issues } +// GetKeys returns the Keys field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetKeys() string { + if i == nil || i.Keys == nil { + return "" + } + return *i.Keys +} + // GetMembers returns the Members field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetMembers() string { if i == nil || i.Members == nil { @@ -9102,6 +9646,14 @@ func (i *InstallationPermissions) GetMembers() string { return *i.Members } +// GetMergeQueues returns the MergeQueues field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetMergeQueues() string { + if i == nil || i.MergeQueues == nil { + return "" + } + return *i.MergeQueues +} + // GetMetadata returns the Metadata field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetMetadata() string { if i == nil || i.Metadata == nil { @@ -9110,6 +9662,14 @@ func (i *InstallationPermissions) GetMetadata() string { return *i.Metadata } +// GetOrganizationActionsVariables returns the OrganizationActionsVariables field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetOrganizationActionsVariables() string { + if i == nil || i.OrganizationActionsVariables == nil { + return "" + } + return *i.OrganizationActionsVariables +} + // GetOrganizationAdministration returns the OrganizationAdministration field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetOrganizationAdministration() string { if i == nil || i.OrganizationAdministration == nil { @@ -9118,6 +9678,54 @@ func (i *InstallationPermissions) GetOrganizationAdministration() string { return *i.OrganizationAdministration } +// GetOrganizationAnnouncementBanners returns the OrganizationAnnouncementBanners field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetOrganizationAnnouncementBanners() string { + if i == nil || i.OrganizationAnnouncementBanners == nil { + return "" + } + return *i.OrganizationAnnouncementBanners +} + +// GetOrganizationAPIInsights returns the OrganizationAPIInsights field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetOrganizationAPIInsights() string { + if i == nil || i.OrganizationAPIInsights == nil { + return "" + } + return *i.OrganizationAPIInsights +} + +// GetOrganizationCodespaces returns the OrganizationCodespaces field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetOrganizationCodespaces() string { + if i == nil || i.OrganizationCodespaces == nil { + return "" + } + return *i.OrganizationCodespaces +} + +// GetOrganizationCodespacesSecrets returns the OrganizationCodespacesSecrets field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetOrganizationCodespacesSecrets() string { + if i == nil || i.OrganizationCodespacesSecrets == nil { + return "" + } + return *i.OrganizationCodespacesSecrets +} + +// GetOrganizationCodespacesSettings returns the OrganizationCodespacesSettings field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetOrganizationCodespacesSettings() string { + if i == nil || i.OrganizationCodespacesSettings == nil { + return "" + } + return *i.OrganizationCodespacesSettings +} + +// GetOrganizationCopilotSeatManagement returns the OrganizationCopilotSeatManagement field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetOrganizationCopilotSeatManagement() string { + if i == nil || i.OrganizationCopilotSeatManagement == nil { + return "" + } + return *i.OrganizationCopilotSeatManagement +} + // GetOrganizationCustomOrgRoles returns the OrganizationCustomOrgRoles field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetOrganizationCustomOrgRoles() string { if i == nil || i.OrganizationCustomOrgRoles == nil { @@ -9142,6 +9750,22 @@ func (i *InstallationPermissions) GetOrganizationCustomRoles() string { return *i.OrganizationCustomRoles } +// GetOrganizationDependabotSecrets returns the OrganizationDependabotSecrets field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetOrganizationDependabotSecrets() string { + if i == nil || i.OrganizationDependabotSecrets == nil { + return "" + } + return *i.OrganizationDependabotSecrets +} + +// GetOrganizationEvents returns the OrganizationEvents field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetOrganizationEvents() string { + if i == nil || i.OrganizationEvents == nil { + return "" + } + return *i.OrganizationEvents +} + // GetOrganizationHooks returns the OrganizationHooks field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetOrganizationHooks() string { if i == nil || i.OrganizationHooks == nil { @@ -9150,6 +9774,14 @@ func (i *InstallationPermissions) GetOrganizationHooks() string { return *i.OrganizationHooks } +// GetOrganizationKnowledgeBases returns the OrganizationKnowledgeBases field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetOrganizationKnowledgeBases() string { + if i == nil || i.OrganizationKnowledgeBases == nil { + return "" + } + return *i.OrganizationKnowledgeBases +} + // GetOrganizationPackages returns the OrganizationPackages field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetOrganizationPackages() string { if i == nil || i.OrganizationPackages == nil { @@ -9238,6 +9870,22 @@ func (i *InstallationPermissions) GetPages() string { return *i.Pages } +// GetPlan returns the Plan field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetPlan() string { + if i == nil || i.Plan == nil { + return "" + } + return *i.Plan +} + +// GetProfile returns the Profile field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetProfile() string { + if i == nil || i.Profile == nil { + return "" + } + return *i.Profile +} + // GetPullRequests returns the PullRequests field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetPullRequests() string { if i == nil || i.PullRequests == nil { @@ -9246,6 +9894,22 @@ func (i *InstallationPermissions) GetPullRequests() string { return *i.PullRequests } +// GetRepositoryAdvisories returns the RepositoryAdvisories field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetRepositoryAdvisories() string { + if i == nil || i.RepositoryAdvisories == nil { + return "" + } + return *i.RepositoryAdvisories +} + +// GetRepositoryCustomProperties returns the RepositoryCustomProperties field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetRepositoryCustomProperties() string { + if i == nil || i.RepositoryCustomProperties == nil { + return "" + } + return *i.RepositoryCustomProperties +} + // GetRepositoryHooks returns the RepositoryHooks field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetRepositoryHooks() string { if i == nil || i.RepositoryHooks == nil { @@ -9302,6 +9966,14 @@ func (i *InstallationPermissions) GetSingleFile() string { return *i.SingleFile } +// GetStarring returns the Starring field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetStarring() string { + if i == nil || i.Starring == nil { + return "" + } + return *i.Starring +} + // GetStatuses returns the Statuses field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetStatuses() string { if i == nil || i.Statuses == nil { @@ -9318,6 +9990,14 @@ func (i *InstallationPermissions) GetTeamDiscussions() string { return *i.TeamDiscussions } +// GetUserEvents returns the UserEvents field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetUserEvents() string { + if i == nil || i.UserEvents == nil { + return "" + } + return *i.UserEvents +} + // GetVulnerabilityAlerts returns the VulnerabilityAlerts field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetVulnerabilityAlerts() string { if i == nil || i.VulnerabilityAlerts == nil { @@ -9326,6 +10006,14 @@ func (i *InstallationPermissions) GetVulnerabilityAlerts() string { return *i.VulnerabilityAlerts } +// GetWatching returns the Watching field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetWatching() string { + if i == nil || i.Watching == nil { + return "" + } + return *i.Watching +} + // GetWorkflows returns the Workflows field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetWorkflows() string { if i == nil || i.Workflows == nil { @@ -10126,14 +10814,6 @@ func (i *IssueEvent) GetPerformedViaGithubApp() *App { return i.PerformedViaGithubApp } -// GetProjectCard returns the ProjectCard field. -func (i *IssueEvent) GetProjectCard() *ProjectCard { - if i == nil { - return nil - } - return i.ProjectCard -} - // GetRename returns the Rename field. func (i *IssueEvent) GetRename() *Rename { if i == nil { @@ -11022,6 +11702,14 @@ func (l *ListAlertsOptions) GetState() string { return *l.State } +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (l *ListArtifactsOptions) GetName() string { + if l == nil || l.Name == nil { + return "" + } + return *l.Name +} + // GetAppID returns the AppID field if it's non-nil, zero value otherwise. func (l *ListCheckRunsOptions) GetAppID() int64 { if l == nil || l.AppID == nil { @@ -11094,14 +11782,6 @@ func (l *ListCodespaces) GetTotalCount() int { return *l.TotalCount } -// GetAffiliation returns the Affiliation field if it's non-nil, zero value otherwise. -func (l *ListCollaboratorOptions) GetAffiliation() string { - if l == nil || l.Affiliation == nil { - return "" - } - return *l.Affiliation -} - // GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. func (l *ListCustomDeploymentRuleIntegrationsResponse) GetTotalCount() int { if l == nil || l.TotalCount == nil { @@ -15038,126 +15718,6 @@ func (p *PRLinks) GetStatuses() *PRLink { return p.Statuses } -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (p *Project) GetBody() string { - if p == nil || p.Body == nil { - return "" - } - return *p.Body -} - -// GetColumnsURL returns the ColumnsURL field if it's non-nil, zero value otherwise. -func (p *Project) GetColumnsURL() string { - if p == nil || p.ColumnsURL == nil { - return "" - } - return *p.ColumnsURL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *Project) GetCreatedAt() Timestamp { - if p == nil || p.CreatedAt == nil { - return Timestamp{} - } - return *p.CreatedAt -} - -// GetCreator returns the Creator field. -func (p *Project) GetCreator() *User { - if p == nil { - return nil - } - return p.Creator -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (p *Project) GetHTMLURL() string { - if p == nil || p.HTMLURL == nil { - return "" - } - return *p.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *Project) GetID() int64 { - if p == nil || p.ID == nil { - return 0 - } - return *p.ID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (p *Project) GetName() string { - if p == nil || p.Name == nil { - return "" - } - return *p.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *Project) GetNodeID() string { - if p == nil || p.NodeID == nil { - return "" - } - return *p.NodeID -} - -// GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (p *Project) GetNumber() int { - if p == nil || p.Number == nil { - return 0 - } - return *p.Number -} - -// GetOrganizationPermission returns the OrganizationPermission field if it's non-nil, zero value otherwise. -func (p *Project) GetOrganizationPermission() string { - if p == nil || p.OrganizationPermission == nil { - return "" - } - return *p.OrganizationPermission -} - -// GetOwnerURL returns the OwnerURL field if it's non-nil, zero value otherwise. -func (p *Project) GetOwnerURL() string { - if p == nil || p.OwnerURL == nil { - return "" - } - return *p.OwnerURL -} - -// GetPrivate returns the Private field if it's non-nil, zero value otherwise. -func (p *Project) GetPrivate() bool { - if p == nil || p.Private == nil { - return false - } - return *p.Private -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (p *Project) GetState() string { - if p == nil || p.State == nil { - return "" - } - return *p.State -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *Project) GetUpdatedAt() Timestamp { - if p == nil || p.UpdatedAt == nil { - return Timestamp{} - } - return *p.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *Project) GetURL() string { - if p == nil || p.URL == nil { - return "" - } - return *p.URL -} - // GetFrom returns the From field if it's non-nil, zero value otherwise. func (p *ProjectBody) GetFrom() string { if p == nil || p.From == nil { @@ -15166,126 +15726,6 @@ func (p *ProjectBody) GetFrom() string { return *p.From } -// GetArchived returns the Archived field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetArchived() bool { - if p == nil || p.Archived == nil { - return false - } - return *p.Archived -} - -// GetColumnID returns the ColumnID field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetColumnID() int64 { - if p == nil || p.ColumnID == nil { - return 0 - } - return *p.ColumnID -} - -// GetColumnName returns the ColumnName field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetColumnName() string { - if p == nil || p.ColumnName == nil { - return "" - } - return *p.ColumnName -} - -// GetColumnURL returns the ColumnURL field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetColumnURL() string { - if p == nil || p.ColumnURL == nil { - return "" - } - return *p.ColumnURL -} - -// GetContentURL returns the ContentURL field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetContentURL() string { - if p == nil || p.ContentURL == nil { - return "" - } - return *p.ContentURL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetCreatedAt() Timestamp { - if p == nil || p.CreatedAt == nil { - return Timestamp{} - } - return *p.CreatedAt -} - -// GetCreator returns the Creator field. -func (p *ProjectCard) GetCreator() *User { - if p == nil { - return nil - } - return p.Creator -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetID() int64 { - if p == nil || p.ID == nil { - return 0 - } - return *p.ID -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetNodeID() string { - if p == nil || p.NodeID == nil { - return "" - } - return *p.NodeID -} - -// GetNote returns the Note field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetNote() string { - if p == nil || p.Note == nil { - return "" - } - return *p.Note -} - -// GetPreviousColumnName returns the PreviousColumnName field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetPreviousColumnName() string { - if p == nil || p.PreviousColumnName == nil { - return "" - } - return *p.PreviousColumnName -} - -// GetProjectID returns the ProjectID field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetProjectID() int64 { - if p == nil || p.ProjectID == nil { - return 0 - } - return *p.ProjectID -} - -// GetProjectURL returns the ProjectURL field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetProjectURL() string { - if p == nil || p.ProjectURL == nil { - return "" - } - return *p.ProjectURL -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetUpdatedAt() Timestamp { - if p == nil || p.UpdatedAt == nil { - return Timestamp{} - } - return *p.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetURL() string { - if p == nil || p.URL == nil { - return "" - } - return *p.URL -} - // GetNote returns the Note field. func (p *ProjectCardChange) GetNote() *ProjectCardNote { if p == nil { @@ -15294,78 +15734,6 @@ func (p *ProjectCardChange) GetNote() *ProjectCardNote { return p.Note } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *ProjectCardEvent) GetAction() string { - if p == nil || p.Action == nil { - return "" - } - return *p.Action -} - -// GetAfterID returns the AfterID field if it's non-nil, zero value otherwise. -func (p *ProjectCardEvent) GetAfterID() int64 { - if p == nil || p.AfterID == nil { - return 0 - } - return *p.AfterID -} - -// GetChanges returns the Changes field. -func (p *ProjectCardEvent) GetChanges() *ProjectCardChange { - if p == nil { - return nil - } - return p.Changes -} - -// GetInstallation returns the Installation field. -func (p *ProjectCardEvent) GetInstallation() *Installation { - if p == nil { - return nil - } - return p.Installation -} - -// GetOrg returns the Org field. -func (p *ProjectCardEvent) GetOrg() *Organization { - if p == nil { - return nil - } - return p.Org -} - -// GetProjectCard returns the ProjectCard field. -func (p *ProjectCardEvent) GetProjectCard() *ProjectCard { - if p == nil { - return nil - } - return p.ProjectCard -} - -// GetRepo returns the Repo field. -func (p *ProjectCardEvent) GetRepo() *Repository { - if p == nil { - return nil - } - return p.Repo -} - -// GetSender returns the Sender field. -func (p *ProjectCardEvent) GetSender() *User { - if p == nil { - return nil - } - return p.Sender -} - -// GetArchivedState returns the ArchivedState field if it's non-nil, zero value otherwise. -func (p *ProjectCardListOptions) GetArchivedState() string { - if p == nil || p.ArchivedState == nil { - return "" - } - return *p.ArchivedState -} - // GetFrom returns the From field if it's non-nil, zero value otherwise. func (p *ProjectCardNote) GetFrom() string { if p == nil || p.From == nil { @@ -15374,14 +15742,6 @@ func (p *ProjectCardNote) GetFrom() string { return *p.From } -// GetArchived returns the Archived field if it's non-nil, zero value otherwise. -func (p *ProjectCardOptions) GetArchived() bool { - if p == nil || p.Archived == nil { - return false - } - return *p.Archived -} - // GetBody returns the Body field. func (p *ProjectChange) GetBody() *ProjectBody { if p == nil { @@ -15398,78 +15758,6 @@ func (p *ProjectChange) GetName() *ProjectName { return p.Name } -// GetPermission returns the Permission field if it's non-nil, zero value otherwise. -func (p *ProjectCollaboratorOptions) GetPermission() string { - if p == nil || p.Permission == nil { - return "" - } - return *p.Permission -} - -// GetCardsURL returns the CardsURL field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetCardsURL() string { - if p == nil || p.CardsURL == nil { - return "" - } - return *p.CardsURL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetCreatedAt() Timestamp { - if p == nil || p.CreatedAt == nil { - return Timestamp{} - } - return *p.CreatedAt -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetID() int64 { - if p == nil || p.ID == nil { - return 0 - } - return *p.ID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetName() string { - if p == nil || p.Name == nil { - return "" - } - return *p.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetNodeID() string { - if p == nil || p.NodeID == nil { - return "" - } - return *p.NodeID -} - -// GetProjectURL returns the ProjectURL field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetProjectURL() string { - if p == nil || p.ProjectURL == nil { - return "" - } - return *p.ProjectURL -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetUpdatedAt() Timestamp { - if p == nil || p.UpdatedAt == nil { - return Timestamp{} - } - return *p.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetURL() string { - if p == nil || p.URL == nil { - return "" - } - return *p.URL -} - // GetName returns the Name field. func (p *ProjectColumnChange) GetName() *ProjectColumnName { if p == nil { @@ -15478,70 +15766,6 @@ func (p *ProjectColumnChange) GetName() *ProjectColumnName { return p.Name } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *ProjectColumnEvent) GetAction() string { - if p == nil || p.Action == nil { - return "" - } - return *p.Action -} - -// GetAfterID returns the AfterID field if it's non-nil, zero value otherwise. -func (p *ProjectColumnEvent) GetAfterID() int64 { - if p == nil || p.AfterID == nil { - return 0 - } - return *p.AfterID -} - -// GetChanges returns the Changes field. -func (p *ProjectColumnEvent) GetChanges() *ProjectColumnChange { - if p == nil { - return nil - } - return p.Changes -} - -// GetInstallation returns the Installation field. -func (p *ProjectColumnEvent) GetInstallation() *Installation { - if p == nil { - return nil - } - return p.Installation -} - -// GetOrg returns the Org field. -func (p *ProjectColumnEvent) GetOrg() *Organization { - if p == nil { - return nil - } - return p.Org -} - -// GetProjectColumn returns the ProjectColumn field. -func (p *ProjectColumnEvent) GetProjectColumn() *ProjectColumn { - if p == nil { - return nil - } - return p.ProjectColumn -} - -// GetRepo returns the Repo field. -func (p *ProjectColumnEvent) GetRepo() *Repository { - if p == nil { - return nil - } - return p.Repo -} - -// GetSender returns the Sender field. -func (p *ProjectColumnEvent) GetSender() *User { - if p == nil { - return nil - } - return p.Sender -} - // GetFrom returns the From field if it's non-nil, zero value otherwise. func (p *ProjectColumnName) GetFrom() string { if p == nil || p.From == nil { @@ -15550,62 +15774,6 @@ func (p *ProjectColumnName) GetFrom() string { return *p.From } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *ProjectEvent) GetAction() string { - if p == nil || p.Action == nil { - return "" - } - return *p.Action -} - -// GetChanges returns the Changes field. -func (p *ProjectEvent) GetChanges() *ProjectChange { - if p == nil { - return nil - } - return p.Changes -} - -// GetInstallation returns the Installation field. -func (p *ProjectEvent) GetInstallation() *Installation { - if p == nil { - return nil - } - return p.Installation -} - -// GetOrg returns the Org field. -func (p *ProjectEvent) GetOrg() *Organization { - if p == nil { - return nil - } - return p.Org -} - -// GetProject returns the Project field. -func (p *ProjectEvent) GetProject() *Project { - if p == nil { - return nil - } - return p.Project -} - -// GetRepo returns the Repo field. -func (p *ProjectEvent) GetRepo() *Repository { - if p == nil { - return nil - } - return p.Repo -} - -// GetSender returns the Sender field. -func (p *ProjectEvent) GetSender() *User { - if p == nil { - return nil - } - return p.Sender -} - // GetFrom returns the From field if it's non-nil, zero value otherwise. func (p *ProjectName) GetFrom() string { if p == nil || p.From == nil { @@ -15615,71 +15783,31 @@ func (p *ProjectName) GetFrom() string { } // GetBody returns the Body field if it's non-nil, zero value otherwise. -func (p *ProjectOptions) GetBody() string { +func (p *ProjectV2) GetBody() string { if p == nil || p.Body == nil { return "" } return *p.Body } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (p *ProjectOptions) GetName() string { - if p == nil || p.Name == nil { - return "" - } - return *p.Name -} - -// GetOrganizationPermission returns the OrganizationPermission field if it's non-nil, zero value otherwise. -func (p *ProjectOptions) GetOrganizationPermission() string { - if p == nil || p.OrganizationPermission == nil { - return "" - } - return *p.OrganizationPermission -} - -// GetPrivate returns the Private field if it's non-nil, zero value otherwise. -func (p *ProjectOptions) GetPrivate() bool { - if p == nil || p.Private == nil { - return false - } - return *p.Private -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (p *ProjectOptions) GetState() string { - if p == nil || p.State == nil { - return "" - } - return *p.State -} - -// GetPermission returns the Permission field if it's non-nil, zero value otherwise. -func (p *ProjectPermissionLevel) GetPermission() string { - if p == nil || p.Permission == nil { - return "" - } - return *p.Permission -} - -// GetUser returns the User field. -func (p *ProjectPermissionLevel) GetUser() *User { - if p == nil { - return nil - } - return p.User -} - // GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetClosedAt() Timestamp { +func (p *ProjectV2) GetClosedAt() Timestamp { if p == nil || p.ClosedAt == nil { return Timestamp{} } return *p.ClosedAt } +// GetColumnsURL returns the ColumnsURL field if it's non-nil, zero value otherwise. +func (p *ProjectV2) GetColumnsURL() string { + if p == nil || p.ColumnsURL == nil { + return "" + } + return *p.ColumnsURL +} + // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetCreatedAt() Timestamp { +func (p *ProjectV2) GetCreatedAt() Timestamp { if p == nil || p.CreatedAt == nil { return Timestamp{} } @@ -15687,7 +15815,7 @@ func (p *ProjectsV2) GetCreatedAt() Timestamp { } // GetCreator returns the Creator field. -func (p *ProjectsV2) GetCreator() *User { +func (p *ProjectV2) GetCreator() *User { if p == nil { return nil } @@ -15695,7 +15823,7 @@ func (p *ProjectsV2) GetCreator() *User { } // GetDeletedAt returns the DeletedAt field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetDeletedAt() Timestamp { +func (p *ProjectV2) GetDeletedAt() Timestamp { if p == nil || p.DeletedAt == nil { return Timestamp{} } @@ -15703,7 +15831,7 @@ func (p *ProjectsV2) GetDeletedAt() Timestamp { } // GetDeletedBy returns the DeletedBy field. -func (p *ProjectsV2) GetDeletedBy() *User { +func (p *ProjectV2) GetDeletedBy() *User { if p == nil { return nil } @@ -15711,23 +15839,39 @@ func (p *ProjectsV2) GetDeletedBy() *User { } // GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetDescription() string { +func (p *ProjectV2) GetDescription() string { if p == nil || p.Description == nil { return "" } return *p.Description } +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (p *ProjectV2) GetHTMLURL() string { + if p == nil || p.HTMLURL == nil { + return "" + } + return *p.HTMLURL +} + // GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetID() int64 { +func (p *ProjectV2) GetID() int64 { if p == nil || p.ID == nil { return 0 } return *p.ID } +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (p *ProjectV2) GetName() string { + if p == nil || p.Name == nil { + return "" + } + return *p.Name +} + // GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetNodeID() string { +func (p *ProjectV2) GetNodeID() string { if p == nil || p.NodeID == nil { return "" } @@ -15735,23 +15879,47 @@ func (p *ProjectsV2) GetNodeID() string { } // GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetNumber() int { +func (p *ProjectV2) GetNumber() int { if p == nil || p.Number == nil { return 0 } return *p.Number } +// GetOrganizationPermission returns the OrganizationPermission field if it's non-nil, zero value otherwise. +func (p *ProjectV2) GetOrganizationPermission() string { + if p == nil || p.OrganizationPermission == nil { + return "" + } + return *p.OrganizationPermission +} + // GetOwner returns the Owner field. -func (p *ProjectsV2) GetOwner() *User { +func (p *ProjectV2) GetOwner() *User { if p == nil { return nil } return p.Owner } +// GetOwnerURL returns the OwnerURL field if it's non-nil, zero value otherwise. +func (p *ProjectV2) GetOwnerURL() string { + if p == nil || p.OwnerURL == nil { + return "" + } + return *p.OwnerURL +} + +// GetPrivate returns the Private field if it's non-nil, zero value otherwise. +func (p *ProjectV2) GetPrivate() bool { + if p == nil || p.Private == nil { + return false + } + return *p.Private +} + // GetPublic returns the Public field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetPublic() bool { +func (p *ProjectV2) GetPublic() bool { if p == nil || p.Public == nil { return false } @@ -15759,15 +15927,23 @@ func (p *ProjectsV2) GetPublic() bool { } // GetShortDescription returns the ShortDescription field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetShortDescription() string { +func (p *ProjectV2) GetShortDescription() string { if p == nil || p.ShortDescription == nil { return "" } return *p.ShortDescription } +// GetState returns the State field if it's non-nil, zero value otherwise. +func (p *ProjectV2) GetState() string { + if p == nil || p.State == nil { + return "" + } + return *p.State +} + // GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetTitle() string { +func (p *ProjectV2) GetTitle() string { if p == nil || p.Title == nil { return "" } @@ -15775,13 +15951,21 @@ func (p *ProjectsV2) GetTitle() string { } // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetUpdatedAt() Timestamp { +func (p *ProjectV2) GetUpdatedAt() Timestamp { if p == nil || p.UpdatedAt == nil { return Timestamp{} } return *p.UpdatedAt } +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (p *ProjectV2) GetURL() string { + if p == nil || p.URL == nil { + return "" + } + return *p.URL +} + // GetAction returns the Action field if it's non-nil, zero value otherwise. func (p *ProjectV2Event) GetAction() string { if p == nil || p.Action == nil { @@ -15807,7 +15991,7 @@ func (p *ProjectV2Event) GetOrg() *Organization { } // GetProjectsV2 returns the ProjectsV2 field. -func (p *ProjectV2Event) GetProjectsV2() *ProjectsV2 { +func (p *ProjectV2Event) GetProjectsV2() *ProjectV2 { if p == nil { return nil } @@ -19790,6 +19974,22 @@ func (r *RepositoryActiveCommitters) GetName() string { return *r.Name } +// GetConfiguration returns the Configuration field. +func (r *RepositoryCodeSecurityConfiguration) GetConfiguration() *CodeSecurityConfiguration { + if r == nil { + return nil + } + return r.Configuration +} + +// GetState returns the State field if it's non-nil, zero value otherwise. +func (r *RepositoryCodeSecurityConfiguration) GetState() string { + if r == nil || r.State == nil { + return "" + } + return *r.State +} + // GetBody returns the Body field if it's non-nil, zero value otherwise. func (r *RepositoryComment) GetBody() string { if r == nil || r.Body == nil { @@ -20238,6 +20438,14 @@ func (r *RepositoryInvitation) GetCreatedAt() Timestamp { return *r.CreatedAt } +// GetExpired returns the Expired field if it's non-nil, zero value otherwise. +func (r *RepositoryInvitation) GetExpired() bool { + if r == nil || r.Expired == nil { + return false + } + return *r.Expired +} + // GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. func (r *RepositoryInvitation) GetHTMLURL() string { if r == nil || r.HTMLURL == nil { @@ -20606,6 +20814,542 @@ func (r *RepositoryRule) GetParameters() json.RawMessage { return *r.Parameters } +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (r *RepositoryRuleset) GetCreatedAt() Timestamp { + if r == nil || r.CreatedAt == nil { + return Timestamp{} + } + return *r.CreatedAt +} + +// GetCurrentUserCanBypass returns the CurrentUserCanBypass field if it's non-nil, zero value otherwise. +func (r *RepositoryRuleset) GetCurrentUserCanBypass() string { + if r == nil || r.CurrentUserCanBypass == nil { + return "" + } + return *r.CurrentUserCanBypass +} + +// GetLinks returns the Links field. +func (r *RepositoryRuleset) GetLinks() *RepositoryRulesetLink { + if r == nil { + return nil + } + return r.Links +} + +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (r *RepositoryRuleset) GetNodeID() string { + if r == nil || r.NodeID == nil { + return "" + } + return *r.NodeID +} + +// GetSourceType returns the SourceType field if it's non-nil, zero value otherwise. +func (r *RepositoryRuleset) GetSourceType() string { + if r == nil || r.SourceType == nil { + return "" + } + return *r.SourceType +} + +// GetTarget returns the Target field if it's non-nil, zero value otherwise. +func (r *RepositoryRuleset) GetTarget() string { + if r == nil || r.Target == nil { + return "" + } + return *r.Target +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (r *RepositoryRuleset) GetUpdatedAt() Timestamp { + if r == nil || r.UpdatedAt == nil { + return Timestamp{} + } + return *r.UpdatedAt +} + +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetCodeScanningRule) GetParameters() *RuleCodeScanningParameters { + if r == nil { + return nil + } + return r.Parameters +} + +// GetConditions returns the Conditions field. +func (r *RepositoryRulesetEditedChanges) GetConditions() *RepositoryRulesetEditedConditions { + if r == nil { + return nil + } + return r.Conditions +} + +// GetEnforcement returns the Enforcement field. +func (r *RepositoryRulesetEditedChanges) GetEnforcement() *RepositoryRulesetEditedSource { + if r == nil { + return nil + } + return r.Enforcement +} + +// GetName returns the Name field. +func (r *RepositoryRulesetEditedChanges) GetName() *RepositoryRulesetEditedSource { + if r == nil { + return nil + } + return r.Name +} + +// GetRules returns the Rules field. +func (r *RepositoryRulesetEditedChanges) GetRules() *RepositoryRulesetEditedRules { + if r == nil { + return nil + } + return r.Rules +} + +// GetConfiguration returns the Configuration field. +func (r *RepositoryRulesetEditedRuleChanges) GetConfiguration() *RepositoryRulesetEditedSources { + if r == nil { + return nil + } + return r.Configuration +} + +// GetPattern returns the Pattern field. +func (r *RepositoryRulesetEditedRuleChanges) GetPattern() *RepositoryRulesetEditedSources { + if r == nil { + return nil + } + return r.Pattern +} + +// GetRuleType returns the RuleType field. +func (r *RepositoryRulesetEditedRuleChanges) GetRuleType() *RepositoryRulesetEditedSources { + if r == nil { + return nil + } + return r.RuleType +} + +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (r *RepositoryRulesetEditedSource) GetFrom() string { + if r == nil || r.From == nil { + return "" + } + return *r.From +} + +// GetChanges returns the Changes field. +func (r *RepositoryRulesetEditedUpdatedConditions) GetChanges() *RepositoryRulesetUpdatedConditionsEdited { + if r == nil { + return nil + } + return r.Changes +} + +// GetCondition returns the Condition field. +func (r *RepositoryRulesetEditedUpdatedConditions) GetCondition() *RepositoryRulesetRefCondition { + if r == nil { + return nil + } + return r.Condition +} + +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (r *RepositoryRulesetEvent) GetAction() string { + if r == nil || r.Action == nil { + return "" + } + return *r.Action +} + +// GetChanges returns the Changes field. +func (r *RepositoryRulesetEvent) GetChanges() *RepositoryRulesetEditedChanges { + if r == nil { + return nil + } + return r.Changes +} + +// GetEnterprise returns the Enterprise field. +func (r *RepositoryRulesetEvent) GetEnterprise() *Enterprise { + if r == nil { + return nil + } + return r.Enterprise +} + +// GetInstallation returns the Installation field. +func (r *RepositoryRulesetEvent) GetInstallation() *Installation { + if r == nil { + return nil + } + return r.Installation +} + +// GetOrganization returns the Organization field. +func (r *RepositoryRulesetEvent) GetOrganization() *Organization { + if r == nil { + return nil + } + return r.Organization +} + +// GetRepository returns the Repository field. +func (r *RepositoryRulesetEvent) GetRepository() *Repository { + if r == nil { + return nil + } + return r.Repository +} + +// GetRepositoryRuleset returns the RepositoryRuleset field. +func (r *RepositoryRulesetEvent) GetRepositoryRuleset() *RepositoryRuleset { + if r == nil { + return nil + } + return r.RepositoryRuleset +} + +// GetSender returns the Sender field. +func (r *RepositoryRulesetEvent) GetSender() *User { + if r == nil { + return nil + } + return r.Sender +} + +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetFileExtensionRestrictionRule) GetParameters() *RuleFileExtensionRestrictionParameters { + if r == nil { + return nil + } + return r.Parameters +} + +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetFilePathRestrictionRule) GetParameters() *RuleFileParameters { + if r == nil { + return nil + } + return r.Parameters +} + +// GetHTML returns the HTML field. +func (r *RepositoryRulesetLink) GetHTML() *RulesetLink { + if r == nil { + return nil + } + return r.HTML +} + +// GetSelf returns the Self field. +func (r *RepositoryRulesetLink) GetSelf() *RulesetLink { + if r == nil { + return nil + } + return r.Self +} + +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetMaxFilePathLengthRule) GetParameters() *RuleMaxFilePathLengthParameters { + if r == nil { + return nil + } + return r.Parameters +} + +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetMaxFileSizeRule) GetParameters() *RuleMaxFileSizeParameters { + if r == nil { + return nil + } + return r.Parameters +} + +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetMergeQueueRule) GetParameters() *MergeQueueRuleParameters { + if r == nil { + return nil + } + return r.Parameters +} + +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetPatternRule) GetParameters() *RulePatternParameters { + if r == nil { + return nil + } + return r.Parameters +} + +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetPullRequestRule) GetParameters() *PullRequestRuleParameters { + if r == nil { + return nil + } + return r.Parameters +} + +// GetRefName returns the RefName field. +func (r *RepositoryRulesetRefCondition) GetRefName() *RulesetRefConditionParameters { + if r == nil { + return nil + } + return r.RefName +} + +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetRequiredDeploymentsRule) GetParameters() *RequiredDeploymentEnvironmentsRuleParameters { + if r == nil { + return nil + } + return r.Parameters +} + +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetRequiredStatusChecksRule) GetParameters() *RequiredStatusChecksRuleParameters { + if r == nil { + return nil + } + return r.Parameters +} + +// GetBranchNamePattern returns the BranchNamePattern field. +func (r *RepositoryRulesetRule) GetBranchNamePattern() *RepositoryRulesetPatternRule { + if r == nil { + return nil + } + return r.BranchNamePattern +} + +// GetCodeScanning returns the CodeScanning field. +func (r *RepositoryRulesetRule) GetCodeScanning() *RepositoryRulesetCodeScanningRule { + if r == nil { + return nil + } + return r.CodeScanning +} + +// GetCommitAuthorEmailPattern returns the CommitAuthorEmailPattern field. +func (r *RepositoryRulesetRule) GetCommitAuthorEmailPattern() *RepositoryRulesetPatternRule { + if r == nil { + return nil + } + return r.CommitAuthorEmailPattern +} + +// GetCommitMessagePattern returns the CommitMessagePattern field. +func (r *RepositoryRulesetRule) GetCommitMessagePattern() *RepositoryRulesetPatternRule { + if r == nil { + return nil + } + return r.CommitMessagePattern +} + +// GetCommitterEmailPattern returns the CommitterEmailPattern field. +func (r *RepositoryRulesetRule) GetCommitterEmailPattern() *RepositoryRulesetPatternRule { + if r == nil { + return nil + } + return r.CommitterEmailPattern +} + +// GetCreation returns the Creation field. +func (r *RepositoryRulesetRule) GetCreation() *RepositoryRulesetRuleType { + if r == nil { + return nil + } + return r.Creation +} + +// GetDeletion returns the Deletion field. +func (r *RepositoryRulesetRule) GetDeletion() *RepositoryRulesetRuleType { + if r == nil { + return nil + } + return r.Deletion +} + +// GetFileExtensionRestriction returns the FileExtensionRestriction field. +func (r *RepositoryRulesetRule) GetFileExtensionRestriction() *RepositoryRulesetFileExtensionRestrictionRule { + if r == nil { + return nil + } + return r.FileExtensionRestriction +} + +// GetFilePathRestriction returns the FilePathRestriction field. +func (r *RepositoryRulesetRule) GetFilePathRestriction() *RepositoryRulesetFilePathRestrictionRule { + if r == nil { + return nil + } + return r.FilePathRestriction +} + +// GetMaxFilePathLength returns the MaxFilePathLength field. +func (r *RepositoryRulesetRule) GetMaxFilePathLength() *RepositoryRulesetMaxFilePathLengthRule { + if r == nil { + return nil + } + return r.MaxFilePathLength +} + +// GetMaxFileSize returns the MaxFileSize field. +func (r *RepositoryRulesetRule) GetMaxFileSize() *RepositoryRulesetMaxFileSizeRule { + if r == nil { + return nil + } + return r.MaxFileSize +} + +// GetMergeQueue returns the MergeQueue field. +func (r *RepositoryRulesetRule) GetMergeQueue() *RepositoryRulesetMergeQueueRule { + if r == nil { + return nil + } + return r.MergeQueue +} + +// GetNonFastForward returns the NonFastForward field. +func (r *RepositoryRulesetRule) GetNonFastForward() *RepositoryRulesetRuleType { + if r == nil { + return nil + } + return r.NonFastForward +} + +// GetPullRequest returns the PullRequest field. +func (r *RepositoryRulesetRule) GetPullRequest() *RepositoryRulesetPullRequestRule { + if r == nil { + return nil + } + return r.PullRequest +} + +// GetRequiredDeployments returns the RequiredDeployments field. +func (r *RepositoryRulesetRule) GetRequiredDeployments() *RepositoryRulesetRequiredDeploymentsRule { + if r == nil { + return nil + } + return r.RequiredDeployments +} + +// GetRequiredLinearHistory returns the RequiredLinearHistory field. +func (r *RepositoryRulesetRule) GetRequiredLinearHistory() *RepositoryRulesetRuleType { + if r == nil { + return nil + } + return r.RequiredLinearHistory +} + +// GetRequiredSignatures returns the RequiredSignatures field. +func (r *RepositoryRulesetRule) GetRequiredSignatures() *RepositoryRulesetRuleType { + if r == nil { + return nil + } + return r.RequiredSignatures +} + +// GetRequiredStatusChecks returns the RequiredStatusChecks field. +func (r *RepositoryRulesetRule) GetRequiredStatusChecks() *RepositoryRulesetRequiredStatusChecksRule { + if r == nil { + return nil + } + return r.RequiredStatusChecks +} + +// GetTagNamePattern returns the TagNamePattern field. +func (r *RepositoryRulesetRule) GetTagNamePattern() *RepositoryRulesetPatternRule { + if r == nil { + return nil + } + return r.TagNamePattern +} + +// GetUpdate returns the Update field. +func (r *RepositoryRulesetRule) GetUpdate() *RepositoryRulesetUpdateRule { + if r == nil { + return nil + } + return r.Update +} + +// GetWorkflows returns the Workflows field. +func (r *RepositoryRulesetRule) GetWorkflows() *RepositoryRulesetWorkflowsRule { + if r == nil { + return nil + } + return r.Workflows +} + +// GetConditionType returns the ConditionType field. +func (r *RepositoryRulesetUpdatedConditionsEdited) GetConditionType() *RepositoryRulesetEditedSource { + if r == nil { + return nil + } + return r.ConditionType +} + +// GetExclude returns the Exclude field. +func (r *RepositoryRulesetUpdatedConditionsEdited) GetExclude() *RepositoryRulesetEditedSources { + if r == nil { + return nil + } + return r.Exclude +} + +// GetInclude returns the Include field. +func (r *RepositoryRulesetUpdatedConditionsEdited) GetInclude() *RepositoryRulesetEditedSources { + if r == nil { + return nil + } + return r.Include +} + +// GetTarget returns the Target field. +func (r *RepositoryRulesetUpdatedConditionsEdited) GetTarget() *RepositoryRulesetEditedSource { + if r == nil { + return nil + } + return r.Target +} + +// GetChanges returns the Changes field. +func (r *RepositoryRulesetUpdatedRules) GetChanges() *RepositoryRulesetEditedRuleChanges { + if r == nil { + return nil + } + return r.Changes +} + +// GetRule returns the Rule field. +func (r *RepositoryRulesetUpdatedRules) GetRule() *RepositoryRulesetRule { + if r == nil { + return nil + } + return r.Rule +} + +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetUpdateRule) GetParameters() *UpdateAllowsFetchAndMergeRuleParameters { + if r == nil { + return nil + } + return r.Parameters +} + +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetWorkflowsRule) GetParameters() *RequiredWorkflowsRuleParameters { + if r == nil { + return nil + } + return r.Parameters +} + // GetCommit returns the Commit field. func (r *RepositoryTag) GetCommit() *Commit { if r == nil { @@ -21006,6 +21750,14 @@ func (r *RequiredStatusChecksRequest) GetStrict() bool { return *r.Strict } +// GetDoNotEnforceOnCreate returns the DoNotEnforceOnCreate field if it's non-nil, zero value otherwise. +func (r *RequiredStatusChecksRuleParameters) GetDoNotEnforceOnCreate() bool { + if r == nil || r.DoNotEnforceOnCreate == nil { + return false + } + return *r.DoNotEnforceOnCreate +} + // GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. func (r *RequiredWorkflowSelectedRepos) GetTotalCount() int { if r == nil || r.TotalCount == nil { @@ -21150,6 +21902,14 @@ func (r *Ruleset) GetConditions() *RulesetConditions { return r.Conditions } +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (r *Ruleset) 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 *Ruleset) GetID() int64 { if r == nil || r.ID == nil { @@ -21190,6 +21950,14 @@ func (r *Ruleset) GetTarget() string { return *r.Target } +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (r *Ruleset) GetUpdatedAt() Timestamp { + if r == nil || r.UpdatedAt == nil { + return Timestamp{} + } + return *r.UpdatedAt +} + // GetRefName returns the RefName field. func (r *RulesetConditions) GetRefName() *RulesetRefConditionParameters { if r == nil { @@ -21246,6 +22014,14 @@ func (r *RulesetRepositoryNamesConditionParameters) GetProtected() bool { return *r.Protected } +// GetSource returns the Source field if it's non-nil, zero value otherwise. +func (r *RulesetRepositoryPropertyTargetParameters) GetSource() string { + if r == nil || r.Source == nil { + return "" + } + return *r.Source +} + // GetBusy returns the Busy field if it's non-nil, zero value otherwise. func (r *Runner) GetBusy() bool { if r == nil || r.Busy == nil { @@ -22094,6 +22870,14 @@ func (s *SecretScanningAlertLocationDetails) GetPath() string { return *s.Path } +// GetPullRequestCommentURL returns the PullRequestCommentURL field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlertLocationDetails) GetPullRequestCommentURL() string { + if s == nil || s.PullRequestCommentURL == nil { + return "" + } + return *s.PullRequestCommentURL +} + // GetStartColumn returns the StartColumn field if it's non-nil, zero value otherwise. func (s *SecretScanningAlertLocationDetails) GetStartColumn() int { if s == nil || s.StartColumn == nil { @@ -22110,6 +22894,62 @@ func (s *SecretScanningAlertLocationDetails) GetStartline() int { return *s.Startline } +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlertLocationEvent) GetAction() string { + if s == nil || s.Action == nil { + return "" + } + return *s.Action +} + +// GetAlert returns the Alert field. +func (s *SecretScanningAlertLocationEvent) GetAlert() *SecretScanningAlert { + if s == nil { + return nil + } + return s.Alert +} + +// GetInstallation returns the Installation field. +func (s *SecretScanningAlertLocationEvent) GetInstallation() *Installation { + if s == nil { + return nil + } + return s.Installation +} + +// GetLocation returns the Location field. +func (s *SecretScanningAlertLocationEvent) GetLocation() *SecretScanningAlertLocation { + if s == nil { + return nil + } + return s.Location +} + +// GetOrganization returns the Organization field. +func (s *SecretScanningAlertLocationEvent) GetOrganization() *Organization { + if s == nil { + return nil + } + return s.Organization +} + +// GetRepo returns the Repo field. +func (s *SecretScanningAlertLocationEvent) GetRepo() *Repository { + if s == nil { + return nil + } + return s.Repo +} + +// GetSender returns the Sender field. +func (s *SecretScanningAlertLocationEvent) GetSender() *User { + if s == nil { + return nil + } + return s.Sender +} + // GetResolution returns the Resolution field if it's non-nil, zero value otherwise. func (s *SecretScanningAlertUpdateOptions) GetResolution() string { if s == nil || s.Resolution == nil { @@ -22118,6 +22958,14 @@ func (s *SecretScanningAlertUpdateOptions) GetResolution() string { return *s.Resolution } +// GetResolutionComment returns the ResolutionComment field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlertUpdateOptions) GetResolutionComment() string { + if s == nil || s.ResolutionComment == nil { + return "" + } + return *s.ResolutionComment +} + // GetStatus returns the Status field if it's non-nil, zero value otherwise. func (s *SecretScanningPushProtection) GetStatus() string { if s == nil || s.Status == nil { @@ -23094,6 +23942,14 @@ func (t *TaskStep) GetStatus() string { return *t.Status } +// GetAssignment returns the Assignment field if it's non-nil, zero value otherwise. +func (t *Team) GetAssignment() string { + if t == nil || t.Assignment == nil { + return "" + } + return *t.Assignment +} + // GetDescription returns the Description field if it's non-nil, zero value otherwise. func (t *Team) GetDescription() string { if t == nil || t.Description == nil { @@ -23846,14 +24702,6 @@ func (t *Timeline) GetPerformedViaGithubApp() *App { return t.PerformedViaGithubApp } -// GetProjectCard returns the ProjectCard field. -func (t *Timeline) GetProjectCard() *ProjectCard { - if t == nil { - return nil - } - return t.ProjectCard -} - // GetRename returns the Rename field. func (t *Timeline) GetRename() *Rename { if t == nil { @@ -24390,6 +25238,14 @@ func (u *UpdateRunnerGroupRequest) GetVisibility() string { return *u.Visibility } +// GetAssignment returns the Assignment field if it's non-nil, zero value otherwise. +func (u *User) GetAssignment() string { + if u == nil || u.Assignment == nil { + return "" + } + return *u.Assignment +} + // GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise. func (u *User) GetAvatarURL() string { if u == nil || u.AvatarURL == nil { @@ -24534,6 +25390,14 @@ func (u *User) GetID() int64 { return *u.ID } +// GetInheritedFrom returns the InheritedFrom field. +func (u *User) GetInheritedFrom() *Team { + if u == nil { + return nil + } + return u.InheritedFrom +} + // GetLdapDn returns the LdapDn field if it's non-nil, zero value otherwise. func (u *User) GetLdapDn() string { if u == nil || u.LdapDn == nil { @@ -25574,6 +26438,14 @@ func (w *WorkflowJobEvent) GetAction() string { return *w.Action } +// GetDeployment returns the Deployment field. +func (w *WorkflowJobEvent) GetDeployment() *Deployment { + if w == nil { + return nil + } + return w.Deployment +} + // GetInstallation returns the Installation field. func (w *WorkflowJobEvent) GetInstallation() *Installation { if w == nil { diff --git a/vendor/github.com/google/go-github/v66/github/github.go b/vendor/github.com/google/go-github/v68/github/github.go similarity index 98% rename from vendor/github.com/google/go-github/v66/github/github.go rename to vendor/github.com/google/go-github/v68/github/github.go index 22fbb974..4e5a33c6 100644 --- a/vendor/github.com/google/go-github/v66/github/github.go +++ b/vendor/github.com/google/go-github/v68/github/github.go @@ -28,21 +28,21 @@ import ( ) const ( - Version = "v66.0.0" + Version = "v68.0.0" defaultAPIVersion = "2022-11-28" defaultBaseURL = "https://api.github.com/" defaultUserAgent = "go-github" + "/" + Version uploadBaseURL = "https://uploads.github.com/" - headerAPIVersion = "X-GitHub-Api-Version" - headerRateLimit = "X-RateLimit-Limit" - headerRateRemaining = "X-RateLimit-Remaining" - headerRateReset = "X-RateLimit-Reset" - headerOTP = "X-GitHub-OTP" + headerAPIVersion = "X-Github-Api-Version" + headerRateLimit = "X-Ratelimit-Limit" + headerRateRemaining = "X-Ratelimit-Remaining" + headerRateReset = "X-Ratelimit-Reset" + headerOTP = "X-Github-Otp" headerRetryAfter = "Retry-After" - headerTokenExpiration = "GitHub-Authentication-Token-Expiration" + headerTokenExpiration = "Github-Authentication-Token-Expiration" mediaTypeV3 = "application/vnd.github.v3+json" defaultMediaType = "application/octet-stream" @@ -203,7 +203,6 @@ type Client struct { Meta *MetaService Migrations *MigrationService Organizations *OrganizationsService - Projects *ProjectsService PullRequests *PullRequestsService RateLimit *RateLimitService Reactions *ReactionsService @@ -432,7 +431,6 @@ func (c *Client) initialize() { c.Meta = (*MetaService)(&c.common) c.Migrations = (*MigrationService)(&c.common) c.Organizations = (*OrganizationsService)(&c.common) - c.Projects = (*ProjectsService)(&c.common) c.PullRequests = (*PullRequestsService)(&c.common) c.RateLimit = (*RateLimitService)(&c.common) c.Reactions = (*ReactionsService)(&c.common) @@ -841,12 +839,17 @@ func (c *Client) BareDo(ctx context.Context, req *http.Request) (*Response, erro } resp, err := c.client.Do(req) + var response *Response + if resp != nil { + response = newResponse(resp) + } + if err != nil { // If we got an error, and the context has been canceled, // the context's error is probably more useful. select { case <-ctx.Done(): - return nil, ctx.Err() + return response, ctx.Err() default: } @@ -854,15 +857,13 @@ func (c *Client) BareDo(ctx context.Context, req *http.Request) (*Response, erro if e, ok := err.(*url.Error); ok { if url, err := url.Parse(e.URL); err == nil { e.URL = sanitizeURL(url).String() - return nil, e + return response, e } } - return nil, err + return response, err } - response := newResponse(resp) - // Don't update the rate limits if this was a cached response. // X-From-Cache is set by https://github.com/gregjones/httpcache if response.Header.Get("X-From-Cache") == "" { @@ -1579,23 +1580,37 @@ func (c *Client) roundTripWithOptionalFollowRedirect(ctx context.Context, u stri return resp, err } +// Ptr is a helper routine that allocates a new T value +// to store v and returns a pointer to it. +func Ptr[T any](v T) *T { + return &v +} + // Bool is a helper routine that allocates a new bool value // to store v and returns a pointer to it. +// +// Deprecated: use Ptr instead. func Bool(v bool) *bool { return &v } // Int is a helper routine that allocates a new int value // to store v and returns a pointer to it. +// +// Deprecated: use Ptr instead. func Int(v int) *int { return &v } // Int64 is a helper routine that allocates a new int64 value // to store v and returns a pointer to it. +// +// Deprecated: use Ptr instead. func Int64(v int64) *int64 { return &v } // String is a helper routine that allocates a new string value // to store v and returns a pointer to it. +// +// Deprecated: use Ptr instead. func String(v string) *string { return &v } -// roundTripperFunc creates a RoundTripper (transport) +// roundTripperFunc creates a RoundTripper (transport). type roundTripperFunc func(*http.Request) (*http.Response, error) func (fn roundTripperFunc) RoundTrip(r *http.Request) (*http.Response, error) { diff --git a/vendor/github.com/google/go-github/v66/github/gitignore.go b/vendor/github.com/google/go-github/v68/github/gitignore.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/gitignore.go rename to vendor/github.com/google/go-github/v68/github/gitignore.go diff --git a/vendor/github.com/google/go-github/v66/github/interactions.go b/vendor/github.com/google/go-github/v68/github/interactions.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/interactions.go rename to vendor/github.com/google/go-github/v68/github/interactions.go diff --git a/vendor/github.com/google/go-github/v66/github/interactions_orgs.go b/vendor/github.com/google/go-github/v68/github/interactions_orgs.go similarity index 97% rename from vendor/github.com/google/go-github/v66/github/interactions_orgs.go rename to vendor/github.com/google/go-github/v68/github/interactions_orgs.go index f0ba0b15..47998c4e 100644 --- a/vendor/github.com/google/go-github/v66/github/interactions_orgs.go +++ b/vendor/github.com/google/go-github/v68/github/interactions_orgs.go @@ -47,7 +47,7 @@ func (s *InteractionsService) GetRestrictionsForOrg(ctx context.Context, organiz func (s *InteractionsService) UpdateRestrictionsForOrg(ctx context.Context, organization, limit string) (*InteractionRestriction, *Response, error) { u := fmt.Sprintf("orgs/%v/interaction-limits", organization) - interaction := &InteractionRestriction{Limit: String(limit)} + interaction := &InteractionRestriction{Limit: Ptr(limit)} req, err := s.client.NewRequest("PUT", u, interaction) if err != nil { diff --git a/vendor/github.com/google/go-github/v66/github/interactions_repos.go b/vendor/github.com/google/go-github/v68/github/interactions_repos.go similarity index 97% rename from vendor/github.com/google/go-github/v66/github/interactions_repos.go rename to vendor/github.com/google/go-github/v68/github/interactions_repos.go index 9c044bad..58fd4f04 100644 --- a/vendor/github.com/google/go-github/v66/github/interactions_repos.go +++ b/vendor/github.com/google/go-github/v68/github/interactions_repos.go @@ -47,7 +47,7 @@ func (s *InteractionsService) GetRestrictionsForRepo(ctx context.Context, owner, func (s *InteractionsService) UpdateRestrictionsForRepo(ctx context.Context, owner, repo, limit string) (*InteractionRestriction, *Response, error) { u := fmt.Sprintf("repos/%v/%v/interaction-limits", owner, repo) - interaction := &InteractionRestriction{Limit: String(limit)} + interaction := &InteractionRestriction{Limit: Ptr(limit)} req, err := s.client.NewRequest("PUT", u, interaction) if err != nil { diff --git a/vendor/github.com/google/go-github/v66/github/issue_import.go b/vendor/github.com/google/go-github/v68/github/issue_import.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/issue_import.go rename to vendor/github.com/google/go-github/v68/github/issue_import.go diff --git a/vendor/github.com/google/go-github/v66/github/issues.go b/vendor/github.com/google/go-github/v68/github/issues.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/issues.go rename to vendor/github.com/google/go-github/v68/github/issues.go diff --git a/vendor/github.com/google/go-github/v66/github/issues_assignees.go b/vendor/github.com/google/go-github/v68/github/issues_assignees.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/issues_assignees.go rename to vendor/github.com/google/go-github/v68/github/issues_assignees.go diff --git a/vendor/github.com/google/go-github/v66/github/issues_comments.go b/vendor/github.com/google/go-github/v68/github/issues_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/issues_comments.go rename to vendor/github.com/google/go-github/v68/github/issues_comments.go diff --git a/vendor/github.com/google/go-github/v66/github/issues_events.go b/vendor/github.com/google/go-github/v68/github/issues_events.go similarity index 98% rename from vendor/github.com/google/go-github/v66/github/issues_events.go rename to vendor/github.com/google/go-github/v68/github/issues_events.go index bba3b180..8e234d7e 100644 --- a/vendor/github.com/google/go-github/v66/github/issues_events.go +++ b/vendor/github.com/google/go-github/v68/github/issues_events.go @@ -85,7 +85,6 @@ type IssueEvent struct { Label *Label `json:"label,omitempty"` Rename *Rename `json:"rename,omitempty"` LockReason *string `json:"lock_reason,omitempty"` - ProjectCard *ProjectCard `json:"project_card,omitempty"` DismissedReview *DismissedReview `json:"dismissed_review,omitempty"` RequestedReviewer *User `json:"requested_reviewer,omitempty"` RequestedTeam *Team `json:"requested_team,omitempty"` diff --git a/vendor/github.com/google/go-github/v66/github/issues_labels.go b/vendor/github.com/google/go-github/v68/github/issues_labels.go similarity index 99% rename from vendor/github.com/google/go-github/v66/github/issues_labels.go rename to vendor/github.com/google/go-github/v68/github/issues_labels.go index 51e7fe6a..b97b00f3 100644 --- a/vendor/github.com/google/go-github/v66/github/issues_labels.go +++ b/vendor/github.com/google/go-github/v68/github/issues_labels.go @@ -10,7 +10,7 @@ import ( "fmt" ) -// Label represents a GitHub label on an Issue +// Label represents a GitHub label on an Issue. type Label struct { ID *int64 `json:"id,omitempty"` URL *string `json:"url,omitempty"` diff --git a/vendor/github.com/google/go-github/v66/github/issues_milestones.go b/vendor/github.com/google/go-github/v68/github/issues_milestones.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/issues_milestones.go rename to vendor/github.com/google/go-github/v68/github/issues_milestones.go diff --git a/vendor/github.com/google/go-github/v66/github/issues_timeline.go b/vendor/github.com/google/go-github/v68/github/issues_timeline.go similarity index 94% rename from vendor/github.com/google/go-github/v66/github/issues_timeline.go rename to vendor/github.com/google/go-github/v68/github/issues_timeline.go index 0aa589af..903f5b89 100644 --- a/vendor/github.com/google/go-github/v66/github/issues_timeline.go +++ b/vendor/github.com/google/go-github/v68/github/issues_timeline.go @@ -97,6 +97,14 @@ type Timeline struct { // reviewed // The pull request was reviewed. // + // review_requested + // The actor requested a review from a user or team. + // Reviewer and Requester/RequestedTeam will be populated. + // + // review_request_removed + // The actor removed a review request from a user or team. + // Reviewer and Requester/RequestedTeam will be populated. + // // subscribed // The actor subscribed to receive notifications for an issue. // @@ -134,8 +142,7 @@ type Timeline struct { Source *Source `json:"source,omitempty"` // An object containing rename details including 'from' and 'to' attributes. // Only provided for 'renamed' events. - Rename *Rename `json:"rename,omitempty"` - ProjectCard *ProjectCard `json:"project_card,omitempty"` + Rename *Rename `json:"rename,omitempty"` // The state of a submitted review. Can be one of: 'commented', // 'changes_requested' or 'approved'. // Only provided for 'reviewed' events. diff --git a/vendor/github.com/google/go-github/v66/github/licenses.go b/vendor/github.com/google/go-github/v68/github/licenses.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/licenses.go rename to vendor/github.com/google/go-github/v68/github/licenses.go diff --git a/vendor/github.com/google/go-github/v66/github/markdown.go b/vendor/github.com/google/go-github/v68/github/markdown.go similarity index 93% rename from vendor/github.com/google/go-github/v66/github/markdown.go rename to vendor/github.com/google/go-github/v68/github/markdown.go index fe3b3112..0fd896c6 100644 --- a/vendor/github.com/google/go-github/v66/github/markdown.go +++ b/vendor/github.com/google/go-github/v68/github/markdown.go @@ -44,13 +44,13 @@ type markdownRenderRequest struct { // //meta:operation POST /markdown func (s *MarkdownService) Render(ctx context.Context, text string, opts *MarkdownOptions) (string, *Response, error) { - request := &markdownRenderRequest{Text: String(text)} + request := &markdownRenderRequest{Text: Ptr(text)} if opts != nil { if opts.Mode != "" { - request.Mode = String(opts.Mode) + request.Mode = Ptr(opts.Mode) } if opts.Context != "" { - request.Context = String(opts.Context) + request.Context = Ptr(opts.Context) } } diff --git a/vendor/github.com/google/go-github/v66/github/messages.go b/vendor/github.com/google/go-github/v68/github/messages.go similarity index 69% rename from vendor/github.com/google/go-github/v66/github/messages.go rename to vendor/github.com/google/go-github/v68/github/messages.go index 30c4fca9..59b214b3 100644 --- a/vendor/github.com/google/go-github/v66/github/messages.go +++ b/vendor/github.com/google/go-github/v68/github/messages.go @@ -46,77 +46,79 @@ const ( var ( // eventTypeMapping maps webhooks types to their corresponding go-github struct types. eventTypeMapping = map[string]interface{}{ - "branch_protection_rule": &BranchProtectionRuleEvent{}, - "check_run": &CheckRunEvent{}, - "check_suite": &CheckSuiteEvent{}, - "code_scanning_alert": &CodeScanningAlertEvent{}, - "commit_comment": &CommitCommentEvent{}, - "content_reference": &ContentReferenceEvent{}, - "create": &CreateEvent{}, - "delete": &DeleteEvent{}, - "dependabot_alert": &DependabotAlertEvent{}, - "deploy_key": &DeployKeyEvent{}, - "deployment": &DeploymentEvent{}, - "deployment_review": &DeploymentReviewEvent{}, - "deployment_status": &DeploymentStatusEvent{}, - "deployment_protection_rule": &DeploymentProtectionRuleEvent{}, - "discussion": &DiscussionEvent{}, - "discussion_comment": &DiscussionCommentEvent{}, - "fork": &ForkEvent{}, - "github_app_authorization": &GitHubAppAuthorizationEvent{}, - "gollum": &GollumEvent{}, - "installation": &InstallationEvent{}, - "installation_repositories": &InstallationRepositoriesEvent{}, - "installation_target": &InstallationTargetEvent{}, - "issue_comment": &IssueCommentEvent{}, - "issues": &IssuesEvent{}, - "label": &LabelEvent{}, - "marketplace_purchase": &MarketplacePurchaseEvent{}, - "member": &MemberEvent{}, - "membership": &MembershipEvent{}, - "merge_group": &MergeGroupEvent{}, - "meta": &MetaEvent{}, - "milestone": &MilestoneEvent{}, - "organization": &OrganizationEvent{}, - "org_block": &OrgBlockEvent{}, - "package": &PackageEvent{}, - "page_build": &PageBuildEvent{}, - "personal_access_token_request": &PersonalAccessTokenRequestEvent{}, - "ping": &PingEvent{}, - "project": &ProjectEvent{}, - "project_card": &ProjectCardEvent{}, - "project_column": &ProjectColumnEvent{}, - "projects_v2": &ProjectV2Event{}, - "projects_v2_item": &ProjectV2ItemEvent{}, - "public": &PublicEvent{}, - "pull_request": &PullRequestEvent{}, - "pull_request_review": &PullRequestReviewEvent{}, - "pull_request_review_comment": &PullRequestReviewCommentEvent{}, - "pull_request_review_thread": &PullRequestReviewThreadEvent{}, - "pull_request_target": &PullRequestTargetEvent{}, - "push": &PushEvent{}, - "repository": &RepositoryEvent{}, - "repository_dispatch": &RepositoryDispatchEvent{}, - "repository_import": &RepositoryImportEvent{}, - "repository_vulnerability_alert": &RepositoryVulnerabilityAlertEvent{}, - "release": &ReleaseEvent{}, - "secret_scanning_alert": &SecretScanningAlertEvent{}, - "security_advisory": &SecurityAdvisoryEvent{}, - "security_and_analysis": &SecurityAndAnalysisEvent{}, - "sponsorship": &SponsorshipEvent{}, - "star": &StarEvent{}, - "status": &StatusEvent{}, - "team": &TeamEvent{}, - "team_add": &TeamAddEvent{}, - "user": &UserEvent{}, - "watch": &WatchEvent{}, - "workflow_dispatch": &WorkflowDispatchEvent{}, - "workflow_job": &WorkflowJobEvent{}, - "workflow_run": &WorkflowRunEvent{}, + "branch_protection_configuration": &BranchProtectionConfigurationEvent{}, + "branch_protection_rule": &BranchProtectionRuleEvent{}, + "check_run": &CheckRunEvent{}, + "check_suite": &CheckSuiteEvent{}, + "code_scanning_alert": &CodeScanningAlertEvent{}, + "commit_comment": &CommitCommentEvent{}, + "content_reference": &ContentReferenceEvent{}, + "create": &CreateEvent{}, + "custom_property": &CustomPropertyEvent{}, + "custom_property_values": &CustomPropertyValuesEvent{}, + "delete": &DeleteEvent{}, + "dependabot_alert": &DependabotAlertEvent{}, + "deploy_key": &DeployKeyEvent{}, + "deployment": &DeploymentEvent{}, + "deployment_review": &DeploymentReviewEvent{}, + "deployment_status": &DeploymentStatusEvent{}, + "deployment_protection_rule": &DeploymentProtectionRuleEvent{}, + "discussion": &DiscussionEvent{}, + "discussion_comment": &DiscussionCommentEvent{}, + "fork": &ForkEvent{}, + "github_app_authorization": &GitHubAppAuthorizationEvent{}, + "gollum": &GollumEvent{}, + "installation": &InstallationEvent{}, + "installation_repositories": &InstallationRepositoriesEvent{}, + "installation_target": &InstallationTargetEvent{}, + "issue_comment": &IssueCommentEvent{}, + "issues": &IssuesEvent{}, + "label": &LabelEvent{}, + "marketplace_purchase": &MarketplacePurchaseEvent{}, + "member": &MemberEvent{}, + "membership": &MembershipEvent{}, + "merge_group": &MergeGroupEvent{}, + "meta": &MetaEvent{}, + "milestone": &MilestoneEvent{}, + "organization": &OrganizationEvent{}, + "org_block": &OrgBlockEvent{}, + "package": &PackageEvent{}, + "page_build": &PageBuildEvent{}, + "personal_access_token_request": &PersonalAccessTokenRequestEvent{}, + "ping": &PingEvent{}, + "projects_v2": &ProjectV2Event{}, + "projects_v2_item": &ProjectV2ItemEvent{}, + "public": &PublicEvent{}, + "pull_request": &PullRequestEvent{}, + "pull_request_review": &PullRequestReviewEvent{}, + "pull_request_review_comment": &PullRequestReviewCommentEvent{}, + "pull_request_review_thread": &PullRequestReviewThreadEvent{}, + "pull_request_target": &PullRequestTargetEvent{}, + "push": &PushEvent{}, + "repository": &RepositoryEvent{}, + "repository_dispatch": &RepositoryDispatchEvent{}, + "repository_import": &RepositoryImportEvent{}, + "repository_ruleset": &RepositoryRulesetEvent{}, + "repository_vulnerability_alert": &RepositoryVulnerabilityAlertEvent{}, + "release": &ReleaseEvent{}, + "secret_scanning_alert": &SecretScanningAlertEvent{}, + "secret_scanning_alert_location": &SecretScanningAlertLocationEvent{}, + "security_advisory": &SecurityAdvisoryEvent{}, + "security_and_analysis": &SecurityAndAnalysisEvent{}, + "sponsorship": &SponsorshipEvent{}, + "star": &StarEvent{}, + "status": &StatusEvent{}, + "team": &TeamEvent{}, + "team_add": &TeamAddEvent{}, + "user": &UserEvent{}, + "watch": &WatchEvent{}, + "workflow_dispatch": &WorkflowDispatchEvent{}, + "workflow_job": &WorkflowJobEvent{}, + "workflow_run": &WorkflowRunEvent{}, } - // forward mapping of event types to the string names of the structs + // Forward mapping of event types to the string names of the structs. messageToTypeName = make(map[string]string, len(eventTypeMapping)) - // Inverse map of the above + // Inverse map of the above. typeToMessageMapping = make(map[string]string, len(eventTypeMapping)) ) diff --git a/vendor/github.com/google/go-github/v66/github/meta.go b/vendor/github.com/google/go-github/v68/github/meta.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/meta.go rename to vendor/github.com/google/go-github/v68/github/meta.go diff --git a/vendor/github.com/google/go-github/v66/github/migrations.go b/vendor/github.com/google/go-github/v68/github/migrations.go similarity index 98% rename from vendor/github.com/google/go-github/v66/github/migrations.go rename to vendor/github.com/google/go-github/v68/github/migrations.go index 5af88170..766c4c38 100644 --- a/vendor/github.com/google/go-github/v66/github/migrations.go +++ b/vendor/github.com/google/go-github/v68/github/migrations.go @@ -82,8 +82,8 @@ func (s *MigrationService) StartMigration(ctx context.Context, org string, repos body := &startMigration{Repositories: repos} if opts != nil { - body.LockRepositories = Bool(opts.LockRepositories) - body.ExcludeAttachments = Bool(opts.ExcludeAttachments) + body.LockRepositories = Ptr(opts.LockRepositories) + body.ExcludeAttachments = Ptr(opts.ExcludeAttachments) } req, err := s.client.NewRequest("POST", u, body) diff --git a/vendor/github.com/google/go-github/v66/github/migrations_source_import.go b/vendor/github.com/google/go-github/v68/github/migrations_source_import.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/migrations_source_import.go rename to vendor/github.com/google/go-github/v68/github/migrations_source_import.go diff --git a/vendor/github.com/google/go-github/v66/github/migrations_user.go b/vendor/github.com/google/go-github/v68/github/migrations_user.go similarity index 98% rename from vendor/github.com/google/go-github/v66/github/migrations_user.go rename to vendor/github.com/google/go-github/v68/github/migrations_user.go index 1f907cd4..a7bd7949 100644 --- a/vendor/github.com/google/go-github/v66/github/migrations_user.go +++ b/vendor/github.com/google/go-github/v68/github/migrations_user.go @@ -75,8 +75,8 @@ func (s *MigrationService) StartUserMigration(ctx context.Context, repos []strin body := &startUserMigration{Repositories: repos} if opts != nil { - body.LockRepositories = Bool(opts.LockRepositories) - body.ExcludeAttachments = Bool(opts.ExcludeAttachments) + body.LockRepositories = Ptr(opts.LockRepositories) + body.ExcludeAttachments = Ptr(opts.ExcludeAttachments) } req, err := s.client.NewRequest("POST", u, body) diff --git a/vendor/github.com/google/go-github/v66/github/orgs.go b/vendor/github.com/google/go-github/v68/github/orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/orgs.go rename to vendor/github.com/google/go-github/v68/github/orgs.go diff --git a/vendor/github.com/google/go-github/v66/github/orgs_actions_allowed.go b/vendor/github.com/google/go-github/v68/github/orgs_actions_allowed.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/orgs_actions_allowed.go rename to vendor/github.com/google/go-github/v68/github/orgs_actions_allowed.go diff --git a/vendor/github.com/google/go-github/v66/github/orgs_actions_permissions.go b/vendor/github.com/google/go-github/v68/github/orgs_actions_permissions.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/orgs_actions_permissions.go rename to vendor/github.com/google/go-github/v68/github/orgs_actions_permissions.go diff --git a/vendor/github.com/google/go-github/v68/github/orgs_attestations.go b/vendor/github.com/google/go-github/v68/github/orgs_attestations.go new file mode 100644 index 00000000..3d5793c1 --- /dev/null +++ b/vendor/github.com/google/go-github/v68/github/orgs_attestations.go @@ -0,0 +1,40 @@ +// Copyright 2024 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" +) + +// ListAttestations returns a collection of artifact attestations +// with a given subject digest that are associated with repositories +// owned by an organization. +// +// GitHub API docs: https://docs.github.com/rest/orgs/orgs#list-attestations +// +//meta:operation GET /orgs/{org}/attestations/{subject_digest} +func (s *OrganizationsService) ListAttestations(ctx context.Context, org, subjectDigest string, opts *ListOptions) (*AttestationsResponse, *Response, error) { + var u = fmt.Sprintf("orgs/%v/attestations/%v", org, subjectDigest) + + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var attestations *AttestationsResponse + resp, err := s.client.Do(ctx, req, &attestations) + if err != nil { + return nil, resp, err + } + + return attestations, resp, nil +} diff --git a/vendor/github.com/google/go-github/v66/github/orgs_audit_log.go b/vendor/github.com/google/go-github/v68/github/orgs_audit_log.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/orgs_audit_log.go rename to vendor/github.com/google/go-github/v68/github/orgs_audit_log.go diff --git a/vendor/github.com/google/go-github/v68/github/orgs_codesecurity_configurations.go b/vendor/github.com/google/go-github/v68/github/orgs_codesecurity_configurations.go new file mode 100644 index 00000000..b25845a4 --- /dev/null +++ b/vendor/github.com/google/go-github/v68/github/orgs_codesecurity_configurations.go @@ -0,0 +1,284 @@ +// Copyright 2024 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" + "net/http" +) + +// DependencyGraphAutosubmitActionOptions represents the options for the DependencyGraphAutosubmitAction. +type DependencyGraphAutosubmitActionOptions struct { + LabeledRunners *bool `json:"labeled_runners,omitempty"` +} + +// CodeSecurityConfiguration represents a code security configuration. +type CodeSecurityConfiguration struct { + ID *int64 `json:"id,omitempty"` + TargetType *string `json:"target_type,omitempty"` + Name *string `json:"name"` + Description *string `json:"description,omitempty"` + AdvancedSecurity *string `json:"advanced_security,omitempty"` + DependencyGraph *string `json:"dependency_graph,omitempty"` + DependencyGraphAutosubmitAction *string `json:"dependency_graph_autosubmit_action,omitempty"` + DependencyGraphAutosubmitActionOptions *DependencyGraphAutosubmitActionOptions `json:"dependency_graph_autosubmit_action_options,omitempty"` + DependabotAlerts *string `json:"dependabot_alerts,omitempty"` + DependabotSecurityUpdates *string `json:"dependabot_security_updates,omitempty"` + CodeScanningDefaultSetup *string `json:"code_scanning_default_setup,omitempty"` + SecretScanning *string `json:"secret_scanning,omitempty"` + SecretScanningPushProtection *string `json:"secret_scanning_push_protection,omitempty"` + SecretScanningValidityChecks *string `json:"secret_scanning_validity_checks,omitempty"` + SecretScanningNonProviderPatterns *string `json:"secret_scanning_non_provider_patterns,omitempty"` + PrivateVulnerabilityReporting *string `json:"private_vulnerability_reporting,omitempty"` + Enforcement *string `json:"enforcement,omitempty"` + URL *string `json:"url,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` +} + +// CodeSecurityConfigurationWithDefaultForNewRepos represents a code security configuration with default for new repos param. +type CodeSecurityConfigurationWithDefaultForNewRepos struct { + Configuration *CodeSecurityConfiguration `json:"configuration"` + DefaultForNewRepos *string `json:"default_for_new_repos"` +} + +// RepositoryCodeSecurityConfiguration represents a code security configuration for a repository. +type RepositoryCodeSecurityConfiguration struct { + State *string `json:"state,omitempty"` + Configuration *CodeSecurityConfiguration `json:"configuration,omitempty"` +} + +// GetCodeSecurityConfigurations gets code security configurations for an organization. +// +// GitHub API docs: https://docs.github.com/rest/code-security/configurations#get-code-security-configurations-for-an-organization +// +//meta:operation GET /orgs/{org}/code-security/configurations +func (s *OrganizationsService) GetCodeSecurityConfigurations(ctx context.Context, org string) ([]*CodeSecurityConfiguration, *Response, error) { + u := fmt.Sprintf("orgs/%v/code-security/configurations", org) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var configurations []*CodeSecurityConfiguration + resp, err := s.client.Do(ctx, req, &configurations) + if err != nil { + return nil, resp, err + } + return configurations, resp, nil +} + +// CreateCodeSecurityConfiguration creates a code security configuration for an organization. +// +// GitHub API docs: https://docs.github.com/rest/code-security/configurations#create-a-code-security-configuration +// +//meta:operation POST /orgs/{org}/code-security/configurations +func (s *OrganizationsService) CreateCodeSecurityConfiguration(ctx context.Context, org string, c *CodeSecurityConfiguration) (*CodeSecurityConfiguration, *Response, error) { + u := fmt.Sprintf("orgs/%v/code-security/configurations", org) + + req, err := s.client.NewRequest("POST", u, c) + if err != nil { + return nil, nil, err + } + + var configuration *CodeSecurityConfiguration + resp, err := s.client.Do(ctx, req, &configuration) + if err != nil { + return nil, resp, err + } + return configuration, resp, nil +} + +// GetDefaultCodeSecurityConfigurations gets default code security configurations for an organization. +// +// GitHub API docs: https://docs.github.com/rest/code-security/configurations#get-default-code-security-configurations +// +//meta:operation GET /orgs/{org}/code-security/configurations/defaults +func (s *OrganizationsService) GetDefaultCodeSecurityConfigurations(ctx context.Context, org string) ([]*CodeSecurityConfiguration, *Response, error) { + u := fmt.Sprintf("orgs/%v/code-security/configurations/defaults", org) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var configurations []*CodeSecurityConfiguration + resp, err := s.client.Do(ctx, req, &configurations) + if err != nil { + return nil, resp, err + } + return configurations, resp, nil +} + +// DetachCodeSecurityConfigurationsFromRepositories detaches code security configuration from an organization's repositories. +// +// GitHub API docs: https://docs.github.com/rest/code-security/configurations#detach-configurations-from-repositories +// +//meta:operation DELETE /orgs/{org}/code-security/configurations/detach +func (s *OrganizationsService) DetachCodeSecurityConfigurationsFromRepositories(ctx context.Context, org string, repoIDs []int64) (*Response, error) { + u := fmt.Sprintf("orgs/%v/code-security/configurations/detach", org) + type selectedRepoIDs struct { + SelectedIDs []int64 `json:"selected_repository_ids"` + } + req, err := s.client.NewRequest("DELETE", u, selectedRepoIDs{SelectedIDs: repoIDs}) + if err != nil { + return nil, err + } + resp, err := s.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + return resp, nil +} + +// GetCodeSecurityConfiguration gets a code security configuration available in an organization. +// +// GitHub API docs: https://docs.github.com/rest/code-security/configurations#get-a-code-security-configuration +// +//meta:operation GET /orgs/{org}/code-security/configurations/{configuration_id} +func (s *OrganizationsService) GetCodeSecurityConfiguration(ctx context.Context, org string, id int64) (*CodeSecurityConfiguration, *Response, error) { + u := fmt.Sprintf("orgs/%v/code-security/configurations/%v", org, id) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var configuration *CodeSecurityConfiguration + resp, err := s.client.Do(ctx, req, &configuration) + if err != nil { + return nil, resp, err + } + return configuration, resp, nil +} + +// UpdateCodeSecurityConfiguration updates a code security configuration for an organization. +// +// GitHub API docs: https://docs.github.com/rest/code-security/configurations#update-a-code-security-configuration +// +//meta:operation PATCH /orgs/{org}/code-security/configurations/{configuration_id} +func (s *OrganizationsService) UpdateCodeSecurityConfiguration(ctx context.Context, org string, id int64, c *CodeSecurityConfiguration) (*CodeSecurityConfiguration, *Response, error) { + u := fmt.Sprintf("orgs/%v/code-security/configurations/%v", org, id) + + req, err := s.client.NewRequest("PATCH", u, c) + if err != nil { + return nil, nil, err + } + + var configuration *CodeSecurityConfiguration + resp, err := s.client.Do(ctx, req, &configuration) + if err != nil { + return nil, resp, err + } + return configuration, resp, nil +} + +// DeleteCodeSecurityConfiguration deletes a code security configuration for an organization. +// +// GitHub API docs: https://docs.github.com/rest/code-security/configurations#delete-a-code-security-configuration +// +//meta:operation DELETE /orgs/{org}/code-security/configurations/{configuration_id} +func (s *OrganizationsService) DeleteCodeSecurityConfiguration(ctx context.Context, org string, id int64) (*Response, error) { + u := fmt.Sprintf("orgs/%v/code-security/configurations/%v", org, id) + + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + resp, err := s.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + return resp, nil +} + +// AttachCodeSecurityConfigurationsToRepositories attaches code security configurations to repositories for an organization. +// +// GitHub API docs: https://docs.github.com/rest/code-security/configurations#attach-a-configuration-to-repositories +// +//meta:operation POST /orgs/{org}/code-security/configurations/{configuration_id}/attach +func (s *OrganizationsService) AttachCodeSecurityConfigurationsToRepositories(ctx context.Context, org string, id int64, scope string, repoIDs []int64) (*Response, error) { + u := fmt.Sprintf("orgs/%v/code-security/configurations/%v/attach", org, id) + type selectedRepoIDs struct { + Scope string `json:"scope"` + SelectedIDs []int64 `json:"selected_repository_ids,omitempty"` + } + req, err := s.client.NewRequest("POST", u, selectedRepoIDs{Scope: scope, SelectedIDs: repoIDs}) + if err != nil { + return nil, err + } + resp, err := s.client.Do(ctx, req, nil) + if err != nil && resp.StatusCode != http.StatusAccepted { // StatusAccepted(202) is the expected status code as job is queued for processing + return resp, err + } + return resp, nil +} + +// SetDefaultCodeSecurityConfiguration sets a code security configuration as the default for an organization. +// +// GitHub API docs: https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization +// +//meta:operation PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults +func (s *OrganizationsService) SetDefaultCodeSecurityConfiguration(ctx context.Context, org string, id int64, newReposParam string) (*CodeSecurityConfigurationWithDefaultForNewRepos, *Response, error) { + u := fmt.Sprintf("orgs/%v/code-security/configurations/%v/defaults", org, id) + type configParam struct { + DefaultForNewRepos string `json:"default_for_new_repos"` + } + req, err := s.client.NewRequest("PUT", u, configParam{DefaultForNewRepos: newReposParam}) + if err != nil { + return nil, nil, err + } + var c *CodeSecurityConfigurationWithDefaultForNewRepos + resp, err := s.client.Do(ctx, req, &c) + if err != nil { + return nil, resp, err + } + return c, resp, nil +} + +// GetRepositoriesForCodeSecurityConfiguration gets repositories associated with a code security configuration. +// +// GitHub API docs: https://docs.github.com/rest/code-security/configurations#get-repositories-associated-with-a-code-security-configuration +// +//meta:operation GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories +func (s *OrganizationsService) GetRepositoriesForCodeSecurityConfiguration(ctx context.Context, org string, id int64) ([]*Repository, *Response, error) { + u := fmt.Sprintf("orgs/%v/code-security/configurations/%v/repositories", org, id) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var repositories []*Repository + resp, err := s.client.Do(ctx, req, &repositories) + if err != nil { + return nil, resp, err + } + return repositories, resp, nil +} + +// GetCodeSecurityConfigurationForRepository gets code security configuration that manages a repository's code security settings. +// +// GitHub API docs: https://docs.github.com/rest/code-security/configurations#get-the-code-security-configuration-associated-with-a-repository +// +//meta:operation GET /repos/{owner}/{repo}/code-security-configuration +func (s *OrganizationsService) GetCodeSecurityConfigurationForRepository(ctx context.Context, org, repo string) (*RepositoryCodeSecurityConfiguration, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/code-security-configuration", org, repo) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + var repoConfig *RepositoryCodeSecurityConfiguration + resp, err := s.client.Do(ctx, req, &repoConfig) + if err != nil { + return nil, resp, err + } + return repoConfig, resp, nil +} diff --git a/vendor/github.com/google/go-github/v66/github/orgs_credential_authorizations.go b/vendor/github.com/google/go-github/v68/github/orgs_credential_authorizations.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/orgs_credential_authorizations.go rename to vendor/github.com/google/go-github/v68/github/orgs_credential_authorizations.go diff --git a/vendor/github.com/google/go-github/v66/github/orgs_custom_repository_roles.go b/vendor/github.com/google/go-github/v68/github/orgs_custom_repository_roles.go similarity index 85% rename from vendor/github.com/google/go-github/v66/github/orgs_custom_repository_roles.go rename to vendor/github.com/google/go-github/v68/github/orgs_custom_repository_roles.go index 2295e1b8..44408db1 100644 --- a/vendor/github.com/google/go-github/v66/github/orgs_custom_repository_roles.go +++ b/vendor/github.com/google/go-github/v68/github/orgs_custom_repository_roles.go @@ -61,6 +61,29 @@ func (s *OrganizationsService) ListCustomRepoRoles(ctx context.Context, org stri return customRepoRoles, resp, nil } +// GetCustomRepoRole gets a custom repository roles available in this organization. +// In order to see custom repository roles in an organization, the authenticated user must be an organization owner. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/orgs/custom-roles#get-a-custom-repository-role +// +//meta:operation GET /orgs/{org}/custom-repository-roles/{role_id} +func (s *OrganizationsService) GetCustomRepoRole(ctx context.Context, org string, roleID int64) (*CustomRepoRoles, *Response, error) { + u := fmt.Sprintf("orgs/%v/custom-repository-roles/%v", org, roleID) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + resultingRole := new(CustomRepoRoles) + resp, err := s.client.Do(ctx, req, resultingRole) + if err != nil { + return nil, resp, err + } + + return resultingRole, resp, nil +} + // CreateCustomRepoRole creates a custom repository role in this organization. // In order to create custom repository roles in an organization, the authenticated user must be an organization owner. // diff --git a/vendor/github.com/google/go-github/v66/github/orgs_hooks.go b/vendor/github.com/google/go-github/v68/github/orgs_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/orgs_hooks.go rename to vendor/github.com/google/go-github/v68/github/orgs_hooks.go diff --git a/vendor/github.com/google/go-github/v66/github/orgs_hooks_configuration.go b/vendor/github.com/google/go-github/v68/github/orgs_hooks_configuration.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/orgs_hooks_configuration.go rename to vendor/github.com/google/go-github/v68/github/orgs_hooks_configuration.go diff --git a/vendor/github.com/google/go-github/v66/github/orgs_hooks_deliveries.go b/vendor/github.com/google/go-github/v68/github/orgs_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/orgs_hooks_deliveries.go rename to vendor/github.com/google/go-github/v68/github/orgs_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v66/github/orgs_members.go b/vendor/github.com/google/go-github/v68/github/orgs_members.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/orgs_members.go rename to vendor/github.com/google/go-github/v68/github/orgs_members.go diff --git a/vendor/github.com/google/go-github/v66/github/orgs_organization_roles.go b/vendor/github.com/google/go-github/v68/github/orgs_organization_roles.go similarity index 96% rename from vendor/github.com/google/go-github/v66/github/orgs_organization_roles.go rename to vendor/github.com/google/go-github/v68/github/orgs_organization_roles.go index 695c4dad..0954b92d 100644 --- a/vendor/github.com/google/go-github/v66/github/orgs_organization_roles.go +++ b/vendor/github.com/google/go-github/v68/github/orgs_organization_roles.go @@ -86,7 +86,7 @@ func (s *OrganizationsService) GetOrgRole(ctx context.Context, org string, roleI // CreateCustomOrgRole creates a custom role in this organization. // In order to create custom roles in an organization, the authenticated user must be an organization owner. // -// GitHub API docs: https://docs.github.com/rest/orgs/organization-roles#create-a-custom-organization-role +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/orgs/organization-roles#create-a-custom-organization-role // //meta:operation POST /orgs/{org}/organization-roles func (s *OrganizationsService) CreateCustomOrgRole(ctx context.Context, org string, opts *CreateOrUpdateOrgRoleOptions) (*CustomOrgRoles, *Response, error) { @@ -109,7 +109,7 @@ func (s *OrganizationsService) CreateCustomOrgRole(ctx context.Context, org stri // UpdateCustomOrgRole updates a custom role in this organization. // In order to update custom roles in an organization, the authenticated user must be an organization owner. // -// GitHub API docs: https://docs.github.com/rest/orgs/organization-roles#update-a-custom-organization-role +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/orgs/organization-roles#update-a-custom-organization-role // //meta:operation PATCH /orgs/{org}/organization-roles/{role_id} func (s *OrganizationsService) UpdateCustomOrgRole(ctx context.Context, org string, roleID int64, opts *CreateOrUpdateOrgRoleOptions) (*CustomOrgRoles, *Response, error) { @@ -132,7 +132,7 @@ func (s *OrganizationsService) UpdateCustomOrgRole(ctx context.Context, org stri // DeleteCustomOrgRole deletes an existing custom role in this organization. // In order to delete custom roles in an organization, the authenticated user must be an organization owner. // -// GitHub API docs: https://docs.github.com/rest/orgs/organization-roles#delete-a-custom-organization-role +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/orgs/organization-roles#delete-a-custom-organization-role // //meta:operation DELETE /orgs/{org}/organization-roles/{role_id} func (s *OrganizationsService) DeleteCustomOrgRole(ctx context.Context, org string, roleID int64) (*Response, error) { diff --git a/vendor/github.com/google/go-github/v66/github/orgs_outside_collaborators.go b/vendor/github.com/google/go-github/v68/github/orgs_outside_collaborators.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/orgs_outside_collaborators.go rename to vendor/github.com/google/go-github/v68/github/orgs_outside_collaborators.go diff --git a/vendor/github.com/google/go-github/v66/github/orgs_packages.go b/vendor/github.com/google/go-github/v68/github/orgs_packages.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/orgs_packages.go rename to vendor/github.com/google/go-github/v68/github/orgs_packages.go diff --git a/vendor/github.com/google/go-github/v66/github/orgs_personal_access_tokens.go b/vendor/github.com/google/go-github/v68/github/orgs_personal_access_tokens.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/orgs_personal_access_tokens.go rename to vendor/github.com/google/go-github/v68/github/orgs_personal_access_tokens.go diff --git a/vendor/github.com/google/go-github/v66/github/orgs_properties.go b/vendor/github.com/google/go-github/v68/github/orgs_properties.go similarity index 96% rename from vendor/github.com/google/go-github/v66/github/orgs_properties.go rename to vendor/github.com/google/go-github/v68/github/orgs_properties.go index 3387d98d..f59d9f46 100644 --- a/vendor/github.com/google/go-github/v66/github/orgs_properties.go +++ b/vendor/github.com/google/go-github/v68/github/orgs_properties.go @@ -8,6 +8,7 @@ package github import ( "context" "encoding/json" + "errors" "fmt" ) @@ -16,7 +17,9 @@ type CustomProperty struct { // PropertyName is required for most endpoints except when calling CreateOrUpdateCustomProperty; // where this is sent in the path and thus can be omitted. PropertyName *string `json:"property_name,omitempty"` - // The type of the value for the property. Can be one of: string, single_select. + // SourceType is the source type of the property where it has been created. Can be one of: organization, enterprise. + SourceType *string `json:"source_type,omitempty"` + // The type of the value for the property. Can be one of: string, single_select, multi_select, true_false. ValueType string `json:"value_type"` // Whether the property is required. Required *bool `json:"required,omitempty"` @@ -66,11 +69,11 @@ func (cpv *CustomPropertyValue) UnmarshalJSON(data []byte) error { case []interface{}: strSlice := make([]string, len(v)) for i, item := range v { - if str, ok := item.(string); ok { - strSlice[i] = str - } else { - return fmt.Errorf("non-string value in string array") + str, ok := item.(string) + if !ok { + return errors.New("non-string value in string array") } + strSlice[i] = str } cpv.Value = strSlice default: diff --git a/vendor/github.com/google/go-github/v66/github/orgs_rules.go b/vendor/github.com/google/go-github/v68/github/orgs_rules.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/orgs_rules.go rename to vendor/github.com/google/go-github/v68/github/orgs_rules.go diff --git a/vendor/github.com/google/go-github/v66/github/orgs_security_managers.go b/vendor/github.com/google/go-github/v68/github/orgs_security_managers.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/orgs_security_managers.go rename to vendor/github.com/google/go-github/v68/github/orgs_security_managers.go diff --git a/vendor/github.com/google/go-github/v66/github/orgs_users_blocking.go b/vendor/github.com/google/go-github/v68/github/orgs_users_blocking.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/orgs_users_blocking.go rename to vendor/github.com/google/go-github/v68/github/orgs_users_blocking.go diff --git a/vendor/github.com/google/go-github/v66/github/packages.go b/vendor/github.com/google/go-github/v68/github/packages.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/packages.go rename to vendor/github.com/google/go-github/v68/github/packages.go diff --git a/vendor/github.com/google/go-github/v66/github/pulls.go b/vendor/github.com/google/go-github/v68/github/pulls.go similarity index 99% rename from vendor/github.com/google/go-github/v66/github/pulls.go rename to vendor/github.com/google/go-github/v68/github/pulls.go index b6685026..35ceda44 100644 --- a/vendor/github.com/google/go-github/v66/github/pulls.go +++ b/vendor/github.com/google/go-github/v68/github/pulls.go @@ -8,6 +8,7 @@ package github import ( "bytes" "context" + "errors" "fmt" ) @@ -352,7 +353,7 @@ type pullRequestUpdate struct { //meta:operation PATCH /repos/{owner}/{repo}/pulls/{pull_number} func (s *PullRequestsService) Edit(ctx context.Context, owner string, repo string, number int, pull *PullRequest) (*PullRequest, *Response, error) { if pull == nil { - return nil, nil, fmt.Errorf("pull must be provided") + return nil, nil, errors.New("pull must be provided") } u := fmt.Sprintf("repos/%v/%v/pulls/%d", owner, repo, number) diff --git a/vendor/github.com/google/go-github/v66/github/pulls_comments.go b/vendor/github.com/google/go-github/v68/github/pulls_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/pulls_comments.go rename to vendor/github.com/google/go-github/v68/github/pulls_comments.go diff --git a/vendor/github.com/google/go-github/v66/github/pulls_reviewers.go b/vendor/github.com/google/go-github/v68/github/pulls_reviewers.go similarity index 76% rename from vendor/github.com/google/go-github/v66/github/pulls_reviewers.go rename to vendor/github.com/google/go-github/v68/github/pulls_reviewers.go index 3f0c50b7..9dd60ae6 100644 --- a/vendor/github.com/google/go-github/v66/github/pulls_reviewers.go +++ b/vendor/github.com/google/go-github/v68/github/pulls_reviewers.go @@ -23,6 +23,13 @@ type Reviewers struct { Teams []*Team `json:"teams,omitempty"` } +type removeReviewersRequest struct { + NodeID *string `json:"node_id,omitempty"` + // Note the lack of omitempty! See comment in RemoveReviewers. + Reviewers []string `json:"reviewers"` + TeamReviewers []string `json:"team_reviewers,omitempty"` +} + // RequestReviewers creates a review request for the provided reviewers for the specified pull request. // // GitHub API docs: https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request @@ -76,8 +83,21 @@ func (s *PullRequestsService) ListReviewers(ctx context.Context, owner, repo str // //meta:operation DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers func (s *PullRequestsService) RemoveReviewers(ctx context.Context, owner, repo string, number int, reviewers ReviewersRequest) (*Response, error) { + // reviewers.Reviewers may be empty if the caller wants to remove teams, but not users. Unlike AddReviewers, + // "reviewers" is a required param here. Reference: https://github.com/google/go-github/issues/3336 + removeRequest := removeReviewersRequest{ + NodeID: reviewers.NodeID, + Reviewers: reviewers.Reviewers, + TeamReviewers: reviewers.TeamReviewers, + } + + if removeRequest.Reviewers == nil { + // GitHub accepts the empty list, but rejects null. Removing `omitempty` is not enough - we also have to promote nil to []. + removeRequest.Reviewers = []string{} + } + u := fmt.Sprintf("repos/%s/%s/pulls/%d/requested_reviewers", owner, repo, number) - req, err := s.client.NewRequest("DELETE", u, &reviewers) + req, err := s.client.NewRequest("DELETE", u, &removeRequest) if err != nil { return nil, err } diff --git a/vendor/github.com/google/go-github/v66/github/pulls_reviews.go b/vendor/github.com/google/go-github/v68/github/pulls_reviews.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/pulls_reviews.go rename to vendor/github.com/google/go-github/v68/github/pulls_reviews.go diff --git a/vendor/github.com/google/go-github/v66/github/pulls_threads.go b/vendor/github.com/google/go-github/v68/github/pulls_threads.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/pulls_threads.go rename to vendor/github.com/google/go-github/v68/github/pulls_threads.go diff --git a/vendor/github.com/google/go-github/v66/github/rate_limit.go b/vendor/github.com/google/go-github/v68/github/rate_limit.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/rate_limit.go rename to vendor/github.com/google/go-github/v68/github/rate_limit.go diff --git a/vendor/github.com/google/go-github/v66/github/reactions.go b/vendor/github.com/google/go-github/v68/github/reactions.go similarity index 98% rename from vendor/github.com/google/go-github/v66/github/reactions.go rename to vendor/github.com/google/go-github/v68/github/reactions.go index 1aa7ac38..9f9f72fa 100644 --- a/vendor/github.com/google/go-github/v66/github/reactions.go +++ b/vendor/github.com/google/go-github/v68/github/reactions.go @@ -98,7 +98,7 @@ func (s *ReactionsService) ListCommentReactions(ctx context.Context, owner, repo func (s *ReactionsService) CreateCommentReaction(ctx context.Context, owner, repo string, id int64, content string) (*Reaction, *Response, error) { u := fmt.Sprintf("repos/%v/%v/comments/%v/reactions", owner, repo, id) - body := &Reaction{Content: String(content)} + body := &Reaction{Content: Ptr(content)} req, err := s.client.NewRequest("POST", u, body) if err != nil { return nil, nil, err @@ -178,7 +178,7 @@ func (s *ReactionsService) ListIssueReactions(ctx context.Context, owner, repo s func (s *ReactionsService) CreateIssueReaction(ctx context.Context, owner, repo string, number int, content string) (*Reaction, *Response, error) { u := fmt.Sprintf("repos/%v/%v/issues/%v/reactions", owner, repo, number) - body := &Reaction{Content: String(content)} + body := &Reaction{Content: Ptr(content)} req, err := s.client.NewRequest("POST", u, body) if err != nil { return nil, nil, err @@ -258,7 +258,7 @@ func (s *ReactionsService) ListIssueCommentReactions(ctx context.Context, owner, func (s *ReactionsService) CreateIssueCommentReaction(ctx context.Context, owner, repo string, id int64, content string) (*Reaction, *Response, error) { u := fmt.Sprintf("repos/%v/%v/issues/comments/%v/reactions", owner, repo, id) - body := &Reaction{Content: String(content)} + body := &Reaction{Content: Ptr(content)} req, err := s.client.NewRequest("POST", u, body) if err != nil { return nil, nil, err @@ -338,7 +338,7 @@ func (s *ReactionsService) ListPullRequestCommentReactions(ctx context.Context, func (s *ReactionsService) CreatePullRequestCommentReaction(ctx context.Context, owner, repo string, id int64, content string) (*Reaction, *Response, error) { u := fmt.Sprintf("repos/%v/%v/pulls/comments/%v/reactions", owner, repo, id) - body := &Reaction{Content: String(content)} + body := &Reaction{Content: Ptr(content)} req, err := s.client.NewRequest("POST", u, body) if err != nil { return nil, nil, err @@ -415,7 +415,7 @@ func (s *ReactionsService) ListTeamDiscussionReactions(ctx context.Context, team func (s *ReactionsService) CreateTeamDiscussionReaction(ctx context.Context, teamID int64, discussionNumber int, content string) (*Reaction, *Response, error) { u := fmt.Sprintf("teams/%v/discussions/%v/reactions", teamID, discussionNumber) - body := &Reaction{Content: String(content)} + body := &Reaction{Content: Ptr(content)} req, err := s.client.NewRequest("POST", u, body) if err != nil { return nil, nil, err @@ -490,7 +490,7 @@ func (s *ReactionsService) ListTeamDiscussionCommentReactions(ctx context.Contex func (s *ReactionsService) CreateTeamDiscussionCommentReaction(ctx context.Context, teamID int64, discussionNumber, commentNumber int, content string) (*Reaction, *Response, error) { u := fmt.Sprintf("teams/%v/discussions/%v/comments/%v/reactions", teamID, discussionNumber, commentNumber) - body := &Reaction{Content: String(content)} + body := &Reaction{Content: Ptr(content)} req, err := s.client.NewRequest("POST", u, body) if err != nil { return nil, nil, err @@ -552,7 +552,7 @@ func (s *ReactionsService) deleteReaction(ctx context.Context, url string) (*Res func (s *ReactionsService) CreateReleaseReaction(ctx context.Context, owner, repo string, releaseID int64, content string) (*Reaction, *Response, error) { u := fmt.Sprintf("repos/%v/%v/releases/%v/reactions", owner, repo, releaseID) - body := &Reaction{Content: String(content)} + body := &Reaction{Content: Ptr(content)} req, err := s.client.NewRequest("POST", u, body) if err != nil { return nil, nil, err diff --git a/vendor/github.com/google/go-github/v66/github/repos.go b/vendor/github.com/google/go-github/v68/github/repos.go similarity index 99% rename from vendor/github.com/google/go-github/v66/github/repos.go rename to vendor/github.com/google/go-github/v68/github/repos.go index d928771d..9faed401 100644 --- a/vendor/github.com/google/go-github/v66/github/repos.go +++ b/vendor/github.com/google/go-github/v68/github/repos.go @@ -738,7 +738,7 @@ func (s *RepositoriesService) Delete(ctx context.Context, owner, repo string) (* return s.client.Do(ctx, req, nil) } -// Contributor represents a repository contributor +// Contributor represents a repository contributor. type Contributor struct { Login *string `json:"login,omitempty"` ID *int64 `json:"id,omitempty"` @@ -998,7 +998,7 @@ func (s *RepositoriesService) ListTags(ctx context.Context, owner string, repo s return tags, resp, nil } -// Branch represents a repository branch +// Branch represents a repository branch. type Branch struct { Name *string `json:"name,omitempty"` Commit *RepositoryCommit `json:"commit,omitempty"` diff --git a/vendor/github.com/google/go-github/v66/github/repos_actions_access.go b/vendor/github.com/google/go-github/v68/github/repos_actions_access.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_actions_access.go rename to vendor/github.com/google/go-github/v68/github/repos_actions_access.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_actions_allowed.go b/vendor/github.com/google/go-github/v68/github/repos_actions_allowed.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_actions_allowed.go rename to vendor/github.com/google/go-github/v68/github/repos_actions_allowed.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_actions_permissions.go b/vendor/github.com/google/go-github/v68/github/repos_actions_permissions.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_actions_permissions.go rename to vendor/github.com/google/go-github/v68/github/repos_actions_permissions.go diff --git a/vendor/github.com/google/go-github/v68/github/repos_attestations.go b/vendor/github.com/google/go-github/v68/github/repos_attestations.go new file mode 100644 index 00000000..2e542550 --- /dev/null +++ b/vendor/github.com/google/go-github/v68/github/repos_attestations.go @@ -0,0 +1,39 @@ +// Copyright 2024 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" +) + +// ListAttestations returns a collection of artifact attestations +// with a given subject digest that are associated with a repository. +// +// GitHub API docs: https://docs.github.com/rest/repos/repos#list-attestations +// +//meta:operation GET /repos/{owner}/{repo}/attestations/{subject_digest} +func (s *RepositoriesService) ListAttestations(ctx context.Context, owner, repo, subjectDigest string, opts *ListOptions) (*AttestationsResponse, *Response, error) { + var u = fmt.Sprintf("repos/%v/%v/attestations/%v", owner, repo, subjectDigest) + + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var attestations *AttestationsResponse + resp, err := s.client.Do(ctx, req, &attestations) + if err != nil { + return nil, resp, err + } + + return attestations, resp, nil +} diff --git a/vendor/github.com/google/go-github/v66/github/repos_autolinks.go b/vendor/github.com/google/go-github/v68/github/repos_autolinks.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_autolinks.go rename to vendor/github.com/google/go-github/v68/github/repos_autolinks.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_codeowners.go b/vendor/github.com/google/go-github/v68/github/repos_codeowners.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_codeowners.go rename to vendor/github.com/google/go-github/v68/github/repos_codeowners.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_collaborators.go b/vendor/github.com/google/go-github/v68/github/repos_collaborators.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_collaborators.go rename to vendor/github.com/google/go-github/v68/github/repos_collaborators.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_comments.go b/vendor/github.com/google/go-github/v68/github/repos_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_comments.go rename to vendor/github.com/google/go-github/v68/github/repos_comments.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_commits.go b/vendor/github.com/google/go-github/v68/github/repos_commits.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_commits.go rename to vendor/github.com/google/go-github/v68/github/repos_commits.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_community_health.go b/vendor/github.com/google/go-github/v68/github/repos_community_health.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_community_health.go rename to vendor/github.com/google/go-github/v68/github/repos_community_health.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_contents.go b/vendor/github.com/google/go-github/v68/github/repos_contents.go similarity index 99% rename from vendor/github.com/google/go-github/v66/github/repos_contents.go rename to vendor/github.com/google/go-github/v68/github/repos_contents.go index 97539aee..3a0c266b 100644 --- a/vendor/github.com/google/go-github/v66/github/repos_contents.go +++ b/vendor/github.com/google/go-github/v68/github/repos_contents.go @@ -62,7 +62,7 @@ type RepositoryContentFileOptions struct { } // RepositoryContentGetOptions represents an optional ref parameter, which can be a SHA, -// branch, or tag +// branch, or tag. type RepositoryContentGetOptions struct { Ref string `url:"ref,omitempty"` } diff --git a/vendor/github.com/google/go-github/v66/github/repos_deployment_branch_policies.go b/vendor/github.com/google/go-github/v68/github/repos_deployment_branch_policies.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_deployment_branch_policies.go rename to vendor/github.com/google/go-github/v68/github/repos_deployment_branch_policies.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_deployment_protection_rules.go b/vendor/github.com/google/go-github/v68/github/repos_deployment_protection_rules.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_deployment_protection_rules.go rename to vendor/github.com/google/go-github/v68/github/repos_deployment_protection_rules.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_deployments.go b/vendor/github.com/google/go-github/v68/github/repos_deployments.go similarity index 98% rename from vendor/github.com/google/go-github/v66/github/repos_deployments.go rename to vendor/github.com/google/go-github/v68/github/repos_deployments.go index d8c0b632..6277ac21 100644 --- a/vendor/github.com/google/go-github/v66/github/repos_deployments.go +++ b/vendor/github.com/google/go-github/v68/github/repos_deployments.go @@ -12,7 +12,7 @@ import ( "strings" ) -// Deployment represents a deployment in a repo +// Deployment represents a deployment in a repo. type Deployment struct { URL *string `json:"url,omitempty"` ID *int64 `json:"id,omitempty"` @@ -30,7 +30,7 @@ type Deployment struct { NodeID *string `json:"node_id,omitempty"` } -// DeploymentRequest represents a deployment request +// DeploymentRequest represents a deployment request. type DeploymentRequest struct { Ref *string `json:"ref,omitempty"` Task *string `json:"task,omitempty"` @@ -171,7 +171,7 @@ type DeploymentStatus struct { URL *string `json:"url,omitempty"` } -// DeploymentStatusRequest represents a deployment request +// DeploymentStatusRequest represents a deployment request. type DeploymentStatusRequest struct { State *string `json:"state,omitempty"` LogURL *string `json:"log_url,omitempty"` diff --git a/vendor/github.com/google/go-github/v66/github/repos_environments.go b/vendor/github.com/google/go-github/v68/github/repos_environments.go similarity index 99% rename from vendor/github.com/google/go-github/v66/github/repos_environments.go rename to vendor/github.com/google/go-github/v68/github/repos_environments.go index ed81e3a1..d3e34fa8 100644 --- a/vendor/github.com/google/go-github/v66/github/repos_environments.go +++ b/vendor/github.com/google/go-github/v68/github/repos_environments.go @@ -157,10 +157,10 @@ func (s *RepositoriesService) GetEnvironment(ctx context.Context, owner, repo, n func (c *CreateUpdateEnvironment) MarshalJSON() ([]byte, error) { type Alias CreateUpdateEnvironment if c.WaitTimer == nil { - c.WaitTimer = Int(0) + c.WaitTimer = Ptr(0) } if c.CanAdminsBypass == nil { - c.CanAdminsBypass = Bool(true) + c.CanAdminsBypass = Ptr(true) } return json.Marshal(&struct { *Alias diff --git a/vendor/github.com/google/go-github/v66/github/repos_forks.go b/vendor/github.com/google/go-github/v68/github/repos_forks.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_forks.go rename to vendor/github.com/google/go-github/v68/github/repos_forks.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_hooks.go b/vendor/github.com/google/go-github/v68/github/repos_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_hooks.go rename to vendor/github.com/google/go-github/v68/github/repos_hooks.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_hooks_configuration.go b/vendor/github.com/google/go-github/v68/github/repos_hooks_configuration.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_hooks_configuration.go rename to vendor/github.com/google/go-github/v68/github/repos_hooks_configuration.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_hooks_deliveries.go b/vendor/github.com/google/go-github/v68/github/repos_hooks_deliveries.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_hooks_deliveries.go rename to vendor/github.com/google/go-github/v68/github/repos_hooks_deliveries.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_invitations.go b/vendor/github.com/google/go-github/v68/github/repos_invitations.go similarity index 98% rename from vendor/github.com/google/go-github/v66/github/repos_invitations.go rename to vendor/github.com/google/go-github/v68/github/repos_invitations.go index 4922e0b2..98fe01d1 100644 --- a/vendor/github.com/google/go-github/v66/github/repos_invitations.go +++ b/vendor/github.com/google/go-github/v68/github/repos_invitations.go @@ -23,6 +23,7 @@ type RepositoryInvitation struct { CreatedAt *Timestamp `json:"created_at,omitempty"` URL *string `json:"url,omitempty"` HTMLURL *string `json:"html_url,omitempty"` + Expired *bool `json:"expired,omitempty"` } // ListInvitations lists all currently-open repository invitations. diff --git a/vendor/github.com/google/go-github/v66/github/repos_keys.go b/vendor/github.com/google/go-github/v68/github/repos_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_keys.go rename to vendor/github.com/google/go-github/v68/github/repos_keys.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_lfs.go b/vendor/github.com/google/go-github/v68/github/repos_lfs.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_lfs.go rename to vendor/github.com/google/go-github/v68/github/repos_lfs.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_merging.go b/vendor/github.com/google/go-github/v68/github/repos_merging.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_merging.go rename to vendor/github.com/google/go-github/v68/github/repos_merging.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_pages.go b/vendor/github.com/google/go-github/v68/github/repos_pages.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_pages.go rename to vendor/github.com/google/go-github/v68/github/repos_pages.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_prereceive_hooks.go b/vendor/github.com/google/go-github/v68/github/repos_prereceive_hooks.go similarity index 93% rename from vendor/github.com/google/go-github/v66/github/repos_prereceive_hooks.go rename to vendor/github.com/google/go-github/v68/github/repos_prereceive_hooks.go index 7d85c873..e97075d0 100644 --- a/vendor/github.com/google/go-github/v66/github/repos_prereceive_hooks.go +++ b/vendor/github.com/google/go-github/v68/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.12/rest/enterprise-admin/repo-pre-receive-hooks#list-pre-receive-hooks-for-a-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 // //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.12/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.15/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.12/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.15/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.12/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.15/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/v66/github/repos_properties.go b/vendor/github.com/google/go-github/v68/github/repos_properties.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_properties.go rename to vendor/github.com/google/go-github/v68/github/repos_properties.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_releases.go b/vendor/github.com/google/go-github/v68/github/repos_releases.go similarity index 97% rename from vendor/github.com/google/go-github/v66/github/repos_releases.go rename to vendor/github.com/google/go-github/v68/github/repos_releases.go index 7231db6d..6023f632 100644 --- a/vendor/github.com/google/go-github/v66/github/repos_releases.go +++ b/vendor/github.com/google/go-github/v68/github/repos_releases.go @@ -333,9 +333,10 @@ func (s *RepositoriesService) GetReleaseAsset(ctx context.Context, owner, repo s // of the io.ReadCloser. Exactly one of rc and redirectURL will be zero. // // followRedirectsClient can be passed to download the asset from a redirected -// location. Passing http.DefaultClient is recommended unless special circumstances -// exist, but it's possible to pass any http.Client. If nil is passed the -// redirectURL will be returned instead. +// location. Specifying any http.Client is possible, but passing http.DefaultClient +// is recommended, except when the specified repository is private, in which case +// it's necessary to pass an http.Client that performs authenticated requests. +// If nil is passed the redirectURL will be returned instead. // // GitHub API docs: https://docs.github.com/rest/releases/assets#get-a-release-asset // @@ -387,7 +388,7 @@ func (s *RepositoriesService) downloadReleaseAssetFromURL(ctx context.Context, f return nil, err } req = withContext(ctx, req) - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", defaultMediaType) resp, err := followRedirectsClient.Do(req) if err != nil { return nil, err diff --git a/vendor/github.com/google/go-github/v66/github/repos_rules.go b/vendor/github.com/google/go-github/v68/github/repos_rules.go similarity index 62% rename from vendor/github.com/google/go-github/v66/github/repos_rules.go rename to vendor/github.com/google/go-github/v68/github/repos_rules.go index d09bb71d..b113553a 100644 --- a/vendor/github.com/google/go-github/v66/github/repos_rules.go +++ b/vendor/github.com/google/go-github/v68/github/repos_rules.go @@ -52,7 +52,7 @@ type RulesetRepositoryIDsConditionParameters struct { type RulesetRepositoryPropertyTargetParameters struct { Name string `json:"name"` Values []string `json:"property_values"` - Source string `json:"source"` + Source *string `json:"source,omitempty"` } // RulesetRepositoryPropertyConditionParameters represents the conditions object for repository_property. @@ -140,7 +140,7 @@ type MergeQueueRuleParameters struct { // RequiredStatusChecksRuleParameters represents the required_status_checks rule parameters. type RequiredStatusChecksRuleParameters struct { - DoNotEnforceOnCreate bool `json:"do_not_enforce_on_create"` + DoNotEnforceOnCreate *bool `json:"do_not_enforce_on_create,omitempty"` RequiredStatusChecks []RuleRequiredStatusChecks `json:"required_status_checks"` StrictRequiredStatusChecksPolicy bool `json:"strict_required_status_checks_policy"` } @@ -155,7 +155,20 @@ type RuleRequiredWorkflow struct { // RequiredWorkflowsRuleParameters represents the workflows rule parameters. type RequiredWorkflowsRuleParameters struct { - RequiredWorkflows []*RuleRequiredWorkflow `json:"workflows"` + DoNotEnforceOnCreate bool `json:"do_not_enforce_on_create,omitempty"` + RequiredWorkflows []*RuleRequiredWorkflow `json:"workflows"` +} + +// RuleRequiredCodeScanningTool represents a single required code-scanning tool for the RequiredCodeScanningParameters object. +type RuleRequiredCodeScanningTool struct { + AlertsThreshold string `json:"alerts_threshold"` + SecurityAlertsThreshold string `json:"security_alerts_threshold"` + Tool string `json:"tool"` +} + +// RequiredCodeScanningRuleParameters represents the code_scanning rule parameters. +type RequiredCodeScanningRuleParameters struct { + RequiredCodeScanningTools []*RuleRequiredCodeScanningTool `json:"code_scanning_tools"` } // RepositoryRule represents a GitHub Rule. @@ -167,30 +180,250 @@ type RepositoryRule struct { RulesetID int64 `json:"ruleset_id"` } +// RepositoryRulesetEditedChanges represents the changes made to a repository ruleset. +type RepositoryRulesetEditedChanges struct { + Name *RepositoryRulesetEditedSource `json:"name,omitempty"` + Enforcement *RepositoryRulesetEditedSource `json:"enforcement,omitempty"` + Conditions *RepositoryRulesetEditedConditions `json:"conditions,omitempty"` + Rules *RepositoryRulesetEditedRules `json:"rules,omitempty"` +} + +// RepositoryRulesetEditedSource represents a source change for the ruleset. +type RepositoryRulesetEditedSource struct { + From *string `json:"from,omitempty"` +} + +// RepositoryRulesetEditedSources represents multiple source changes for the ruleset. +type RepositoryRulesetEditedSources struct { + From []string `json:"from,omitempty"` +} + +// RepositoryRulesetEditedConditions holds changes to conditions in a ruleset. +type RepositoryRulesetEditedConditions struct { + Added []*RepositoryRulesetRefCondition `json:"added,omitempty"` + Deleted []*RepositoryRulesetRefCondition `json:"deleted,omitempty"` + Updated []*RepositoryRulesetEditedUpdatedConditions `json:"updated,omitempty"` +} + +// RepositoryRulesetEditedRules holds changes to rules in a ruleset. +type RepositoryRulesetEditedRules struct { + Added []*RepositoryRulesetRule `json:"added,omitempty"` + Deleted []*RepositoryRulesetRule `json:"deleted,omitempty"` + Updated []*RepositoryRulesetUpdatedRules `json:"updated,omitempty"` +} + +// RepositoryRulesetRefCondition represents a reference condition for the ruleset. +type RepositoryRulesetRefCondition struct { + RefName *RulesetRefConditionParameters `json:"ref_name,omitempty"` +} + +// RepositoryRulesetEditedUpdatedConditions holds updates to conditions in a ruleset. +type RepositoryRulesetEditedUpdatedConditions struct { + Condition *RepositoryRulesetRefCondition `json:"condition,omitempty"` + Changes *RepositoryRulesetUpdatedConditionsEdited `json:"changes,omitempty"` +} + +// RepositoryRulesetUpdatedConditionsEdited holds the edited updates to conditions in a ruleset. +type RepositoryRulesetUpdatedConditionsEdited struct { + ConditionType *RepositoryRulesetEditedSource `json:"condition_type,omitempty"` + Target *RepositoryRulesetEditedSource `json:"target,omitempty"` + Include *RepositoryRulesetEditedSources `json:"include,omitempty"` + Exclude *RepositoryRulesetEditedSources `json:"exclude,omitempty"` +} + +// RepositoryRulesetUpdatedRules holds updates to rules in a ruleset. +type RepositoryRulesetUpdatedRules struct { + Rule *RepositoryRulesetRule `json:"rule,omitempty"` + Changes *RepositoryRulesetEditedRuleChanges `json:"changes,omitempty"` +} + +// RepositoryRulesetEditedRuleChanges holds changes made to a rule in a ruleset. +type RepositoryRulesetEditedRuleChanges struct { + Configuration *RepositoryRulesetEditedSources `json:"configuration,omitempty"` + RuleType *RepositoryRulesetEditedSources `json:"rule_type,omitempty"` + Pattern *RepositoryRulesetEditedSources `json:"pattern,omitempty"` +} + +// RepositoryRuleset represents the structure of a ruleset associated with a GitHub repository. +type RepositoryRuleset struct { + ID int64 `json:"id"` + Name string `json:"name"` + // Possible values for target: "branch", "tag", "push" + Target *string `json:"target,omitempty"` + // Possible values for source type: "Repository", "Organization" + SourceType *string `json:"source_type,omitempty"` + Source string `json:"source"` + // Possible values for enforcement: "disabled", "active", "evaluate" + Enforcement string `json:"enforcement"` + BypassActors []*BypassActor `json:"bypass_actors,omitempty"` + // Possible values for current user can bypass: "always", "pull_requests_only", "never" + CurrentUserCanBypass *string `json:"current_user_can_bypass,omitempty"` + NodeID *string `json:"node_id,omitempty"` + Links *RepositoryRulesetLink `json:"_links,omitempty"` + Conditions json.RawMessage `json:"conditions,omitempty"` + Rules []*RepositoryRulesetRule `json:"rules,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` +} + +// RepositoryRulesetRule represents individual rules which are present in a repository's ruleset. +type RepositoryRulesetRule struct { + Creation *RepositoryRulesetRuleType `json:"creation,omitempty"` + Update *RepositoryRulesetUpdateRule `json:"update,omitempty"` + Deletion *RepositoryRulesetRuleType `json:"deletion,omitempty"` + RequiredLinearHistory *RepositoryRulesetRuleType `json:"required_linear_history,omitempty"` + MergeQueue *RepositoryRulesetMergeQueueRule `json:"merge_queue,omitempty"` + RequiredDeployments *RepositoryRulesetRequiredDeploymentsRule `json:"required_deployments,omitempty"` + RequiredSignatures *RepositoryRulesetRuleType `json:"required_signatures,omitempty"` + PullRequest *RepositoryRulesetPullRequestRule `json:"pull_request,omitempty"` + RequiredStatusChecks *RepositoryRulesetRequiredStatusChecksRule `json:"required_status_checks,omitempty"` + NonFastForward *RepositoryRulesetRuleType `json:"non_fast_forward,omitempty"` + CommitMessagePattern *RepositoryRulesetPatternRule `json:"commit_message_pattern,omitempty"` + CommitAuthorEmailPattern *RepositoryRulesetPatternRule `json:"commit_author_email_pattern,omitempty"` + CommitterEmailPattern *RepositoryRulesetPatternRule `json:"committer_email_pattern,omitempty"` + BranchNamePattern *RepositoryRulesetPatternRule `json:"branch_name_pattern,omitempty"` + TagNamePattern *RepositoryRulesetPatternRule `json:"tag_name_pattern,omitempty"` + FilePathRestriction *RepositoryRulesetFilePathRestrictionRule `json:"file_path_restriction,omitempty"` + MaxFilePathLength *RepositoryRulesetMaxFilePathLengthRule `json:"max_file_path_length,omitempty"` + FileExtensionRestriction *RepositoryRulesetFileExtensionRestrictionRule `json:"file_extension_restriction,omitempty"` + MaxFileSize *RepositoryRulesetMaxFileSizeRule `json:"max_file_size,omitempty"` + Workflows *RepositoryRulesetWorkflowsRule `json:"workflows,omitempty"` + CodeScanning *RepositoryRulesetCodeScanningRule `json:"code_scanning,omitempty"` +} + +// RepositoryRulesetLink represents Links associated with a repository's rulesets. These links are used to provide more information about the ruleset. +type RepositoryRulesetLink struct { + Self *RulesetLink `json:"self,omitempty"` + HTML *RulesetLink `json:"html,omitempty"` +} + +// RepositoryRulesetRuleType represents the type of a ruleset rule. +type RepositoryRulesetRuleType struct { + Type string `json:"type"` +} + +// RepositoryRulesetUpdateRule defines an update rule for the repository. +type RepositoryRulesetUpdateRule struct { + // Type can be one of: "update". + Type string `json:"type"` + Parameters *UpdateAllowsFetchAndMergeRuleParameters `json:"parameters,omitempty"` +} + +// RepositoryRulesetMergeQueueRule defines a merge queue rule for the repository. +type RepositoryRulesetMergeQueueRule struct { + // Type can be one of: "merge_queue". + Type string `json:"type"` + Parameters *MergeQueueRuleParameters `json:"parameters,omitempty"` +} + +// RepositoryRulesetRequiredDeploymentsRule defines a rule for required deployments. +type RepositoryRulesetRequiredDeploymentsRule struct { + // Type can be one of: "required_deployments". + Type string `json:"type"` + Parameters *RequiredDeploymentEnvironmentsRuleParameters `json:"parameters,omitempty"` +} + +// RepositoryRulesetPullRequestRule defines a rule for pull requests. +type RepositoryRulesetPullRequestRule struct { + // Type can be one of: "pull_request". + + Type string `json:"type"` + Parameters *PullRequestRuleParameters `json:"parameters,omitempty"` +} + +// RepositoryRulesetRequiredStatusChecksRule defines a rule for required status checks. +type RepositoryRulesetRequiredStatusChecksRule struct { + // Type can be one of: "required_status_checks". + + Type string `json:"type"` + Parameters *RequiredStatusChecksRuleParameters `json:"parameters,omitempty"` +} + +// RepositoryRulesetPatternRule defines a pattern rule for the repository. +type RepositoryRulesetPatternRule struct { + Type string `json:"type"` + Parameters *RulePatternParameters `json:"parameters,omitempty"` +} + +// RepositoryRulesetFilePathRestrictionRule defines a file path restriction rule for the repository. +type RepositoryRulesetFilePathRestrictionRule struct { + // Type can be one of: "file_path_restriction". + Type string `json:"type"` + Parameters *RuleFileParameters `json:"parameters,omitempty"` +} + +// RepositoryRulesetMaxFilePathLengthRule defines a maximum file path length rule for the repository. +type RepositoryRulesetMaxFilePathLengthRule struct { + // Type can be one of: "max_file_path_length". + + Type string `json:"type"` + Parameters *RuleMaxFilePathLengthParameters `json:"parameters,omitempty"` +} + +// RepositoryRulesetFileExtensionRestrictionRule defines a file extension restriction rule for the repository. +type RepositoryRulesetFileExtensionRestrictionRule struct { + // Type can be one of: "file_extension_restriction". + Type string `json:"type"` + Parameters *RuleFileExtensionRestrictionParameters `json:"parameters,omitempty"` +} + +// RepositoryRulesetMaxFileSizeRule defines a maximum file size rule for the repository. +type RepositoryRulesetMaxFileSizeRule struct { + // Type can be one of: "max_file_size". + Type string `json:"type"` + Parameters *RuleMaxFileSizeParameters `json:"parameters,omitempty"` +} + +// RepositoryRulesetWorkflowsRule defines a workflow rule for the repository. +type RepositoryRulesetWorkflowsRule struct { + // Type can be one of: "workflows". + Type string `json:"type"` + Parameters *RequiredWorkflowsRuleParameters `json:"parameters,omitempty"` +} + +// RepositoryRulesetCodeScanningRule defines a code scanning rule for the repository. +type RepositoryRulesetCodeScanningRule struct { + // Type can be one of: "code_scanning". + Type string `json:"type"` + Parameters *RuleCodeScanningParameters `json:"parameters,omitempty"` +} + +// RuleCodeScanningParameters defines parameters for code scanning rules. +type RuleCodeScanningParameters struct { + CodeScanningTools []*CodeScanningTool `json:"code_scanning_tools,omitempty"` +} + +// CodeScanningTool defines a specific tool used for code scanning. +type CodeScanningTool struct { + AlertsThreshold string `json:"alerts_threshold"` + SecurityAlertsThreshold string `json:"security_alerts_threshold"` + Tool string `json:"tool"` +} + // UnmarshalJSON implements the json.Unmarshaler interface. // This helps us handle the fact that RepositoryRule parameter field can be of numerous types. func (r *RepositoryRule) UnmarshalJSON(data []byte) error { type rule RepositoryRule - var RepositoryRule rule - if err := json.Unmarshal(data, &RepositoryRule); err != nil { + var repositoryRule rule + if err := json.Unmarshal(data, &repositoryRule); err != nil { return err } - r.RulesetID = RepositoryRule.RulesetID - r.RulesetSourceType = RepositoryRule.RulesetSourceType - r.RulesetSource = RepositoryRule.RulesetSource - r.Type = RepositoryRule.Type + r.RulesetID = repositoryRule.RulesetID + r.RulesetSourceType = repositoryRule.RulesetSourceType + r.RulesetSource = repositoryRule.RulesetSource + r.Type = repositoryRule.Type - switch RepositoryRule.Type { + switch repositoryRule.Type { case "creation", "deletion", "non_fast_forward", "required_linear_history", "required_signatures": r.Parameters = nil case "update": - if RepositoryRule.Parameters == nil { + if repositoryRule.Parameters == nil { r.Parameters = nil return nil } params := UpdateAllowsFetchAndMergeRuleParameters{} - if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil { + if err := json.Unmarshal(*repositoryRule.Parameters, ¶ms); err != nil { return err } @@ -199,12 +432,12 @@ func (r *RepositoryRule) UnmarshalJSON(data []byte) error { r.Parameters = &rawParams case "merge_queue": - if RepositoryRule.Parameters == nil { + if repositoryRule.Parameters == nil { r.Parameters = nil return nil } params := MergeQueueRuleParameters{} - if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil { + if err := json.Unmarshal(*repositoryRule.Parameters, ¶ms); err != nil { return err } @@ -214,7 +447,7 @@ func (r *RepositoryRule) UnmarshalJSON(data []byte) error { r.Parameters = &rawParams case "required_deployments": params := RequiredDeploymentEnvironmentsRuleParameters{} - if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil { + if err := json.Unmarshal(*repositoryRule.Parameters, ¶ms); err != nil { return err } @@ -224,7 +457,7 @@ func (r *RepositoryRule) UnmarshalJSON(data []byte) error { r.Parameters = &rawParams case "commit_message_pattern", "commit_author_email_pattern", "committer_email_pattern", "branch_name_pattern", "tag_name_pattern": params := RulePatternParameters{} - if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil { + if err := json.Unmarshal(*repositoryRule.Parameters, ¶ms); err != nil { return err } @@ -234,7 +467,7 @@ func (r *RepositoryRule) UnmarshalJSON(data []byte) error { r.Parameters = &rawParams case "pull_request": params := PullRequestRuleParameters{} - if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil { + if err := json.Unmarshal(*repositoryRule.Parameters, ¶ms); err != nil { return err } @@ -244,7 +477,7 @@ func (r *RepositoryRule) UnmarshalJSON(data []byte) error { r.Parameters = &rawParams case "required_status_checks": params := RequiredStatusChecksRuleParameters{} - if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil { + if err := json.Unmarshal(*repositoryRule.Parameters, ¶ms); err != nil { return err } @@ -254,7 +487,7 @@ func (r *RepositoryRule) UnmarshalJSON(data []byte) error { r.Parameters = &rawParams case "workflows": params := RequiredWorkflowsRuleParameters{} - if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil { + if err := json.Unmarshal(*repositoryRule.Parameters, ¶ms); err != nil { return err } @@ -264,7 +497,16 @@ func (r *RepositoryRule) UnmarshalJSON(data []byte) error { r.Parameters = &rawParams case "file_path_restriction": params := RuleFileParameters{} - if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil { + if err := json.Unmarshal(*repositoryRule.Parameters, ¶ms); err != nil { + return err + } + bytes, _ := json.Marshal(params) + rawParams := json.RawMessage(bytes) + + r.Parameters = &rawParams + case "code_scanning": + params := RequiredCodeScanningRuleParameters{} + if err := json.Unmarshal(*repositoryRule.Parameters, ¶ms); err != nil { return err } bytes, _ := json.Marshal(params) @@ -273,7 +515,7 @@ func (r *RepositoryRule) UnmarshalJSON(data []byte) error { r.Parameters = &rawParams case "max_file_path_length": params := RuleMaxFilePathLengthParameters{} - if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil { + if err := json.Unmarshal(*repositoryRule.Parameters, ¶ms); err != nil { return err } bytes, _ := json.Marshal(params) @@ -282,7 +524,7 @@ func (r *RepositoryRule) UnmarshalJSON(data []byte) error { r.Parameters = &rawParams case "file_extension_restriction": params := RuleFileExtensionRestrictionParameters{} - if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil { + if err := json.Unmarshal(*repositoryRule.Parameters, ¶ms); err != nil { return err } bytes, _ := json.Marshal(params) @@ -291,7 +533,7 @@ func (r *RepositoryRule) UnmarshalJSON(data []byte) error { r.Parameters = &rawParams case "max_file_size": params := RuleMaxFileSizeParameters{} - if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil { + if err := json.Unmarshal(*repositoryRule.Parameters, ¶ms); err != nil { return err } bytes, _ := json.Marshal(params) @@ -301,7 +543,7 @@ func (r *RepositoryRule) UnmarshalJSON(data []byte) error { default: r.Type = "" r.Parameters = nil - return fmt.Errorf("RepositoryRule.Type %q is not yet implemented, unable to unmarshal (%#v)", RepositoryRule.Type, RepositoryRule) + return fmt.Errorf("RepositoryRule.Type %q is not yet implemented, unable to unmarshal (%#v)", repositoryRule.Type, repositoryRule) } return nil @@ -484,6 +726,18 @@ func NewRequiredWorkflowsRule(params *RequiredWorkflowsRuleParameters) (rule *Re } } +// NewRequiredCodeScanningRule creates a rule to require which tools must provide code scanning results before the reference is updated. +func NewRequiredCodeScanningRule(params *RequiredCodeScanningRuleParameters) (rule *RepositoryRule) { + bytes, _ := json.Marshal(params) + + rawParams := json.RawMessage(bytes) + + return &RepositoryRule{ + Type: "code_scanning", + Parameters: &rawParams, + } +} + // NewFilePathRestrictionRule creates a rule to restrict file paths from being pushed to. func NewFilePathRestrictionRule(params *RuleFileParameters) (rule *RepositoryRule) { bytes, _ := json.Marshal(params) @@ -548,6 +802,8 @@ type Ruleset struct { Links *RulesetLinks `json:"_links,omitempty"` Conditions *RulesetConditions `json:"conditions,omitempty"` Rules []*RepositoryRule `json:"rules,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` } // rulesetNoOmitBypassActors represents a GitHub ruleset object. The struct does not omit bypassActors if the field is nil or an empty array is passed. diff --git a/vendor/github.com/google/go-github/v66/github/repos_stats.go b/vendor/github.com/google/go-github/v68/github/repos_stats.go similarity index 98% rename from vendor/github.com/google/go-github/v66/github/repos_stats.go rename to vendor/github.com/google/go-github/v68/github/repos_stats.go index 898693f7..a6ef9c0d 100644 --- a/vendor/github.com/google/go-github/v66/github/repos_stats.go +++ b/vendor/github.com/google/go-github/v68/github/repos_stats.go @@ -139,8 +139,8 @@ func (s *RepositoriesService) ListCodeFrequency(ctx context.Context, owner, repo } stat := &WeeklyStats{ Week: &Timestamp{time.Unix(int64(week[0]), 0)}, - Additions: Int(week[1]), - Deletions: Int(week[2]), + Additions: Ptr(week[1]), + Deletions: Ptr(week[2]), } stats = append(stats, stat) } @@ -231,9 +231,9 @@ func (s *RepositoriesService) ListPunchCard(ctx context.Context, owner, repo str continue } card := &PunchCard{ - Day: Int(result[0]), - Hour: Int(result[1]), - Commits: Int(result[2]), + Day: Ptr(result[0]), + Hour: Ptr(result[1]), + Commits: Ptr(result[2]), } cards = append(cards, card) } diff --git a/vendor/github.com/google/go-github/v66/github/repos_statuses.go b/vendor/github.com/google/go-github/v68/github/repos_statuses.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_statuses.go rename to vendor/github.com/google/go-github/v68/github/repos_statuses.go diff --git a/vendor/github.com/google/go-github/v66/github/repos_tags.go b/vendor/github.com/google/go-github/v68/github/repos_tags.go similarity index 62% rename from vendor/github.com/google/go-github/v66/github/repos_tags.go rename to vendor/github.com/google/go-github/v68/github/repos_tags.go index 93164dd1..b6dc36e2 100644 --- a/vendor/github.com/google/go-github/v66/github/repos_tags.go +++ b/vendor/github.com/google/go-github/v68/github/repos_tags.go @@ -22,9 +22,10 @@ type tagProtectionRequest struct { Pattern string `json:"pattern"` } -// ListTagProtection lists tag protection of the specified repository. +// Deprecated: ListTagProtection lists tag protection of the specified repository. +// Deprecation notice: This operation is deprecated and will be removed after August 30, 2024. Use the "Repository Rulesets" endpoint instead: https://docs.github.com/rest/repos/rules#get-all-repository-rulesets // -// GitHub API docs: https://docs.github.com/rest/repos/tags#list-tag-protection-states-for-a-repository +// GitHub API docs: https://docs.github.com/rest/repos/tags#closing-down---list-tag-protection-states-for-a-repository // //meta:operation GET /repos/{owner}/{repo}/tags/protection func (s *RepositoriesService) ListTagProtection(ctx context.Context, owner, repo string) ([]*TagProtection, *Response, error) { @@ -44,9 +45,10 @@ func (s *RepositoriesService) ListTagProtection(ctx context.Context, owner, repo return tagProtections, resp, nil } -// CreateTagProtection creates the tag protection of the specified repository. +// Deprecated: CreateTagProtection creates the tag protection of the specified repository. +// Deprecation notice: This operation is deprecated and will be removed after August 30, 2024. Use the "Repository Rulesets" endpoint instead: https://docs.github.com/rest/repos/rules#create-a-repository-ruleset // -// GitHub API docs: https://docs.github.com/rest/repos/tags#create-a-tag-protection-state-for-a-repository +// GitHub API docs: https://docs.github.com/rest/repos/tags#closing-down---create-a-tag-protection-state-for-a-repository // //meta:operation POST /repos/{owner}/{repo}/tags/protection func (s *RepositoriesService) CreateTagProtection(ctx context.Context, owner, repo, pattern string) (*TagProtection, *Response, error) { @@ -66,9 +68,10 @@ func (s *RepositoriesService) CreateTagProtection(ctx context.Context, owner, re return tagProtection, resp, nil } -// DeleteTagProtection deletes a tag protection from the specified repository. +// Deprecated: DeleteTagProtection deletes a tag protection from the specified repository. +// Deprecation notice: This operation is deprecated and will be removed after August 30, 2024. Use the "Repository Rulesets" endpoint instead: https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset // -// GitHub API docs: https://docs.github.com/rest/repos/tags#delete-a-tag-protection-state-for-a-repository +// GitHub API docs: https://docs.github.com/rest/repos/tags#closing-down---delete-a-tag-protection-state-for-a-repository // //meta:operation DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id} func (s *RepositoriesService) DeleteTagProtection(ctx context.Context, owner, repo string, tagProtectionID int64) (*Response, error) { diff --git a/vendor/github.com/google/go-github/v66/github/repos_traffic.go b/vendor/github.com/google/go-github/v68/github/repos_traffic.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/repos_traffic.go rename to vendor/github.com/google/go-github/v68/github/repos_traffic.go diff --git a/vendor/github.com/google/go-github/v66/github/scim.go b/vendor/github.com/google/go-github/v68/github/scim.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/scim.go rename to vendor/github.com/google/go-github/v68/github/scim.go diff --git a/vendor/github.com/google/go-github/v66/github/search.go b/vendor/github.com/google/go-github/v68/github/search.go similarity index 99% rename from vendor/github.com/google/go-github/v66/github/search.go rename to vendor/github.com/google/go-github/v68/github/search.go index 71efe87a..54bc6d5e 100644 --- a/vendor/github.com/google/go-github/v66/github/search.go +++ b/vendor/github.com/google/go-github/v68/github/search.go @@ -209,7 +209,7 @@ type Match struct { Indices []int `json:"indices,omitempty"` } -// TextMatch represents a text match for a SearchResult +// TextMatch represents a text match for a SearchResult. type TextMatch struct { ObjectURL *string `json:"object_url,omitempty"` ObjectType *string `json:"object_type,omitempty"` diff --git a/vendor/github.com/google/go-github/v66/github/secret_scanning.go b/vendor/github.com/google/go-github/v68/github/secret_scanning.go similarity index 93% rename from vendor/github.com/google/go-github/v66/github/secret_scanning.go rename to vendor/github.com/google/go-github/v68/github/secret_scanning.go index 9b2ad8cd..fc0fe0cd 100644 --- a/vendor/github.com/google/go-github/v66/github/secret_scanning.go +++ b/vendor/github.com/google/go-github/v68/github/secret_scanning.go @@ -44,15 +44,16 @@ type SecretScanningAlertLocation struct { // SecretScanningAlertLocationDetails represents the location details for a secret scanning alert. type SecretScanningAlertLocationDetails struct { - Path *string `json:"path,omitempty"` - Startline *int `json:"start_line,omitempty"` - EndLine *int `json:"end_line,omitempty"` - StartColumn *int `json:"start_column,omitempty"` - EndColumn *int `json:"end_column,omitempty"` - BlobSHA *string `json:"blob_sha,omitempty"` - BlobURL *string `json:"blob_url,omitempty"` - CommitSHA *string `json:"commit_sha,omitempty"` - CommitURL *string `json:"commit_url,omitempty"` + Path *string `json:"path,omitempty"` + Startline *int `json:"start_line,omitempty"` + EndLine *int `json:"end_line,omitempty"` + StartColumn *int `json:"start_column,omitempty"` + EndColumn *int `json:"end_column,omitempty"` + BlobSHA *string `json:"blob_sha,omitempty"` + BlobURL *string `json:"blob_url,omitempty"` + CommitSHA *string `json:"commit_sha,omitempty"` + CommitURL *string `json:"commit_url,omitempty"` + PullRequestCommentURL *string `json:"pull_request_comment_url,omitempty"` } // SecretScanningAlertListOptions specifies optional parameters to the SecretScanningService.ListAlertsForEnterprise method. @@ -88,6 +89,9 @@ type SecretScanningAlertUpdateOptions struct { // Required when the state is "resolved" and represents the reason for resolving the alert. // Can be one of: "false_positive", "wont_fix", "revoked", or "used_in_tests". Resolution *string `json:"resolution,omitempty"` + + // An optional comment when closing an alert. + ResolutionComment *string `json:"resolution_comment,omitempty"` } // ListAlertsForEnterprise lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. diff --git a/vendor/github.com/google/go-github/v66/github/security_advisories.go b/vendor/github.com/google/go-github/v68/github/security_advisories.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/security_advisories.go rename to vendor/github.com/google/go-github/v68/github/security_advisories.go diff --git a/vendor/github.com/google/go-github/v66/github/strings.go b/vendor/github.com/google/go-github/v68/github/strings.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/strings.go rename to vendor/github.com/google/go-github/v68/github/strings.go diff --git a/vendor/github.com/google/go-github/v66/github/teams.go b/vendor/github.com/google/go-github/v68/github/teams.go similarity index 94% rename from vendor/github.com/google/go-github/v66/github/teams.go rename to vendor/github.com/google/go-github/v68/github/teams.go index 10dbebcb..579e5b82 100644 --- a/vendor/github.com/google/go-github/v66/github/teams.go +++ b/vendor/github.com/google/go-github/v68/github/teams.go @@ -9,7 +9,6 @@ import ( "context" "fmt" "net/http" - "strings" ) // TeamsService provides access to the team-related functions @@ -31,10 +30,6 @@ type Team struct { // Permission specifies the default permission for repositories owned by the team. Permission *string `json:"permission,omitempty"` - // Permissions identifies the permissions that a team has on a given - // repository. This is only populated when calling Repositories.ListTeams. - Permissions map[string]bool `json:"permissions,omitempty"` - // Privacy identifies the level of privacy this team should have. // Possible values are: // secret - only visible to organization owners and members of this team @@ -53,6 +48,15 @@ type Team struct { // LDAPDN is only available in GitHub Enterprise and when the team // membership is synchronized with LDAP. LDAPDN *string `json:"ldap_dn,omitempty"` + + // Permissions identifies the permissions that a team has on a given + // repository. This is only populated when calling Repositories.ListTeams. + Permissions map[string]bool `json:"permissions,omitempty"` + + // Assignment identifies how a team was assigned to an organization role. Its + // possible values are: "direct", "indirect", "mixed". This is only populated when + // calling the ListTeamsAssignedToOrgRole method. + Assignment *string `json:"assignment,omitempty"` } func (t Team) String() string { @@ -107,6 +111,8 @@ func (s *TeamsService) ListTeams(ctx context.Context, org string, opts *ListOpti // GetTeamByID fetches a team, given a specified organization ID, by ID. // +// Deprecated: Use GetTeamBySlug instead. +// // GitHub API docs: https://docs.github.com/rest/teams/teams#get-a-team-by-name // //meta:operation GET /orgs/{org}/teams/{team_slug} @@ -233,6 +239,8 @@ func copyNewTeamWithoutParent(team *NewTeam) *newTeamNoParent { // EditTeamByID edits a team, given an organization ID, selected by ID. // +// Deprecated: Use EditTeamBySlug instead. +// // GitHub API docs: https://docs.github.com/rest/teams/teams#update-a-team // //meta:operation PATCH /orgs/{org}/teams/{team_slug} @@ -291,6 +299,8 @@ func (s *TeamsService) EditTeamBySlug(ctx context.Context, org, slug string, tea // DeleteTeamByID deletes a team referenced by ID. // +// Deprecated: Use DeleteTeamBySlug instead. +// // GitHub API docs: https://docs.github.com/rest/teams/teams#delete-a-team // //meta:operation DELETE /orgs/{org}/teams/{team_slug} @@ -321,6 +331,8 @@ func (s *TeamsService) DeleteTeamBySlug(ctx context.Context, org, slug string) ( // ListChildTeamsByParentID lists child teams for a parent team given parent ID. // +// Deprecated: Use ListChildTeamsByParentSlug instead. +// // GitHub API docs: https://docs.github.com/rest/teams/teams#list-child-teams // //meta:operation GET /orgs/{org}/teams/{team_slug}/teams @@ -373,6 +385,8 @@ func (s *TeamsService) ListChildTeamsByParentSlug(ctx context.Context, org, slug // ListTeamReposByID lists the repositories given a team ID that the specified team has access to. // +// Deprecated: Use ListTeamReposBySlug instead. +// // GitHub API docs: https://docs.github.com/rest/teams/teams#list-team-repositories // //meta:operation GET /orgs/{org}/teams/{team_slug}/repos @@ -389,8 +403,7 @@ func (s *TeamsService) ListTeamReposByID(ctx context.Context, orgID, teamID int6 } // TODO: remove custom Accept header when topics API fully launches. - headers := []string{mediaTypeTopicsPreview} - req.Header.Set("Accept", strings.Join(headers, ", ")) + req.Header.Set("Accept", mediaTypeTopicsPreview) var repos []*Repository resp, err := s.client.Do(ctx, req, &repos) @@ -419,8 +432,7 @@ func (s *TeamsService) ListTeamReposBySlug(ctx context.Context, org, slug string } // TODO: remove custom Accept header when topics API fully launches. - headers := []string{mediaTypeTopicsPreview} - req.Header.Set("Accept", strings.Join(headers, ", ")) + req.Header.Set("Accept", mediaTypeTopicsPreview) var repos []*Repository resp, err := s.client.Do(ctx, req, &repos) @@ -435,6 +447,8 @@ func (s *TeamsService) ListTeamReposBySlug(ctx context.Context, org, slug string // repository is managed by team, a Repository is returned which includes the // permissions team has for that repo. // +// Deprecated: Use IsTeamRepoBySlug instead. +// // GitHub API docs: https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository // //meta:operation GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo} @@ -445,8 +459,7 @@ func (s *TeamsService) IsTeamRepoByID(ctx context.Context, orgID, teamID int64, return nil, nil, err } - headers := []string{mediaTypeOrgPermissionRepo} - req.Header.Set("Accept", strings.Join(headers, ", ")) + req.Header.Set("Accept", mediaTypeOrgPermissionRepo) repository := new(Repository) resp, err := s.client.Do(ctx, req, repository) @@ -471,8 +484,7 @@ func (s *TeamsService) IsTeamRepoBySlug(ctx context.Context, org, slug, owner, r return nil, nil, err } - headers := []string{mediaTypeOrgPermissionRepo} - req.Header.Set("Accept", strings.Join(headers, ", ")) + req.Header.Set("Accept", mediaTypeOrgPermissionRepo) repository := new(Repository) resp, err := s.client.Do(ctx, req, repository) @@ -502,6 +514,8 @@ type TeamAddTeamRepoOptions struct { // The specified repository must be owned by the organization to which the team // belongs, or a direct fork of a repository owned by the organization. // +// Deprecated: Use AddTeamRepoBySlug instead. +// // GitHub API docs: https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions // //meta:operation PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo} @@ -536,6 +550,8 @@ func (s *TeamsService) AddTeamRepoBySlug(ctx context.Context, org, slug, owner, // team given the team ID. Note that this does not delete the repository, it // just removes it from the team. // +// Deprecated: Use RemoveTeamRepoBySlug instead. +// // GitHub API docs: https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team // //meta:operation DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo} @@ -594,10 +610,12 @@ func (s *TeamsService) ListUserTeams(ctx context.Context, opts *ListOptions) ([] // ListTeamProjectsByID lists the organization projects for a team given the team ID. // +// Deprecated: Use ListTeamProjectsBySlug instead. +// // GitHub API docs: https://docs.github.com/rest/teams/teams#list-team-projects // //meta:operation GET /orgs/{org}/teams/{team_slug}/projects -func (s *TeamsService) ListTeamProjectsByID(ctx context.Context, orgID, teamID int64) ([]*Project, *Response, error) { +func (s *TeamsService) ListTeamProjectsByID(ctx context.Context, orgID, teamID int64) ([]*ProjectV2, *Response, error) { u := fmt.Sprintf("organizations/%v/team/%v/projects", orgID, teamID) req, err := s.client.NewRequest("GET", u, nil) @@ -606,10 +624,9 @@ func (s *TeamsService) ListTeamProjectsByID(ctx context.Context, orgID, teamID i } // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeProjectsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) + req.Header.Set("Accept", mediaTypeProjectsPreview) - var projects []*Project + var projects []*ProjectV2 resp, err := s.client.Do(ctx, req, &projects) if err != nil { return nil, resp, err @@ -623,7 +640,7 @@ func (s *TeamsService) ListTeamProjectsByID(ctx context.Context, orgID, teamID i // GitHub API docs: https://docs.github.com/rest/teams/teams#list-team-projects // //meta:operation GET /orgs/{org}/teams/{team_slug}/projects -func (s *TeamsService) ListTeamProjectsBySlug(ctx context.Context, org, slug string) ([]*Project, *Response, error) { +func (s *TeamsService) ListTeamProjectsBySlug(ctx context.Context, org, slug string) ([]*ProjectV2, *Response, error) { u := fmt.Sprintf("orgs/%v/teams/%v/projects", org, slug) req, err := s.client.NewRequest("GET", u, nil) @@ -632,10 +649,9 @@ func (s *TeamsService) ListTeamProjectsBySlug(ctx context.Context, org, slug str } // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeProjectsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) + req.Header.Set("Accept", mediaTypeProjectsPreview) - var projects []*Project + var projects []*ProjectV2 resp, err := s.client.Do(ctx, req, &projects) if err != nil { return nil, resp, err @@ -647,10 +663,12 @@ func (s *TeamsService) ListTeamProjectsBySlug(ctx context.Context, org, slug str // ReviewTeamProjectsByID checks whether a team, given its ID, has read, write, or admin // permissions for an organization project. // +// Deprecated: Use ReviewTeamProjectsBySlug instead. +// // GitHub API docs: https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project // //meta:operation GET /orgs/{org}/teams/{team_slug}/projects/{project_id} -func (s *TeamsService) ReviewTeamProjectsByID(ctx context.Context, orgID, teamID, projectID int64) (*Project, *Response, error) { +func (s *TeamsService) ReviewTeamProjectsByID(ctx context.Context, orgID, teamID, projectID int64) (*ProjectV2, *Response, error) { u := fmt.Sprintf("organizations/%v/team/%v/projects/%v", orgID, teamID, projectID) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -658,10 +676,9 @@ func (s *TeamsService) ReviewTeamProjectsByID(ctx context.Context, orgID, teamID } // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeProjectsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) + req.Header.Set("Accept", mediaTypeProjectsPreview) - projects := &Project{} + projects := &ProjectV2{} resp, err := s.client.Do(ctx, req, &projects) if err != nil { return nil, resp, err @@ -676,7 +693,7 @@ func (s *TeamsService) ReviewTeamProjectsByID(ctx context.Context, orgID, teamID // GitHub API docs: https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project // //meta:operation GET /orgs/{org}/teams/{team_slug}/projects/{project_id} -func (s *TeamsService) ReviewTeamProjectsBySlug(ctx context.Context, org, slug string, projectID int64) (*Project, *Response, error) { +func (s *TeamsService) ReviewTeamProjectsBySlug(ctx context.Context, org, slug string, projectID int64) (*ProjectV2, *Response, error) { u := fmt.Sprintf("orgs/%v/teams/%v/projects/%v", org, slug, projectID) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -684,10 +701,9 @@ func (s *TeamsService) ReviewTeamProjectsBySlug(ctx context.Context, org, slug s } // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeProjectsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) + req.Header.Set("Accept", mediaTypeProjectsPreview) - projects := &Project{} + projects := &ProjectV2{} resp, err := s.client.Do(ctx, req, &projects) if err != nil { return nil, resp, err @@ -712,6 +728,8 @@ type TeamProjectOptions struct { // To add a project to a team or update the team's permission on a project, the // authenticated user must have admin permissions for the project. // +// Deprecated: Use AddTeamProjectBySlug instead. +// // GitHub API docs: https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions // //meta:operation PUT /orgs/{org}/teams/{team_slug}/projects/{project_id} @@ -723,8 +741,7 @@ func (s *TeamsService) AddTeamProjectByID(ctx context.Context, orgID, teamID, pr } // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeProjectsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) + req.Header.Set("Accept", mediaTypeProjectsPreview) return s.client.Do(ctx, req, nil) } @@ -744,8 +761,7 @@ func (s *TeamsService) AddTeamProjectBySlug(ctx context.Context, org, slug strin } // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeProjectsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) + req.Header.Set("Accept", mediaTypeProjectsPreview) return s.client.Do(ctx, req, nil) } @@ -757,6 +773,8 @@ func (s *TeamsService) AddTeamProjectBySlug(ctx context.Context, org, slug strin // or project. // Note: This endpoint removes the project from the team, but does not delete it. // +// Deprecated: Use RemoveTeamProjectBySlug instead. +// // GitHub API docs: https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team // //meta:operation DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id} @@ -768,8 +786,7 @@ func (s *TeamsService) RemoveTeamProjectByID(ctx context.Context, orgID, teamID, } // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeProjectsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) + req.Header.Set("Accept", mediaTypeProjectsPreview) return s.client.Do(ctx, req, nil) } @@ -792,8 +809,7 @@ func (s *TeamsService) RemoveTeamProjectBySlug(ctx context.Context, org, slug st } // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeProjectsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) + req.Header.Set("Accept", mediaTypeProjectsPreview) return s.client.Do(ctx, req, nil) } @@ -847,6 +863,8 @@ func (s *TeamsService) ListIDPGroupsInOrganization(ctx context.Context, org stri // ListIDPGroupsForTeamByID lists IDP groups connected to a team on GitHub // given organization and team IDs. // +// Deprecated: Use ListIDPGroupsForTeamBySlug instead. +// // GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/teams/team-sync#list-idp-groups-for-a-team // //meta:operation GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings @@ -893,6 +911,8 @@ func (s *TeamsService) ListIDPGroupsForTeamBySlug(ctx context.Context, org, slug // CreateOrUpdateIDPGroupConnectionsByID creates, updates, or removes a connection // between a team and an IDP group given organization and team IDs. // +// Deprecated: Use CreateOrUpdateIDPGroupConnectionsBySlug instead. +// // GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/teams/team-sync#create-or-update-idp-group-connections // //meta:operation PATCH /orgs/{org}/teams/{team_slug}/team-sync/group-mappings diff --git a/vendor/github.com/google/go-github/v66/github/teams_discussion_comments.go b/vendor/github.com/google/go-github/v68/github/teams_discussion_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/teams_discussion_comments.go rename to vendor/github.com/google/go-github/v68/github/teams_discussion_comments.go diff --git a/vendor/github.com/google/go-github/v66/github/teams_discussions.go b/vendor/github.com/google/go-github/v68/github/teams_discussions.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/teams_discussions.go rename to vendor/github.com/google/go-github/v68/github/teams_discussions.go diff --git a/vendor/github.com/google/go-github/v66/github/teams_members.go b/vendor/github.com/google/go-github/v68/github/teams_members.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/teams_members.go rename to vendor/github.com/google/go-github/v68/github/teams_members.go diff --git a/vendor/github.com/google/go-github/v66/github/timestamp.go b/vendor/github.com/google/go-github/v68/github/timestamp.go similarity index 95% rename from vendor/github.com/google/go-github/v66/github/timestamp.go rename to vendor/github.com/google/go-github/v68/github/timestamp.go index 00c1235e..dc1045cf 100644 --- a/vendor/github.com/google/go-github/v66/github/timestamp.go +++ b/vendor/github.com/google/go-github/v68/github/timestamp.go @@ -46,7 +46,7 @@ func (t *Timestamp) UnmarshalJSON(data []byte) (err error) { return } -// Equal reports whether t and u are equal based on time.Equal +// Equal reports whether t and u are equal based on time.Equal. func (t Timestamp) Equal(u Timestamp) bool { return t.Time.Equal(u.Time) } diff --git a/vendor/github.com/google/go-github/v66/github/users.go b/vendor/github.com/google/go-github/v68/github/users.go similarity index 94% rename from vendor/github.com/google/go-github/v66/github/users.go rename to vendor/github.com/google/go-github/v68/github/users.go index 51b2b219..60f1e06a 100644 --- a/vendor/github.com/google/go-github/v66/github/users.go +++ b/vendor/github.com/google/go-github/v68/github/users.go @@ -70,6 +70,14 @@ type User struct { // repository. These are only populated when calling Repositories.ListCollaborators. Permissions map[string]bool `json:"permissions,omitempty"` RoleName *string `json:"role_name,omitempty"` + + // Assignment identifies how a user was assigned to an organization role. Its + // possible values are: "direct", "indirect", "mixed". This is only populated when + // calling the ListUsersAssignedToOrgRole method. + Assignment *string `json:"assignment,omitempty"` + // InheritedFrom identifies the team that a user inherited their organization role + // from. This is only populated when calling the ListUsersAssignedToOrgRole method. + InheritedFrom *Team `json:"inherited_from,omitempty"` } func (u User) String() string { @@ -107,9 +115,9 @@ func (s *UsersService) Get(ctx context.Context, user string) (*User, *Response, // GetByID fetches a user. // -// Note: GetByID uses the undocumented GitHub API endpoint "GET /user/{user_id}". +// GitHub API docs: https://docs.github.com/rest/users/users#get-a-user-using-their-id // -//meta:operation GET /user/{user_id} +//meta:operation GET /user/{account_id} func (s *UsersService) GetByID(ctx context.Context, id int64) (*User, *Response, error) { u := fmt.Sprintf("user/%d", id) req, err := s.client.NewRequest("GET", u, nil) diff --git a/vendor/github.com/google/go-github/v66/github/users_administration.go b/vendor/github.com/google/go-github/v68/github/users_administration.go similarity index 91% rename from vendor/github.com/google/go-github/v66/github/users_administration.go rename to vendor/github.com/google/go-github/v68/github/users_administration.go index 2c86af73..c0aa3b64 100644 --- a/vendor/github.com/google/go-github/v66/github/users_administration.go +++ b/vendor/github.com/google/go-github/v68/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.12/rest/enterprise-admin/users#promote-a-user-to-be-a-site-administrator +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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.12/rest/enterprise-admin/users#demote-a-site-administrator +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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.12/rest/enterprise-admin/users#suspend-a-user +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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.12/rest/enterprise-admin/users#unsuspend-a-user +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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/v68/github/users_attestations.go b/vendor/github.com/google/go-github/v68/github/users_attestations.go new file mode 100644 index 00000000..18f60298 --- /dev/null +++ b/vendor/github.com/google/go-github/v68/github/users_attestations.go @@ -0,0 +1,40 @@ +// Copyright 2024 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" +) + +// ListAttestations returns a collection of artifact attestations +// with a given subject digest that are associated with repositories +// owned by a user. +// +// GitHub API docs: https://docs.github.com/rest/users/attestations#list-attestations +// +//meta:operation GET /users/{username}/attestations/{subject_digest} +func (s *UsersService) ListAttestations(ctx context.Context, user, subjectDigest string, opts *ListOptions) (*AttestationsResponse, *Response, error) { + var u = fmt.Sprintf("users/%v/attestations/%v", user, subjectDigest) + + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var attestations *AttestationsResponse + res, err := s.client.Do(ctx, req, &attestations) + if err != nil { + return nil, res, err + } + + return attestations, res, nil +} diff --git a/vendor/github.com/google/go-github/v66/github/users_blocking.go b/vendor/github.com/google/go-github/v68/github/users_blocking.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/users_blocking.go rename to vendor/github.com/google/go-github/v68/github/users_blocking.go diff --git a/vendor/github.com/google/go-github/v66/github/users_emails.go b/vendor/github.com/google/go-github/v68/github/users_emails.go similarity index 98% rename from vendor/github.com/google/go-github/v66/github/users_emails.go rename to vendor/github.com/google/go-github/v68/github/users_emails.go index 189187a7..3d0e1bfa 100644 --- a/vendor/github.com/google/go-github/v66/github/users_emails.go +++ b/vendor/github.com/google/go-github/v68/github/users_emails.go @@ -7,7 +7,7 @@ package github import "context" -// UserEmail represents user's email address +// UserEmail represents user's email address. type UserEmail struct { Email *string `json:"email,omitempty"` Primary *bool `json:"primary,omitempty"` diff --git a/vendor/github.com/google/go-github/v66/github/users_followers.go b/vendor/github.com/google/go-github/v68/github/users_followers.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/users_followers.go rename to vendor/github.com/google/go-github/v68/github/users_followers.go diff --git a/vendor/github.com/google/go-github/v66/github/users_gpg_keys.go b/vendor/github.com/google/go-github/v68/github/users_gpg_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/users_gpg_keys.go rename to vendor/github.com/google/go-github/v68/github/users_gpg_keys.go diff --git a/vendor/github.com/google/go-github/v66/github/users_keys.go b/vendor/github.com/google/go-github/v68/github/users_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/users_keys.go rename to vendor/github.com/google/go-github/v68/github/users_keys.go diff --git a/vendor/github.com/google/go-github/v66/github/users_packages.go b/vendor/github.com/google/go-github/v68/github/users_packages.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/users_packages.go rename to vendor/github.com/google/go-github/v68/github/users_packages.go diff --git a/vendor/github.com/google/go-github/v66/github/users_ssh_signing_keys.go b/vendor/github.com/google/go-github/v68/github/users_ssh_signing_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v66/github/users_ssh_signing_keys.go rename to vendor/github.com/google/go-github/v68/github/users_ssh_signing_keys.go diff --git a/vendor/github.com/google/go-github/v66/github/with_appengine.go b/vendor/github.com/google/go-github/v68/github/with_appengine.go similarity index 95% rename from vendor/github.com/google/go-github/v66/github/with_appengine.go rename to vendor/github.com/google/go-github/v68/github/with_appengine.go index 9053ce10..9bb95b8c 100644 --- a/vendor/github.com/google/go-github/v66/github/with_appengine.go +++ b/vendor/github.com/google/go-github/v68/github/with_appengine.go @@ -4,7 +4,6 @@ // license that can be found in the LICENSE file. //go:build appengine -// +build appengine // This file provides glue for making github work on App Engine. diff --git a/vendor/github.com/google/go-github/v66/github/without_appengine.go b/vendor/github.com/google/go-github/v68/github/without_appengine.go similarity index 95% rename from vendor/github.com/google/go-github/v66/github/without_appengine.go rename to vendor/github.com/google/go-github/v68/github/without_appengine.go index 0024ae41..bfdb18ec 100644 --- a/vendor/github.com/google/go-github/v66/github/without_appengine.go +++ b/vendor/github.com/google/go-github/v68/github/without_appengine.go @@ -4,7 +4,6 @@ // license that can be found in the LICENSE file. //go:build !appengine -// +build !appengine // This file provides glue for making github work without App Engine. diff --git a/vendor/modules.txt b/vendor/modules.txt index d1b111ac..6e0cb6d4 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -12,7 +12,7 @@ github.com/asaskevich/govalidator # github.com/beorn7/perks v1.0.1 ## explicit; go 1.11 github.com/beorn7/perks/quantile -# github.com/bradleyfalzon/ghinstallation/v2 v2.12.0 +# github.com/bradleyfalzon/ghinstallation/v2 v2.13.0 ## explicit; go 1.21 github.com/bradleyfalzon/ghinstallation/v2 # github.com/cespare/xxhash/v2 v2.3.0 @@ -100,9 +100,9 @@ github.com/golang-jwt/jwt/v5 # github.com/google/go-github/v57 v57.0.0 ## explicit; go 1.17 github.com/google/go-github/v57/github -# github.com/google/go-github/v66 v66.0.0 +# github.com/google/go-github/v68 v68.0.0 ## explicit; go 1.21 -github.com/google/go-github/v66/github +github.com/google/go-github/v68/github # github.com/google/go-querystring v1.1.0 ## explicit; go 1.10 github.com/google/go-querystring/query