From 1365be9426eddf1084f48952abfffdabef4b2ecb Mon Sep 17 00:00:00 2001 From: svc-excavator-bot Date: Thu, 2 Jan 2025 23:02:07 +0000 Subject: [PATCH] Excavator: Manage go module dependencies --- 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 | 7028 +++++++++-------- .../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 | 8 +- 176 files changed, 5853 insertions(+), 4565 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 3ef69d720..05ba3c314 100644 --- a/go.mod +++ b/go.mod @@ -23,12 +23,12 @@ require ( github.com/Microsoft/go-winio v0.5.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bluekeyes/hatpear v0.1.2 // indirect - github.com/bradleyfalzon/ghinstallation/v2 v2.12.0 // indirect + github.com/bradleyfalzon/ghinstallation/v2 v2.13.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang-jwt/jwt/v4 v4.5.1 // indirect github.com/golang/protobuf v1.5.3 // 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/hashicorp/golang-lru v0.6.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect diff --git a/go.sum b/go.sum index 9d225a40b..e0552f422 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,8 @@ 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/bluekeyes/hatpear v0.1.2 h1:D5dz9W/W5YxKlmqn7hRJi218+yVkXylhs/R6Ns/jj4A= github.com/bluekeyes/hatpear v0.1.2/go.mod h1:2bh+rl4wLhqzzL0hT7Q4SVGXIivrE8oKgH2WYM3ubt0= -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/c2h5oh/datasize v0.0.0-20171227191756-4eba002a5eae h1:2Zmk+8cNvAGuY8AyvZuWpUdpQUAXwfom4ReVMe/CTIo= github.com/c2h5oh/datasize v0.0.0-20171227191756-4eba002a5eae/go.mod h1:S/7n9copUssQ56c7aAgHqftWO4LTf4xY6CGWt8Bc+3M= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -32,10 +32,10 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 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/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/v67 v67.0.0 h1:g11NDAmfaBaCO8qYdI9fsmbaRipHNWRIU/2YGvlh4rg= github.com/google/go-github/v67 v67.0.0/go.mod h1:zH3K7BxjFndr9QSeFibx4lTKkYS3K9nDanoI1NjaOtY= +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/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= diff --git a/vendor/github.com/bradleyfalzon/ghinstallation/v2/transport.go b/vendor/github.com/bradleyfalzon/ghinstallation/v2/transport.go index 8541d206a..c153061b7 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 2697b7185..000000000 --- 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 454d8cf1c..000000000 --- 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 c5c42f893..000000000 --- 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 9269d4e95..000000000 --- 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 0ab57e5c2..000000000 --- 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 d21164509..a6104ffa9 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 f804b809b..e05a9a840 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 a1f453f3c..b2ee32f61 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 ec519838e..cba85c100 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 e93c2266b..adf55d641 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 cb11fe47f..8b50756b0 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 704126251..f012d7984 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 82e568a0a..6877cef46 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 2f74c2c26..3dd392d08 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 000000000..618d5d73f --- /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 9bfff7330..8b8a67d55 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 71e50c15f..711be207c 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 7d7f9ef81..aba057417 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 000000000..a2b2aa099 --- /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 7196394fb..4a0f163a0 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 93ef232f6..b7a03dd98 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 000000000..bc5ab55a3 --- /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 fbe56b20d..37e62c2fa 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 573d38be5..d7ed3ecbe 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 ad7b10d7d..91eb6dd43 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 f8e303c43..0800c02c6 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,31 +5182,127 @@ func (c *CustomProperty) GetValuesEditableBy() string { return *c.ValuesEditableBy } -// GetBaseRole returns the BaseRole field if it's non-nil, zero value otherwise. -func (c *CustomRepoRoles) GetBaseRole() string { - if c == nil || c.BaseRole == nil { +// 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.BaseRole + return *c.Action } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (c *CustomRepoRoles) GetCreatedAt() Timestamp { - if c == nil || c.CreatedAt == nil { - return Timestamp{} +// GetDefinition returns the Definition field. +func (c *CustomPropertyEvent) GetDefinition() *CustomProperty { + if c == nil { + return nil } - return *c.CreatedAt + return c.Definition } -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (c *CustomRepoRoles) GetDescription() string { - if c == nil || c.Description == nil { - return "" +// GetEnterprise returns the Enterprise field. +func (c *CustomPropertyEvent) GetEnterprise() *Enterprise { + if c == nil { + return nil } - return *c.Description + return c.Enterprise } -// GetID returns the ID field if it's non-nil, zero value otherwise. +// 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 { + return "" + } + return *c.BaseRole +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (c *CustomRepoRoles) GetCreatedAt() Timestamp { + if c == nil || c.CreatedAt == nil { + return Timestamp{} + } + return *c.CreatedAt +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (c *CustomRepoRoles) GetDescription() string { + if c == nil || c.Description == nil { + return "" + } + return *c.Description +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. func (c *CustomRepoRoles) GetID() int64 { if c == nil || c.ID == nil { return 0 @@ -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,40 +15718,136 @@ 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 { +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (p *ProjectBody) GetFrom() string { + if p == nil || p.From == nil { return "" } - return *p.Body + return *p.From } -// 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 "" +// GetNote returns the Note field. +func (p *ProjectCardChange) GetNote() *ProjectCardNote { + if p == nil { + return nil } - return *p.ColumnsURL + return p.Note } -// 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 +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (p *ProjectCardNote) GetFrom() string { + if p == nil || p.From == nil { + return "" + } + return *p.From +} + +// GetBody returns the Body field. +func (p *ProjectChange) GetBody() *ProjectBody { + if p == nil { + return nil + } + return p.Body +} + +// GetName returns the Name field. +func (p *ProjectChange) GetName() *ProjectName { + if p == nil { + return nil + } + return p.Name +} + +// GetName returns the Name field. +func (p *ProjectColumnChange) GetName() *ProjectColumnName { + if p == nil { + return nil + } + return p.Name +} + +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (p *ProjectColumnName) GetFrom() string { + if p == nil || p.From == nil { + return "" + } + return *p.From +} + +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (p *ProjectName) GetFrom() string { + if p == nil || p.From == nil { + return "" + } + return *p.From +} + +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (p *ProjectV2) GetBody() string { + if p == nil || p.Body == nil { + return "" + } + return *p.Body +} + +// GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise. +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 *ProjectV2) GetCreatedAt() Timestamp { + if p == nil || p.CreatedAt == nil { + return Timestamp{} + } + return *p.CreatedAt } // GetCreator returns the Creator field. -func (p *Project) GetCreator() *User { +func (p *ProjectV2) GetCreator() *User { if p == nil { return nil } return p.Creator } +// GetDeletedAt returns the DeletedAt field if it's non-nil, zero value otherwise. +func (p *ProjectV2) GetDeletedAt() Timestamp { + if p == nil || p.DeletedAt == nil { + return Timestamp{} + } + return *p.DeletedAt +} + +// GetDeletedBy returns the DeletedBy field. +func (p *ProjectV2) GetDeletedBy() *User { + if p == nil { + return nil + } + return p.DeletedBy +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +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 *Project) GetHTMLURL() string { +func (p *ProjectV2) GetHTMLURL() string { if p == nil || p.HTMLURL == nil { return "" } @@ -15079,7 +15855,7 @@ func (p *Project) GetHTMLURL() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *Project) GetID() int64 { +func (p *ProjectV2) GetID() int64 { if p == nil || p.ID == nil { return 0 } @@ -15087,7 +15863,7 @@ func (p *Project) GetID() int64 { } // GetName returns the Name field if it's non-nil, zero value otherwise. -func (p *Project) GetName() string { +func (p *ProjectV2) GetName() string { if p == nil || p.Name == nil { return "" } @@ -15095,7 +15871,7 @@ func (p *Project) GetName() string { } // GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *Project) GetNodeID() string { +func (p *ProjectV2) GetNodeID() string { if p == nil || p.NodeID == nil { return "" } @@ -15103,7 +15879,7 @@ func (p *Project) GetNodeID() string { } // GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (p *Project) GetNumber() int { +func (p *ProjectV2) GetNumber() int { if p == nil || p.Number == nil { return 0 } @@ -15111,15 +15887,23 @@ func (p *Project) GetNumber() int { } // GetOrganizationPermission returns the OrganizationPermission field if it's non-nil, zero value otherwise. -func (p *Project) GetOrganizationPermission() string { +func (p *ProjectV2) GetOrganizationPermission() string { if p == nil || p.OrganizationPermission == nil { return "" } return *p.OrganizationPermission } +// GetOwner returns the Owner field. +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 *Project) GetOwnerURL() string { +func (p *ProjectV2) GetOwnerURL() string { if p == nil || p.OwnerURL == nil { return "" } @@ -15127,23 +15911,47 @@ func (p *Project) GetOwnerURL() string { } // GetPrivate returns the Private field if it's non-nil, zero value otherwise. -func (p *Project) GetPrivate() bool { +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 *ProjectV2) GetPublic() bool { + if p == nil || p.Public == nil { + return false + } + return *p.Public +} + +// GetShortDescription returns the ShortDescription field if it's non-nil, zero value otherwise. +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 *Project) GetState() string { +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 *ProjectV2) GetTitle() string { + if p == nil || p.Title == nil { + return "" + } + return *p.Title +} + // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *Project) GetUpdatedAt() Timestamp { +func (p *ProjectV2) GetUpdatedAt() Timestamp { if p == nil || p.UpdatedAt == nil { return Timestamp{} } @@ -15151,63 +15959,79 @@ func (p *Project) GetUpdatedAt() Timestamp { } // GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *Project) GetURL() string { +func (p *ProjectV2) 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 { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (p *ProjectV2Event) GetAction() string { + if p == nil || p.Action == nil { return "" } - return *p.From + return *p.Action } -// 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 +// GetInstallation returns the Installation field. +func (p *ProjectV2Event) GetInstallation() *Installation { + if p == nil { + return nil } - return *p.Archived + return p.Installation } -// 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 +// GetOrg returns the Org field. +func (p *ProjectV2Event) GetOrg() *Organization { + if p == nil { + return nil } - return *p.ColumnID + return p.Org } -// 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 "" +// GetProjectsV2 returns the ProjectsV2 field. +func (p *ProjectV2Event) GetProjectsV2() *ProjectV2 { + if p == nil { + return nil + } + return p.ProjectsV2 +} + +// GetSender returns the Sender field. +func (p *ProjectV2Event) GetSender() *User { + if p == nil { + return nil + } + return p.Sender +} + +// GetArchivedAt returns the ArchivedAt field if it's non-nil, zero value otherwise. +func (p *ProjectV2Item) GetArchivedAt() Timestamp { + if p == nil || p.ArchivedAt == nil { + return Timestamp{} } - return *p.ColumnName + return *p.ArchivedAt } -// GetColumnURL returns the ColumnURL field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetColumnURL() string { - if p == nil || p.ColumnURL == nil { +// GetContentNodeID returns the ContentNodeID field if it's non-nil, zero value otherwise. +func (p *ProjectV2Item) GetContentNodeID() string { + if p == nil || p.ContentNodeID == nil { return "" } - return *p.ColumnURL + return *p.ContentNodeID } -// GetContentURL returns the ContentURL field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetContentURL() string { - if p == nil || p.ContentURL == nil { +// GetContentType returns the ContentType field if it's non-nil, zero value otherwise. +func (p *ProjectV2Item) GetContentType() string { + if p == nil || p.ContentType == nil { return "" } - return *p.ContentURL + return *p.ContentType } // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetCreatedAt() Timestamp { +func (p *ProjectV2Item) GetCreatedAt() Timestamp { if p == nil || p.CreatedAt == nil { return Timestamp{} } @@ -15215,7 +16039,7 @@ func (p *ProjectCard) GetCreatedAt() Timestamp { } // GetCreator returns the Creator field. -func (p *ProjectCard) GetCreator() *User { +func (p *ProjectV2Item) GetCreator() *User { if p == nil { return nil } @@ -15223,7 +16047,7 @@ func (p *ProjectCard) GetCreator() *User { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetID() int64 { +func (p *ProjectV2Item) GetID() int64 { if p == nil || p.ID == nil { return 0 } @@ -15231,87 +16055,47 @@ func (p *ProjectCard) GetID() int64 { } // GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetNodeID() string { +func (p *ProjectV2Item) 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 { +// GetProjectNodeID returns the ProjectNodeID field if it's non-nil, zero value otherwise. +func (p *ProjectV2Item) GetProjectNodeID() string { + if p == nil || p.ProjectNodeID == nil { return "" } - return *p.ProjectURL + return *p.ProjectNodeID } // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetUpdatedAt() Timestamp { +func (p *ProjectV2Item) 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 { +// GetArchivedAt returns the ArchivedAt field. +func (p *ProjectV2ItemChange) GetArchivedAt() *ArchivedAt { if p == nil { return nil } - return p.Note + return p.ArchivedAt } // GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *ProjectCardEvent) GetAction() string { +func (p *ProjectV2ItemEvent) 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 { +func (p *ProjectV2ItemEvent) GetChanges() *ProjectV2ItemChange { if p == nil { return nil } @@ -15319,7 +16103,7 @@ func (p *ProjectCardEvent) GetChanges() *ProjectCardChange { } // GetInstallation returns the Installation field. -func (p *ProjectCardEvent) GetInstallation() *Installation { +func (p *ProjectV2ItemEvent) GetInstallation() *Installation { if p == nil { return nil } @@ -15327,399 +16111,335 @@ func (p *ProjectCardEvent) GetInstallation() *Installation { } // GetOrg returns the Org field. -func (p *ProjectCardEvent) GetOrg() *Organization { +func (p *ProjectV2ItemEvent) GetOrg() *Organization { if p == nil { return nil } return p.Org } -// GetProjectCard returns the ProjectCard field. -func (p *ProjectCardEvent) GetProjectCard() *ProjectCard { +// GetProjectV2Item returns the ProjectV2Item field. +func (p *ProjectV2ItemEvent) GetProjectV2Item() *ProjectV2Item { if p == nil { return nil } - return p.ProjectCard + return p.ProjectV2Item } -// GetRepo returns the Repo field. -func (p *ProjectCardEvent) GetRepo() *Repository { +// GetSender returns the Sender field. +func (p *ProjectV2ItemEvent) GetSender() *User { if p == nil { return nil } - return p.Repo + return p.Sender } -// GetSender returns the Sender field. -func (p *ProjectCardEvent) GetSender() *User { +// GetAllowDeletions returns the AllowDeletions field. +func (p *Protection) GetAllowDeletions() *AllowDeletions { if p == nil { return nil } - return p.Sender + return p.AllowDeletions } -// 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 "" +// GetAllowForcePushes returns the AllowForcePushes field. +func (p *Protection) GetAllowForcePushes() *AllowForcePushes { + if p == nil { + return nil } - return *p.ArchivedState + return p.AllowForcePushes } -// GetFrom returns the From field if it's non-nil, zero value otherwise. -func (p *ProjectCardNote) GetFrom() string { - if p == nil || p.From == nil { - return "" +// GetAllowForkSyncing returns the AllowForkSyncing field. +func (p *Protection) GetAllowForkSyncing() *AllowForkSyncing { + if p == nil { + return nil } - return *p.From + return p.AllowForkSyncing } -// 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 +// GetBlockCreations returns the BlockCreations field. +func (p *Protection) GetBlockCreations() *BlockCreations { + if p == nil { + return nil } - return *p.Archived + return p.BlockCreations } -// GetBody returns the Body field. -func (p *ProjectChange) GetBody() *ProjectBody { +// GetEnforceAdmins returns the EnforceAdmins field. +func (p *Protection) GetEnforceAdmins() *AdminEnforcement { if p == nil { return nil } - return p.Body + return p.EnforceAdmins } -// GetName returns the Name field. -func (p *ProjectChange) GetName() *ProjectName { +// GetLockBranch returns the LockBranch field. +func (p *Protection) GetLockBranch() *LockBranch { if p == nil { return nil } - 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 + return p.LockBranch } -// 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{} +// GetRequiredConversationResolution returns the RequiredConversationResolution field. +func (p *Protection) GetRequiredConversationResolution() *RequiredConversationResolution { + if p == nil { + return nil } - return *p.CreatedAt + return p.RequiredConversationResolution } -// 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 +// GetRequiredPullRequestReviews returns the RequiredPullRequestReviews field. +func (p *Protection) GetRequiredPullRequestReviews() *PullRequestReviewsEnforcement { + if p == nil { + return nil } - return *p.ID + return p.RequiredPullRequestReviews } -// 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 "" +// GetRequiredSignatures returns the RequiredSignatures field. +func (p *Protection) GetRequiredSignatures() *SignaturesProtectedBranch { + if p == nil { + return nil } - return *p.Name + return p.RequiredSignatures } -// 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 "" +// GetRequiredStatusChecks returns the RequiredStatusChecks field. +func (p *Protection) GetRequiredStatusChecks() *RequiredStatusChecks { + if p == nil { + return nil } - return *p.NodeID + return p.RequiredStatusChecks } -// 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 "" +// GetRequireLinearHistory returns the RequireLinearHistory field. +func (p *Protection) GetRequireLinearHistory() *RequireLinearHistory { + if p == nil { + return nil } - return *p.ProjectURL + return p.RequireLinearHistory } -// 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{} +// GetRestrictions returns the Restrictions field. +func (p *Protection) GetRestrictions() *BranchRestrictions { + if p == nil { + return nil } - return *p.UpdatedAt + return p.Restrictions } // GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetURL() string { +func (p *Protection) GetURL() string { if p == nil || p.URL == nil { return "" } return *p.URL } -// GetName returns the Name field. -func (p *ProjectColumnChange) GetName() *ProjectColumnName { +// GetAdminEnforced returns the AdminEnforced field. +func (p *ProtectionChanges) GetAdminEnforced() *AdminEnforcedChanges { if p == nil { return nil } - 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 + return p.AdminEnforced } -// GetChanges returns the Changes field. -func (p *ProjectColumnEvent) GetChanges() *ProjectColumnChange { +// GetAllowDeletionsEnforcementLevel returns the AllowDeletionsEnforcementLevel field. +func (p *ProtectionChanges) GetAllowDeletionsEnforcementLevel() *AllowDeletionsEnforcementLevelChanges { if p == nil { return nil } - return p.Changes + return p.AllowDeletionsEnforcementLevel } -// GetInstallation returns the Installation field. -func (p *ProjectColumnEvent) GetInstallation() *Installation { +// GetAuthorizedActorNames returns the AuthorizedActorNames field. +func (p *ProtectionChanges) GetAuthorizedActorNames() *AuthorizedActorNames { if p == nil { return nil } - return p.Installation + return p.AuthorizedActorNames } -// GetOrg returns the Org field. -func (p *ProjectColumnEvent) GetOrg() *Organization { +// GetAuthorizedActorsOnly returns the AuthorizedActorsOnly field. +func (p *ProtectionChanges) GetAuthorizedActorsOnly() *AuthorizedActorsOnly { if p == nil { return nil } - return p.Org + return p.AuthorizedActorsOnly } -// GetProjectColumn returns the ProjectColumn field. -func (p *ProjectColumnEvent) GetProjectColumn() *ProjectColumn { +// GetAuthorizedDismissalActorsOnly returns the AuthorizedDismissalActorsOnly field. +func (p *ProtectionChanges) GetAuthorizedDismissalActorsOnly() *AuthorizedDismissalActorsOnlyChanges { if p == nil { return nil } - return p.ProjectColumn + return p.AuthorizedDismissalActorsOnly } -// GetRepo returns the Repo field. -func (p *ProjectColumnEvent) GetRepo() *Repository { +// GetCreateProtected returns the CreateProtected field. +func (p *ProtectionChanges) GetCreateProtected() *CreateProtectedChanges { if p == nil { return nil } - return p.Repo + return p.CreateProtected } -// GetSender returns the Sender field. -func (p *ProjectColumnEvent) GetSender() *User { +// GetDismissStaleReviewsOnPush returns the DismissStaleReviewsOnPush field. +func (p *ProtectionChanges) GetDismissStaleReviewsOnPush() *DismissStaleReviewsOnPushChanges { 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 { - return "" - } - return *p.From + return p.DismissStaleReviewsOnPush } -// 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 "" +// GetLinearHistoryRequirementEnforcementLevel returns the LinearHistoryRequirementEnforcementLevel field. +func (p *ProtectionChanges) GetLinearHistoryRequirementEnforcementLevel() *LinearHistoryRequirementEnforcementLevelChanges { + if p == nil { + return nil } - return *p.Action + return p.LinearHistoryRequirementEnforcementLevel } -// GetChanges returns the Changes field. -func (p *ProjectEvent) GetChanges() *ProjectChange { +// GetPullRequestReviewsEnforcementLevel returns the PullRequestReviewsEnforcementLevel field. +func (p *ProtectionChanges) GetPullRequestReviewsEnforcementLevel() *PullRequestReviewsEnforcementLevelChanges { if p == nil { return nil } - return p.Changes + return p.PullRequestReviewsEnforcementLevel } -// GetInstallation returns the Installation field. -func (p *ProjectEvent) GetInstallation() *Installation { +// GetRequireCodeOwnerReview returns the RequireCodeOwnerReview field. +func (p *ProtectionChanges) GetRequireCodeOwnerReview() *RequireCodeOwnerReviewChanges { if p == nil { return nil } - return p.Installation + return p.RequireCodeOwnerReview } -// GetOrg returns the Org field. -func (p *ProjectEvent) GetOrg() *Organization { +// GetRequiredConversationResolutionLevel returns the RequiredConversationResolutionLevel field. +func (p *ProtectionChanges) GetRequiredConversationResolutionLevel() *RequiredConversationResolutionLevelChanges { if p == nil { return nil } - return p.Org + return p.RequiredConversationResolutionLevel } -// GetProject returns the Project field. -func (p *ProjectEvent) GetProject() *Project { +// GetRequiredDeploymentsEnforcementLevel returns the RequiredDeploymentsEnforcementLevel field. +func (p *ProtectionChanges) GetRequiredDeploymentsEnforcementLevel() *RequiredDeploymentsEnforcementLevelChanges { if p == nil { return nil } - return p.Project + return p.RequiredDeploymentsEnforcementLevel } -// GetRepo returns the Repo field. -func (p *ProjectEvent) GetRepo() *Repository { +// GetRequiredStatusChecks returns the RequiredStatusChecks field. +func (p *ProtectionChanges) GetRequiredStatusChecks() *RequiredStatusChecksChanges { if p == nil { return nil } - return p.Repo + return p.RequiredStatusChecks } -// GetSender returns the Sender field. -func (p *ProjectEvent) GetSender() *User { +// GetRequiredStatusChecksEnforcementLevel returns the RequiredStatusChecksEnforcementLevel field. +func (p *ProtectionChanges) GetRequiredStatusChecksEnforcementLevel() *RequiredStatusChecksEnforcementLevelChanges { if p == nil { return nil } - return p.Sender + return p.RequiredStatusChecksEnforcementLevel } -// GetFrom returns the From field if it's non-nil, zero value otherwise. -func (p *ProjectName) GetFrom() string { - if p == nil || p.From == nil { - return "" +// GetSignatureRequirementEnforcementLevel returns the SignatureRequirementEnforcementLevel field. +func (p *ProtectionChanges) GetSignatureRequirementEnforcementLevel() *SignatureRequirementEnforcementLevelChanges { + if p == nil { + return nil } - return *p.From + return p.SignatureRequirementEnforcementLevel } -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (p *ProjectOptions) GetBody() string { - if p == nil || p.Body == nil { - return "" +// GetAllowDeletions returns the AllowDeletions field if it's non-nil, zero value otherwise. +func (p *ProtectionRequest) GetAllowDeletions() bool { + if p == nil || p.AllowDeletions == nil { + return false } - return *p.Body + return *p.AllowDeletions } -// 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 "" +// GetAllowForcePushes returns the AllowForcePushes field if it's non-nil, zero value otherwise. +func (p *ProtectionRequest) GetAllowForcePushes() bool { + if p == nil || p.AllowForcePushes == nil { + return false } - return *p.Name + return *p.AllowForcePushes } -// 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 "" +// GetAllowForkSyncing returns the AllowForkSyncing field if it's non-nil, zero value otherwise. +func (p *ProtectionRequest) GetAllowForkSyncing() bool { + if p == nil || p.AllowForkSyncing == nil { + return false } - return *p.OrganizationPermission + return *p.AllowForkSyncing } -// GetPrivate returns the Private field if it's non-nil, zero value otherwise. -func (p *ProjectOptions) GetPrivate() bool { - if p == nil || p.Private == nil { +// GetBlockCreations returns the BlockCreations field if it's non-nil, zero value otherwise. +func (p *ProtectionRequest) GetBlockCreations() bool { + if p == nil || p.BlockCreations == nil { return false } - return *p.Private + return *p.BlockCreations } -// 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 "" +// GetLockBranch returns the LockBranch field if it's non-nil, zero value otherwise. +func (p *ProtectionRequest) GetLockBranch() bool { + if p == nil || p.LockBranch == nil { + return false } - return *p.State + return *p.LockBranch } -// 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 "" +// GetRequiredConversationResolution returns the RequiredConversationResolution field if it's non-nil, zero value otherwise. +func (p *ProtectionRequest) GetRequiredConversationResolution() bool { + if p == nil || p.RequiredConversationResolution == nil { + return false } - return *p.Permission + return *p.RequiredConversationResolution } -// GetUser returns the User field. -func (p *ProjectPermissionLevel) GetUser() *User { +// GetRequiredPullRequestReviews returns the RequiredPullRequestReviews field. +func (p *ProtectionRequest) GetRequiredPullRequestReviews() *PullRequestReviewsEnforcementRequest { if p == nil { return nil } - return p.User + return p.RequiredPullRequestReviews } -// GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetClosedAt() Timestamp { - if p == nil || p.ClosedAt == nil { - return Timestamp{} +// GetRequiredStatusChecks returns the RequiredStatusChecks field. +func (p *ProtectionRequest) GetRequiredStatusChecks() *RequiredStatusChecks { + if p == nil { + return nil } - return *p.ClosedAt + return p.RequiredStatusChecks } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetCreatedAt() Timestamp { - if p == nil || p.CreatedAt == nil { - return Timestamp{} +// GetRequireLinearHistory returns the RequireLinearHistory field if it's non-nil, zero value otherwise. +func (p *ProtectionRequest) GetRequireLinearHistory() bool { + if p == nil || p.RequireLinearHistory == nil { + return false } - return *p.CreatedAt + return *p.RequireLinearHistory } -// GetCreator returns the Creator field. -func (p *ProjectsV2) GetCreator() *User { +// GetRestrictions returns the Restrictions field. +func (p *ProtectionRequest) GetRestrictions() *BranchRestrictionsRequest { if p == nil { return nil } - return p.Creator -} - -// GetDeletedAt returns the DeletedAt field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetDeletedAt() Timestamp { - if p == nil || p.DeletedAt == nil { - return Timestamp{} - } - return *p.DeletedAt -} - -// GetDeletedBy returns the DeletedBy field. -func (p *ProjectsV2) GetDeletedBy() *User { - if p == nil { - return nil - } - return p.DeletedBy -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetDescription() string { - if p == nil || p.Description == nil { - return "" - } - return *p.Description + return p.Restrictions } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetID() int64 { +func (p *ProtectionRule) GetID() int64 { if p == nil || p.ID == nil { return 0 } @@ -15727,71 +16447,39 @@ func (p *ProjectsV2) GetID() int64 { } // GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetNodeID() string { +func (p *ProtectionRule) 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 *ProjectsV2) GetNumber() int { - if p == nil || p.Number == nil { - return 0 - } - return *p.Number -} - -// GetOwner returns the Owner field. -func (p *ProjectsV2) GetOwner() *User { - if p == nil { - return nil - } - return p.Owner -} - -// GetPublic returns the Public field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetPublic() bool { - if p == nil || p.Public == nil { +// GetPreventSelfReview returns the PreventSelfReview field if it's non-nil, zero value otherwise. +func (p *ProtectionRule) GetPreventSelfReview() bool { + if p == nil || p.PreventSelfReview == nil { return false } - return *p.Public -} - -// GetShortDescription returns the ShortDescription field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetShortDescription() string { - if p == nil || p.ShortDescription == nil { - return "" - } - return *p.ShortDescription + return *p.PreventSelfReview } -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetTitle() string { - if p == nil || p.Title == nil { +// GetType returns the Type field if it's non-nil, zero value otherwise. +func (p *ProtectionRule) GetType() string { + if p == nil || p.Type == nil { return "" } - return *p.Title -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectsV2) GetUpdatedAt() Timestamp { - if p == nil || p.UpdatedAt == nil { - return Timestamp{} - } - return *p.UpdatedAt + return *p.Type } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *ProjectV2Event) GetAction() string { - if p == nil || p.Action == nil { - return "" +// GetWaitTimer returns the WaitTimer field if it's non-nil, zero value otherwise. +func (p *ProtectionRule) GetWaitTimer() int { + if p == nil || p.WaitTimer == nil { + return 0 } - return *p.Action + return *p.WaitTimer } // GetInstallation returns the Installation field. -func (p *ProjectV2Event) GetInstallation() *Installation { +func (p *PublicEvent) GetInstallation() *Installation { if p == nil { return nil } @@ -15799,999 +16487,887 @@ func (p *ProjectV2Event) GetInstallation() *Installation { } // GetOrg returns the Org field. -func (p *ProjectV2Event) GetOrg() *Organization { +func (p *PublicEvent) GetOrg() *Organization { if p == nil { return nil } return p.Org } -// GetProjectsV2 returns the ProjectsV2 field. -func (p *ProjectV2Event) GetProjectsV2() *ProjectsV2 { +// GetRepo returns the Repo field. +func (p *PublicEvent) GetRepo() *Repository { if p == nil { return nil } - return p.ProjectsV2 + return p.Repo } // GetSender returns the Sender field. -func (p *ProjectV2Event) GetSender() *User { +func (p *PublicEvent) GetSender() *User { if p == nil { return nil } return p.Sender } -// GetArchivedAt returns the ArchivedAt field if it's non-nil, zero value otherwise. -func (p *ProjectV2Item) GetArchivedAt() Timestamp { - if p == nil || p.ArchivedAt == nil { - return Timestamp{} +// GetKey returns the Key field if it's non-nil, zero value otherwise. +func (p *PublicKey) GetKey() string { + if p == nil || p.Key == nil { + return "" } - return *p.ArchivedAt + return *p.Key } -// GetContentNodeID returns the ContentNodeID field if it's non-nil, zero value otherwise. -func (p *ProjectV2Item) GetContentNodeID() string { - if p == nil || p.ContentNodeID == nil { +// GetKeyID returns the KeyID field if it's non-nil, zero value otherwise. +func (p *PublicKey) GetKeyID() string { + if p == nil || p.KeyID == nil { return "" } - return *p.ContentNodeID + return *p.KeyID } -// GetContentType returns the ContentType field if it's non-nil, zero value otherwise. -func (p *ProjectV2Item) GetContentType() string { - if p == nil || p.ContentType == nil { +// GetActiveLockReason returns the ActiveLockReason field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetActiveLockReason() string { + if p == nil || p.ActiveLockReason == nil { return "" } - return *p.ContentType + return *p.ActiveLockReason } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectV2Item) GetCreatedAt() Timestamp { - if p == nil || p.CreatedAt == nil { - return Timestamp{} +// GetAdditions returns the Additions field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetAdditions() int { + if p == nil || p.Additions == nil { + return 0 } - return *p.CreatedAt + return *p.Additions } -// GetCreator returns the Creator field. -func (p *ProjectV2Item) GetCreator() *User { +// GetAssignee returns the Assignee field. +func (p *PullRequest) GetAssignee() *User { if p == nil { return nil } - return p.Creator -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *ProjectV2Item) 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 *ProjectV2Item) GetNodeID() string { - if p == nil || p.NodeID == nil { - return "" - } - return *p.NodeID + return p.Assignee } -// GetProjectNodeID returns the ProjectNodeID field if it's non-nil, zero value otherwise. -func (p *ProjectV2Item) GetProjectNodeID() string { - if p == nil || p.ProjectNodeID == nil { +// GetAuthorAssociation returns the AuthorAssociation field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetAuthorAssociation() string { + if p == nil || p.AuthorAssociation == nil { return "" } - return *p.ProjectNodeID + return *p.AuthorAssociation } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectV2Item) GetUpdatedAt() Timestamp { - if p == nil || p.UpdatedAt == nil { - return Timestamp{} +// GetAutoMerge returns the AutoMerge field. +func (p *PullRequest) GetAutoMerge() *PullRequestAutoMerge { + if p == nil { + return nil } - return *p.UpdatedAt + return p.AutoMerge } -// GetArchivedAt returns the ArchivedAt field. -func (p *ProjectV2ItemChange) GetArchivedAt() *ArchivedAt { +// GetBase returns the Base field. +func (p *PullRequest) GetBase() *PullRequestBranch { if p == nil { return nil } - return p.ArchivedAt + return p.Base } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *ProjectV2ItemEvent) GetAction() string { - if p == nil || p.Action == nil { +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetBody() string { + if p == nil || p.Body == nil { return "" } - return *p.Action + return *p.Body } -// GetChanges returns the Changes field. -func (p *ProjectV2ItemEvent) GetChanges() *ProjectV2ItemChange { - if p == nil { - return nil +// GetChangedFiles returns the ChangedFiles field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetChangedFiles() int { + if p == nil || p.ChangedFiles == nil { + return 0 } - return p.Changes + return *p.ChangedFiles } -// GetInstallation returns the Installation field. -func (p *ProjectV2ItemEvent) GetInstallation() *Installation { - if p == nil { - return nil +// GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetClosedAt() Timestamp { + if p == nil || p.ClosedAt == nil { + return Timestamp{} } - return p.Installation + return *p.ClosedAt } -// GetOrg returns the Org field. -func (p *ProjectV2ItemEvent) GetOrg() *Organization { - if p == nil { - return nil +// GetComments returns the Comments field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetComments() int { + if p == nil || p.Comments == nil { + return 0 } - return p.Org + return *p.Comments } -// GetProjectV2Item returns the ProjectV2Item field. -func (p *ProjectV2ItemEvent) GetProjectV2Item() *ProjectV2Item { - if p == nil { - return nil +// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetCommentsURL() string { + if p == nil || p.CommentsURL == nil { + return "" } - return p.ProjectV2Item + return *p.CommentsURL } -// GetSender returns the Sender field. -func (p *ProjectV2ItemEvent) GetSender() *User { - if p == nil { - return nil +// GetCommits returns the Commits field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetCommits() int { + if p == nil || p.Commits == nil { + return 0 } - return p.Sender + return *p.Commits } -// GetAllowDeletions returns the AllowDeletions field. -func (p *Protection) GetAllowDeletions() *AllowDeletions { - if p == nil { - return nil +// GetCommitsURL returns the CommitsURL field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetCommitsURL() string { + if p == nil || p.CommitsURL == nil { + return "" } - return p.AllowDeletions + return *p.CommitsURL } -// GetAllowForcePushes returns the AllowForcePushes field. -func (p *Protection) GetAllowForcePushes() *AllowForcePushes { - if p == nil { - return nil +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetCreatedAt() Timestamp { + if p == nil || p.CreatedAt == nil { + return Timestamp{} } - return p.AllowForcePushes + return *p.CreatedAt } -// GetAllowForkSyncing returns the AllowForkSyncing field. -func (p *Protection) GetAllowForkSyncing() *AllowForkSyncing { - if p == nil { - return nil +// GetDeletions returns the Deletions field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetDeletions() int { + if p == nil || p.Deletions == nil { + return 0 } - return p.AllowForkSyncing + return *p.Deletions } -// GetBlockCreations returns the BlockCreations field. -func (p *Protection) GetBlockCreations() *BlockCreations { - if p == nil { - return nil - } - return p.BlockCreations +// GetDiffURL returns the DiffURL field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetDiffURL() string { + if p == nil || p.DiffURL == nil { + return "" + } + return *p.DiffURL } -// GetEnforceAdmins returns the EnforceAdmins field. -func (p *Protection) GetEnforceAdmins() *AdminEnforcement { - if p == nil { - return nil +// GetDraft returns the Draft field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetDraft() bool { + if p == nil || p.Draft == nil { + return false } - return p.EnforceAdmins + return *p.Draft } -// GetLockBranch returns the LockBranch field. -func (p *Protection) GetLockBranch() *LockBranch { +// GetHead returns the Head field. +func (p *PullRequest) GetHead() *PullRequestBranch { if p == nil { return nil } - return p.LockBranch + return p.Head } -// GetRequiredConversationResolution returns the RequiredConversationResolution field. -func (p *Protection) GetRequiredConversationResolution() *RequiredConversationResolution { - if p == nil { - return nil +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetHTMLURL() string { + if p == nil || p.HTMLURL == nil { + return "" } - return p.RequiredConversationResolution + return *p.HTMLURL } -// GetRequiredPullRequestReviews returns the RequiredPullRequestReviews field. -func (p *Protection) GetRequiredPullRequestReviews() *PullRequestReviewsEnforcement { - if p == nil { - return nil +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetID() int64 { + if p == nil || p.ID == nil { + return 0 } - return p.RequiredPullRequestReviews + return *p.ID } -// GetRequiredSignatures returns the RequiredSignatures field. -func (p *Protection) GetRequiredSignatures() *SignaturesProtectedBranch { - if p == nil { - return nil +// GetIssueURL returns the IssueURL field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetIssueURL() string { + if p == nil || p.IssueURL == nil { + return "" } - return p.RequiredSignatures + return *p.IssueURL } -// GetRequiredStatusChecks returns the RequiredStatusChecks field. -func (p *Protection) GetRequiredStatusChecks() *RequiredStatusChecks { +// GetLinks returns the Links field. +func (p *PullRequest) GetLinks() *PRLinks { if p == nil { return nil } - return p.RequiredStatusChecks + return p.Links } -// GetRequireLinearHistory returns the RequireLinearHistory field. -func (p *Protection) GetRequireLinearHistory() *RequireLinearHistory { - if p == nil { - return nil +// GetLocked returns the Locked field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetLocked() bool { + if p == nil || p.Locked == nil { + return false } - return p.RequireLinearHistory + return *p.Locked } -// GetRestrictions returns the Restrictions field. -func (p *Protection) GetRestrictions() *BranchRestrictions { - if p == nil { - return nil +// GetMaintainerCanModify returns the MaintainerCanModify field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetMaintainerCanModify() bool { + if p == nil || p.MaintainerCanModify == nil { + return false } - return p.Restrictions + return *p.MaintainerCanModify } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *Protection) GetURL() string { - if p == nil || p.URL == nil { - return "" +// GetMergeable returns the Mergeable field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetMergeable() bool { + if p == nil || p.Mergeable == nil { + return false } - return *p.URL + return *p.Mergeable } -// GetAdminEnforced returns the AdminEnforced field. -func (p *ProtectionChanges) GetAdminEnforced() *AdminEnforcedChanges { - if p == nil { - return nil +// GetMergeableState returns the MergeableState field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetMergeableState() string { + if p == nil || p.MergeableState == nil { + return "" } - return p.AdminEnforced + return *p.MergeableState } -// GetAllowDeletionsEnforcementLevel returns the AllowDeletionsEnforcementLevel field. -func (p *ProtectionChanges) GetAllowDeletionsEnforcementLevel() *AllowDeletionsEnforcementLevelChanges { - if p == nil { - return nil +// GetMergeCommitSHA returns the MergeCommitSHA field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetMergeCommitSHA() string { + if p == nil || p.MergeCommitSHA == nil { + return "" } - return p.AllowDeletionsEnforcementLevel + return *p.MergeCommitSHA } -// GetAuthorizedActorNames returns the AuthorizedActorNames field. -func (p *ProtectionChanges) GetAuthorizedActorNames() *AuthorizedActorNames { - if p == nil { - return nil +// GetMerged returns the Merged field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetMerged() bool { + if p == nil || p.Merged == nil { + return false } - return p.AuthorizedActorNames + return *p.Merged } -// GetAuthorizedActorsOnly returns the AuthorizedActorsOnly field. -func (p *ProtectionChanges) GetAuthorizedActorsOnly() *AuthorizedActorsOnly { - if p == nil { - return nil +// GetMergedAt returns the MergedAt field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetMergedAt() Timestamp { + if p == nil || p.MergedAt == nil { + return Timestamp{} } - return p.AuthorizedActorsOnly + return *p.MergedAt } -// GetAuthorizedDismissalActorsOnly returns the AuthorizedDismissalActorsOnly field. -func (p *ProtectionChanges) GetAuthorizedDismissalActorsOnly() *AuthorizedDismissalActorsOnlyChanges { +// GetMergedBy returns the MergedBy field. +func (p *PullRequest) GetMergedBy() *User { if p == nil { return nil } - return p.AuthorizedDismissalActorsOnly + return p.MergedBy } -// GetCreateProtected returns the CreateProtected field. -func (p *ProtectionChanges) GetCreateProtected() *CreateProtectedChanges { +// GetMilestone returns the Milestone field. +func (p *PullRequest) GetMilestone() *Milestone { if p == nil { return nil } - return p.CreateProtected + return p.Milestone } -// GetDismissStaleReviewsOnPush returns the DismissStaleReviewsOnPush field. -func (p *ProtectionChanges) GetDismissStaleReviewsOnPush() *DismissStaleReviewsOnPushChanges { - if p == nil { - return nil +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetNodeID() string { + if p == nil || p.NodeID == nil { + return "" } - return p.DismissStaleReviewsOnPush + return *p.NodeID } -// GetLinearHistoryRequirementEnforcementLevel returns the LinearHistoryRequirementEnforcementLevel field. -func (p *ProtectionChanges) GetLinearHistoryRequirementEnforcementLevel() *LinearHistoryRequirementEnforcementLevelChanges { - if p == nil { - return nil +// GetNumber returns the Number field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetNumber() int { + if p == nil || p.Number == nil { + return 0 } - return p.LinearHistoryRequirementEnforcementLevel + return *p.Number } -// GetPullRequestReviewsEnforcementLevel returns the PullRequestReviewsEnforcementLevel field. -func (p *ProtectionChanges) GetPullRequestReviewsEnforcementLevel() *PullRequestReviewsEnforcementLevelChanges { - if p == nil { - return nil +// GetPatchURL returns the PatchURL field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetPatchURL() string { + if p == nil || p.PatchURL == nil { + return "" } - return p.PullRequestReviewsEnforcementLevel + return *p.PatchURL } -// GetRequireCodeOwnerReview returns the RequireCodeOwnerReview field. -func (p *ProtectionChanges) GetRequireCodeOwnerReview() *RequireCodeOwnerReviewChanges { - if p == nil { - return nil +// GetRebaseable returns the Rebaseable field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetRebaseable() bool { + if p == nil || p.Rebaseable == nil { + return false } - return p.RequireCodeOwnerReview + return *p.Rebaseable } -// GetRequiredConversationResolutionLevel returns the RequiredConversationResolutionLevel field. -func (p *ProtectionChanges) GetRequiredConversationResolutionLevel() *RequiredConversationResolutionLevelChanges { - if p == nil { - return nil +// GetReviewComments returns the ReviewComments field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetReviewComments() int { + if p == nil || p.ReviewComments == nil { + return 0 } - return p.RequiredConversationResolutionLevel + return *p.ReviewComments } -// GetRequiredDeploymentsEnforcementLevel returns the RequiredDeploymentsEnforcementLevel field. -func (p *ProtectionChanges) GetRequiredDeploymentsEnforcementLevel() *RequiredDeploymentsEnforcementLevelChanges { - if p == nil { - return nil +// GetReviewCommentsURL returns the ReviewCommentsURL field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetReviewCommentsURL() string { + if p == nil || p.ReviewCommentsURL == nil { + return "" } - return p.RequiredDeploymentsEnforcementLevel + return *p.ReviewCommentsURL } -// GetRequiredStatusChecks returns the RequiredStatusChecks field. -func (p *ProtectionChanges) GetRequiredStatusChecks() *RequiredStatusChecksChanges { - if p == nil { - return nil +// GetReviewCommentURL returns the ReviewCommentURL field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetReviewCommentURL() string { + if p == nil || p.ReviewCommentURL == nil { + return "" } - return p.RequiredStatusChecks + return *p.ReviewCommentURL } -// GetRequiredStatusChecksEnforcementLevel returns the RequiredStatusChecksEnforcementLevel field. -func (p *ProtectionChanges) GetRequiredStatusChecksEnforcementLevel() *RequiredStatusChecksEnforcementLevelChanges { - if p == nil { - return nil +// GetState returns the State field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetState() string { + if p == nil || p.State == nil { + return "" } - return p.RequiredStatusChecksEnforcementLevel + return *p.State } -// GetSignatureRequirementEnforcementLevel returns the SignatureRequirementEnforcementLevel field. -func (p *ProtectionChanges) GetSignatureRequirementEnforcementLevel() *SignatureRequirementEnforcementLevelChanges { - if p == nil { - return nil +// GetStatusesURL returns the StatusesURL field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetStatusesURL() string { + if p == nil || p.StatusesURL == nil { + return "" } - return p.SignatureRequirementEnforcementLevel + return *p.StatusesURL } -// GetAllowDeletions returns the AllowDeletions field if it's non-nil, zero value otherwise. -func (p *ProtectionRequest) GetAllowDeletions() bool { - if p == nil || p.AllowDeletions == nil { - return false +// GetTitle returns the Title field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetTitle() string { + if p == nil || p.Title == nil { + return "" } - return *p.AllowDeletions + return *p.Title } -// GetAllowForcePushes returns the AllowForcePushes field if it's non-nil, zero value otherwise. -func (p *ProtectionRequest) GetAllowForcePushes() bool { - if p == nil || p.AllowForcePushes == nil { - return false +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetUpdatedAt() Timestamp { + if p == nil || p.UpdatedAt == nil { + return Timestamp{} } - return *p.AllowForcePushes + return *p.UpdatedAt } -// GetAllowForkSyncing returns the AllowForkSyncing field if it's non-nil, zero value otherwise. -func (p *ProtectionRequest) GetAllowForkSyncing() bool { - if p == nil || p.AllowForkSyncing == nil { - return false - } - return *p.AllowForkSyncing -} - -// GetBlockCreations returns the BlockCreations field if it's non-nil, zero value otherwise. -func (p *ProtectionRequest) GetBlockCreations() bool { - if p == nil || p.BlockCreations == nil { - return false - } - return *p.BlockCreations -} - -// GetLockBranch returns the LockBranch field if it's non-nil, zero value otherwise. -func (p *ProtectionRequest) GetLockBranch() bool { - if p == nil || p.LockBranch == nil { - return false - } - return *p.LockBranch -} - -// GetRequiredConversationResolution returns the RequiredConversationResolution field if it's non-nil, zero value otherwise. -func (p *ProtectionRequest) GetRequiredConversationResolution() bool { - if p == nil || p.RequiredConversationResolution == nil { - return false +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetURL() string { + if p == nil || p.URL == nil { + return "" } - return *p.RequiredConversationResolution + return *p.URL } -// GetRequiredPullRequestReviews returns the RequiredPullRequestReviews field. -func (p *ProtectionRequest) GetRequiredPullRequestReviews() *PullRequestReviewsEnforcementRequest { +// GetUser returns the User field. +func (p *PullRequest) GetUser() *User { if p == nil { return nil } - return p.RequiredPullRequestReviews + return p.User } -// GetRequiredStatusChecks returns the RequiredStatusChecks field. -func (p *ProtectionRequest) GetRequiredStatusChecks() *RequiredStatusChecks { - if p == nil { - return nil +// GetCommitMessage returns the CommitMessage field if it's non-nil, zero value otherwise. +func (p *PullRequestAutoMerge) GetCommitMessage() string { + if p == nil || p.CommitMessage == nil { + return "" } - return p.RequiredStatusChecks + return *p.CommitMessage } -// GetRequireLinearHistory returns the RequireLinearHistory field if it's non-nil, zero value otherwise. -func (p *ProtectionRequest) GetRequireLinearHistory() bool { - if p == nil || p.RequireLinearHistory == nil { - return false +// GetCommitTitle returns the CommitTitle field if it's non-nil, zero value otherwise. +func (p *PullRequestAutoMerge) GetCommitTitle() string { + if p == nil || p.CommitTitle == nil { + return "" } - return *p.RequireLinearHistory + return *p.CommitTitle } -// GetRestrictions returns the Restrictions field. -func (p *ProtectionRequest) GetRestrictions() *BranchRestrictionsRequest { +// GetEnabledBy returns the EnabledBy field. +func (p *PullRequestAutoMerge) GetEnabledBy() *User { if p == nil { return nil } - return p.Restrictions -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *ProtectionRule) GetID() int64 { - if p == nil || p.ID == nil { - return 0 - } - return *p.ID + return p.EnabledBy } -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *ProtectionRule) GetNodeID() string { - if p == nil || p.NodeID == nil { +// GetMergeMethod returns the MergeMethod field if it's non-nil, zero value otherwise. +func (p *PullRequestAutoMerge) GetMergeMethod() string { + if p == nil || p.MergeMethod == nil { return "" } - return *p.NodeID -} - -// GetPreventSelfReview returns the PreventSelfReview field if it's non-nil, zero value otherwise. -func (p *ProtectionRule) GetPreventSelfReview() bool { - if p == nil || p.PreventSelfReview == nil { - return false - } - return *p.PreventSelfReview + return *p.MergeMethod } -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (p *ProtectionRule) GetType() string { - if p == nil || p.Type == nil { +// GetLabel returns the Label field if it's non-nil, zero value otherwise. +func (p *PullRequestBranch) GetLabel() string { + if p == nil || p.Label == nil { return "" } - return *p.Type -} - -// GetWaitTimer returns the WaitTimer field if it's non-nil, zero value otherwise. -func (p *ProtectionRule) GetWaitTimer() int { - if p == nil || p.WaitTimer == nil { - return 0 - } - return *p.WaitTimer + return *p.Label } -// GetInstallation returns the Installation field. -func (p *PublicEvent) GetInstallation() *Installation { - if p == nil { - return nil +// GetRef returns the Ref field if it's non-nil, zero value otherwise. +func (p *PullRequestBranch) GetRef() string { + if p == nil || p.Ref == nil { + return "" } - return p.Installation + return *p.Ref } -// GetOrg returns the Org field. -func (p *PublicEvent) GetOrg() *Organization { +// GetRepo returns the Repo field. +func (p *PullRequestBranch) GetRepo() *Repository { if p == nil { return nil } - return p.Org + return p.Repo } -// GetRepo returns the Repo field. -func (p *PublicEvent) GetRepo() *Repository { - if p == nil { - return nil +// GetSHA returns the SHA field if it's non-nil, zero value otherwise. +func (p *PullRequestBranch) GetSHA() string { + if p == nil || p.SHA == nil { + return "" } - return p.Repo + return *p.SHA } -// GetSender returns the Sender field. -func (p *PublicEvent) GetSender() *User { +// GetUser returns the User field. +func (p *PullRequestBranch) GetUser() *User { if p == nil { return nil } - return p.Sender + return p.User } -// GetKey returns the Key field if it's non-nil, zero value otherwise. -func (p *PublicKey) GetKey() string { - if p == nil || p.Key == nil { +// GetExpectedHeadSHA returns the ExpectedHeadSHA field if it's non-nil, zero value otherwise. +func (p *PullRequestBranchUpdateOptions) GetExpectedHeadSHA() string { + if p == nil || p.ExpectedHeadSHA == nil { return "" } - return *p.Key + return *p.ExpectedHeadSHA } -// GetKeyID returns the KeyID field if it's non-nil, zero value otherwise. -func (p *PublicKey) GetKeyID() string { - if p == nil || p.KeyID == nil { +// GetMessage returns the Message field if it's non-nil, zero value otherwise. +func (p *PullRequestBranchUpdateResponse) GetMessage() string { + if p == nil || p.Message == nil { return "" } - return *p.KeyID + return *p.Message } -// GetActiveLockReason returns the ActiveLockReason field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetActiveLockReason() string { - if p == nil || p.ActiveLockReason == nil { +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (p *PullRequestBranchUpdateResponse) GetURL() string { + if p == nil || p.URL == nil { return "" } - return *p.ActiveLockReason -} - -// GetAdditions returns the Additions field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetAdditions() int { - if p == nil || p.Additions == nil { - return 0 - } - return *p.Additions -} - -// GetAssignee returns the Assignee field. -func (p *PullRequest) GetAssignee() *User { - if p == nil { - return nil - } - return p.Assignee + return *p.URL } // GetAuthorAssociation returns the AuthorAssociation field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetAuthorAssociation() string { +func (p *PullRequestComment) GetAuthorAssociation() string { if p == nil || p.AuthorAssociation == nil { return "" } return *p.AuthorAssociation } -// GetAutoMerge returns the AutoMerge field. -func (p *PullRequest) GetAutoMerge() *PullRequestAutoMerge { - if p == nil { - return nil - } - return p.AutoMerge -} - -// GetBase returns the Base field. -func (p *PullRequest) GetBase() *PullRequestBranch { - if p == nil { - return nil - } - return p.Base -} - // GetBody returns the Body field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetBody() string { +func (p *PullRequestComment) GetBody() string { if p == nil || p.Body == nil { return "" } return *p.Body } -// GetChangedFiles returns the ChangedFiles field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetChangedFiles() int { - if p == nil || p.ChangedFiles == nil { - return 0 +// GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetCommitID() string { + if p == nil || p.CommitID == nil { + return "" } - return *p.ChangedFiles + return *p.CommitID } -// GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetClosedAt() Timestamp { - if p == nil || p.ClosedAt == nil { +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetCreatedAt() Timestamp { + if p == nil || p.CreatedAt == nil { return Timestamp{} } - return *p.ClosedAt + return *p.CreatedAt } -// GetComments returns the Comments field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetComments() int { - if p == nil || p.Comments == nil { - return 0 +// GetDiffHunk returns the DiffHunk field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetDiffHunk() string { + if p == nil || p.DiffHunk == nil { + return "" } - return *p.Comments + return *p.DiffHunk } -// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetCommentsURL() string { - if p == nil || p.CommentsURL == nil { +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetHTMLURL() string { + if p == nil || p.HTMLURL == nil { return "" } - return *p.CommentsURL + return *p.HTMLURL } -// GetCommits returns the Commits field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetCommits() int { - if p == nil || p.Commits == nil { +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetID() int64 { + if p == nil || p.ID == nil { return 0 } - return *p.Commits + return *p.ID } -// GetCommitsURL returns the CommitsURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetCommitsURL() string { - if p == nil || p.CommitsURL == nil { - return "" +// GetInReplyTo returns the InReplyTo field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetInReplyTo() int64 { + if p == nil || p.InReplyTo == nil { + return 0 } - return *p.CommitsURL + return *p.InReplyTo } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetCreatedAt() Timestamp { - if p == nil || p.CreatedAt == nil { - return Timestamp{} +// GetLine returns the Line field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetLine() int { + if p == nil || p.Line == nil { + return 0 } - return *p.CreatedAt + return *p.Line } -// GetDeletions returns the Deletions field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetDeletions() int { - if p == nil || p.Deletions == nil { +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetNodeID() string { + if p == nil || p.NodeID == nil { + return "" + } + return *p.NodeID +} + +// GetOriginalCommitID returns the OriginalCommitID field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetOriginalCommitID() string { + if p == nil || p.OriginalCommitID == nil { + return "" + } + return *p.OriginalCommitID +} + +// GetOriginalLine returns the OriginalLine field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetOriginalLine() int { + if p == nil || p.OriginalLine == nil { return 0 } - return *p.Deletions + return *p.OriginalLine } -// GetDiffURL returns the DiffURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetDiffURL() string { - if p == nil || p.DiffURL == nil { +// GetOriginalPosition returns the OriginalPosition field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetOriginalPosition() int { + if p == nil || p.OriginalPosition == nil { + return 0 + } + return *p.OriginalPosition +} + +// GetOriginalStartLine returns the OriginalStartLine field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetOriginalStartLine() int { + if p == nil || p.OriginalStartLine == nil { + return 0 + } + return *p.OriginalStartLine +} + +// GetPath returns the Path field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetPath() string { + if p == nil || p.Path == nil { return "" } - return *p.DiffURL + return *p.Path } -// GetDraft returns the Draft field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetDraft() bool { - if p == nil || p.Draft == nil { - return false +// GetPosition returns the Position field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetPosition() int { + if p == nil || p.Position == nil { + return 0 } - return *p.Draft + return *p.Position } -// GetHead returns the Head field. -func (p *PullRequest) GetHead() *PullRequestBranch { +// GetPullRequestReviewID returns the PullRequestReviewID field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetPullRequestReviewID() int64 { + if p == nil || p.PullRequestReviewID == nil { + return 0 + } + return *p.PullRequestReviewID +} + +// GetPullRequestURL returns the PullRequestURL field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetPullRequestURL() string { + if p == nil || p.PullRequestURL == nil { + return "" + } + return *p.PullRequestURL +} + +// GetReactions returns the Reactions field. +func (p *PullRequestComment) GetReactions() *Reactions { if p == nil { return nil } - return p.Head + return p.Reactions } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetHTMLURL() string { - if p == nil || p.HTMLURL == nil { +// GetSide returns the Side field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetSide() string { + if p == nil || p.Side == nil { return "" } - return *p.HTMLURL + return *p.Side } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetID() int64 { - if p == nil || p.ID == nil { +// GetStartLine returns the StartLine field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetStartLine() int { + if p == nil || p.StartLine == nil { return 0 } - return *p.ID + return *p.StartLine } -// GetIssueURL returns the IssueURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetIssueURL() string { - if p == nil || p.IssueURL == nil { +// GetStartSide returns the StartSide field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetStartSide() string { + if p == nil || p.StartSide == nil { return "" } - return *p.IssueURL + return *p.StartSide } -// GetLinks returns the Links field. -func (p *PullRequest) GetLinks() *PRLinks { - if p == nil { - return nil +// GetSubjectType returns the SubjectType field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetSubjectType() string { + if p == nil || p.SubjectType == nil { + return "" } - return p.Links + return *p.SubjectType } -// GetLocked returns the Locked field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetLocked() bool { - if p == nil || p.Locked == nil { - return false +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetUpdatedAt() Timestamp { + if p == nil || p.UpdatedAt == nil { + return Timestamp{} } - return *p.Locked + return *p.UpdatedAt } -// GetMaintainerCanModify returns the MaintainerCanModify field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetMaintainerCanModify() bool { - if p == nil || p.MaintainerCanModify == nil { - return false +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetURL() string { + if p == nil || p.URL == nil { + return "" } - return *p.MaintainerCanModify + return *p.URL } -// GetMergeable returns the Mergeable field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetMergeable() bool { - if p == nil || p.Mergeable == nil { - return false +// GetUser returns the User field. +func (p *PullRequestComment) GetUser() *User { + if p == nil { + return nil } - return *p.Mergeable + return p.User } -// GetMergeableState returns the MergeableState field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetMergeableState() string { - if p == nil || p.MergeableState == nil { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (p *PullRequestEvent) GetAction() string { + if p == nil || p.Action == nil { return "" } - return *p.MergeableState + return *p.Action } -// GetMergeCommitSHA returns the MergeCommitSHA field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetMergeCommitSHA() string { - if p == nil || p.MergeCommitSHA == nil { +// GetAfter returns the After field if it's non-nil, zero value otherwise. +func (p *PullRequestEvent) GetAfter() string { + if p == nil || p.After == nil { return "" } - return *p.MergeCommitSHA + return *p.After } -// GetMerged returns the Merged field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetMerged() bool { - if p == nil || p.Merged == nil { - return false +// GetAssignee returns the Assignee field. +func (p *PullRequestEvent) GetAssignee() *User { + if p == nil { + return nil } - return *p.Merged + return p.Assignee } -// GetMergedAt returns the MergedAt field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetMergedAt() Timestamp { - if p == nil || p.MergedAt == nil { - return Timestamp{} +// GetBefore returns the Before field if it's non-nil, zero value otherwise. +func (p *PullRequestEvent) GetBefore() string { + if p == nil || p.Before == nil { + return "" } - return *p.MergedAt + return *p.Before } -// GetMergedBy returns the MergedBy field. -func (p *PullRequest) GetMergedBy() *User { +// GetChanges returns the Changes field. +func (p *PullRequestEvent) GetChanges() *EditChange { if p == nil { return nil } - return p.MergedBy + return p.Changes } -// GetMilestone returns the Milestone field. -func (p *PullRequest) GetMilestone() *Milestone { +// GetInstallation returns the Installation field. +func (p *PullRequestEvent) GetInstallation() *Installation { if p == nil { return nil } - return p.Milestone + return p.Installation } -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetNodeID() string { - if p == nil || p.NodeID == nil { - return "" +// GetLabel returns the Label field. +func (p *PullRequestEvent) GetLabel() *Label { + if p == nil { + return nil } - return *p.NodeID + return p.Label } // GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetNumber() int { +func (p *PullRequestEvent) GetNumber() int { if p == nil || p.Number == nil { return 0 } return *p.Number } -// GetPatchURL returns the PatchURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetPatchURL() string { - if p == nil || p.PatchURL == nil { - return "" +// GetOrganization returns the Organization field. +func (p *PullRequestEvent) GetOrganization() *Organization { + if p == nil { + return nil } - return *p.PatchURL + return p.Organization } -// GetRebaseable returns the Rebaseable field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetRebaseable() bool { - if p == nil || p.Rebaseable == nil { - return false +// GetPerformedViaGithubApp returns the PerformedViaGithubApp field. +func (p *PullRequestEvent) GetPerformedViaGithubApp() *App { + if p == nil { + return nil } - return *p.Rebaseable + return p.PerformedViaGithubApp } -// GetReviewComments returns the ReviewComments field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetReviewComments() int { - if p == nil || p.ReviewComments == nil { - return 0 +// GetPullRequest returns the PullRequest field. +func (p *PullRequestEvent) GetPullRequest() *PullRequest { + if p == nil { + return nil } - return *p.ReviewComments + return p.PullRequest } -// GetReviewCommentsURL returns the ReviewCommentsURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetReviewCommentsURL() string { - if p == nil || p.ReviewCommentsURL == nil { - return "" +// GetRepo returns the Repo field. +func (p *PullRequestEvent) GetRepo() *Repository { + if p == nil { + return nil } - return *p.ReviewCommentsURL + return p.Repo } -// GetReviewCommentURL returns the ReviewCommentURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetReviewCommentURL() string { - if p == nil || p.ReviewCommentURL == nil { - return "" +// GetRequestedReviewer returns the RequestedReviewer field. +func (p *PullRequestEvent) GetRequestedReviewer() *User { + if p == nil { + return nil } - return *p.ReviewCommentURL + return p.RequestedReviewer } -// GetState returns the State field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetState() string { - if p == nil || p.State == nil { - return "" - } - return *p.State -} - -// GetStatusesURL returns the StatusesURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetStatusesURL() string { - if p == nil || p.StatusesURL == nil { - return "" - } - return *p.StatusesURL -} - -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetTitle() string { - if p == nil || p.Title == nil { - return "" - } - return *p.Title -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *PullRequest) 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 *PullRequest) GetURL() string { - if p == nil || p.URL == nil { - return "" - } - return *p.URL -} - -// GetUser returns the User field. -func (p *PullRequest) GetUser() *User { +// GetRequestedTeam returns the RequestedTeam field. +func (p *PullRequestEvent) GetRequestedTeam() *Team { if p == nil { return nil } - return p.User -} - -// GetCommitMessage returns the CommitMessage field if it's non-nil, zero value otherwise. -func (p *PullRequestAutoMerge) GetCommitMessage() string { - if p == nil || p.CommitMessage == nil { - return "" - } - return *p.CommitMessage -} - -// GetCommitTitle returns the CommitTitle field if it's non-nil, zero value otherwise. -func (p *PullRequestAutoMerge) GetCommitTitle() string { - if p == nil || p.CommitTitle == nil { - return "" - } - return *p.CommitTitle + return p.RequestedTeam } -// GetEnabledBy returns the EnabledBy field. -func (p *PullRequestAutoMerge) GetEnabledBy() *User { +// GetSender returns the Sender field. +func (p *PullRequestEvent) GetSender() *User { if p == nil { return nil } - return p.EnabledBy -} - -// GetMergeMethod returns the MergeMethod field if it's non-nil, zero value otherwise. -func (p *PullRequestAutoMerge) GetMergeMethod() string { - if p == nil || p.MergeMethod == nil { - return "" - } - return *p.MergeMethod + return p.Sender } -// GetLabel returns the Label field if it's non-nil, zero value otherwise. -func (p *PullRequestBranch) GetLabel() string { - if p == nil || p.Label == nil { +// GetDiffURL returns the DiffURL field if it's non-nil, zero value otherwise. +func (p *PullRequestLinks) GetDiffURL() string { + if p == nil || p.DiffURL == nil { return "" } - return *p.Label + return *p.DiffURL } -// GetRef returns the Ref field if it's non-nil, zero value otherwise. -func (p *PullRequestBranch) GetRef() string { - if p == nil || p.Ref == nil { +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (p *PullRequestLinks) GetHTMLURL() string { + if p == nil || p.HTMLURL == nil { return "" } - return *p.Ref + return *p.HTMLURL } -// GetRepo returns the Repo field. -func (p *PullRequestBranch) GetRepo() *Repository { - if p == nil { - return nil +// GetMergedAt returns the MergedAt field if it's non-nil, zero value otherwise. +func (p *PullRequestLinks) GetMergedAt() Timestamp { + if p == nil || p.MergedAt == nil { + return Timestamp{} } - return p.Repo + return *p.MergedAt } -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (p *PullRequestBranch) GetSHA() string { - if p == nil || p.SHA == nil { +// GetPatchURL returns the PatchURL field if it's non-nil, zero value otherwise. +func (p *PullRequestLinks) GetPatchURL() string { + if p == nil || p.PatchURL == nil { return "" } - return *p.SHA + return *p.PatchURL } -// GetUser returns the User field. -func (p *PullRequestBranch) GetUser() *User { - if p == nil { - return nil +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (p *PullRequestLinks) GetURL() string { + if p == nil || p.URL == nil { + return "" } - return p.User + return *p.URL } -// GetExpectedHeadSHA returns the ExpectedHeadSHA field if it's non-nil, zero value otherwise. -func (p *PullRequestBranchUpdateOptions) GetExpectedHeadSHA() string { - if p == nil || p.ExpectedHeadSHA == nil { - return "" +// GetMerged returns the Merged field if it's non-nil, zero value otherwise. +func (p *PullRequestMergeResult) GetMerged() bool { + if p == nil || p.Merged == nil { + return false } - return *p.ExpectedHeadSHA + return *p.Merged } // GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (p *PullRequestBranchUpdateResponse) GetMessage() string { +func (p *PullRequestMergeResult) GetMessage() string { if p == nil || p.Message == nil { return "" } return *p.Message } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *PullRequestBranchUpdateResponse) GetURL() string { - if p == nil || p.URL == nil { +// GetSHA returns the SHA field if it's non-nil, zero value otherwise. +func (p *PullRequestMergeResult) GetSHA() string { + if p == nil || p.SHA == nil { return "" } - return *p.URL + return *p.SHA } // GetAuthorAssociation returns the AuthorAssociation field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetAuthorAssociation() string { +func (p *PullRequestReview) GetAuthorAssociation() string { if p == nil || p.AuthorAssociation == nil { return "" } @@ -16799,7 +17375,7 @@ func (p *PullRequestComment) GetAuthorAssociation() string { } // GetBody returns the Body field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetBody() string { +func (p *PullRequestReview) GetBody() string { if p == nil || p.Body == nil { return "" } @@ -16807,31 +17383,15 @@ func (p *PullRequestComment) GetBody() string { } // GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetCommitID() string { +func (p *PullRequestReview) GetCommitID() string { if p == nil || p.CommitID == nil { return "" } return *p.CommitID } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetCreatedAt() Timestamp { - if p == nil || p.CreatedAt == nil { - return Timestamp{} - } - return *p.CreatedAt -} - -// GetDiffHunk returns the DiffHunk field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetDiffHunk() string { - if p == nil || p.DiffHunk == nil { - return "" - } - return *p.DiffHunk -} - // GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetHTMLURL() string { +func (p *PullRequestReview) GetHTMLURL() string { if p == nil || p.HTMLURL == nil { return "" } @@ -16839,527 +17399,439 @@ func (p *PullRequestComment) GetHTMLURL() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetID() int64 { +func (p *PullRequestReview) GetID() int64 { if p == nil || p.ID == nil { return 0 } return *p.ID } -// GetInReplyTo returns the InReplyTo field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetInReplyTo() int64 { - if p == nil || p.InReplyTo == nil { - return 0 - } - return *p.InReplyTo -} - -// GetLine returns the Line field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetLine() int { - if p == nil || p.Line == nil { - return 0 - } - return *p.Line -} - // GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetNodeID() string { +func (p *PullRequestReview) GetNodeID() string { if p == nil || p.NodeID == nil { return "" } return *p.NodeID } -// GetOriginalCommitID returns the OriginalCommitID field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetOriginalCommitID() string { - if p == nil || p.OriginalCommitID == nil { +// GetPullRequestURL returns the PullRequestURL field if it's non-nil, zero value otherwise. +func (p *PullRequestReview) GetPullRequestURL() string { + if p == nil || p.PullRequestURL == nil { return "" } - return *p.OriginalCommitID + return *p.PullRequestURL } -// GetOriginalLine returns the OriginalLine field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetOriginalLine() int { - if p == nil || p.OriginalLine == nil { - return 0 +// GetState returns the State field if it's non-nil, zero value otherwise. +func (p *PullRequestReview) GetState() string { + if p == nil || p.State == nil { + return "" } - return *p.OriginalLine + return *p.State } -// GetOriginalPosition returns the OriginalPosition field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetOriginalPosition() int { - if p == nil || p.OriginalPosition == nil { - return 0 +// GetSubmittedAt returns the SubmittedAt field if it's non-nil, zero value otherwise. +func (p *PullRequestReview) GetSubmittedAt() Timestamp { + if p == nil || p.SubmittedAt == nil { + return Timestamp{} } - return *p.OriginalPosition + return *p.SubmittedAt } -// GetOriginalStartLine returns the OriginalStartLine field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetOriginalStartLine() int { - if p == nil || p.OriginalStartLine == nil { - return 0 +// GetUser returns the User field. +func (p *PullRequestReview) GetUser() *User { + if p == nil { + return nil } - return *p.OriginalStartLine + return p.User } -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetPath() string { - if p == nil || p.Path == nil { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (p *PullRequestReviewCommentEvent) GetAction() string { + if p == nil || p.Action == nil { return "" } - return *p.Path + return *p.Action } -// GetPosition returns the Position field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetPosition() int { - if p == nil || p.Position == nil { - return 0 +// GetChanges returns the Changes field. +func (p *PullRequestReviewCommentEvent) GetChanges() *EditChange { + if p == nil { + return nil } - return *p.Position + return p.Changes } -// GetPullRequestReviewID returns the PullRequestReviewID field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetPullRequestReviewID() int64 { - if p == nil || p.PullRequestReviewID == nil { - return 0 +// GetComment returns the Comment field. +func (p *PullRequestReviewCommentEvent) GetComment() *PullRequestComment { + if p == nil { + return nil } - return *p.PullRequestReviewID + return p.Comment } -// GetPullRequestURL returns the PullRequestURL field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetPullRequestURL() string { - if p == nil || p.PullRequestURL == nil { - return "" - } - return *p.PullRequestURL -} - -// GetReactions returns the Reactions field. -func (p *PullRequestComment) GetReactions() *Reactions { +// GetInstallation returns the Installation field. +func (p *PullRequestReviewCommentEvent) GetInstallation() *Installation { if p == nil { return nil } - return p.Reactions -} - -// GetSide returns the Side field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetSide() string { - if p == nil || p.Side == nil { - return "" - } - return *p.Side + return p.Installation } -// GetStartLine returns the StartLine field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetStartLine() int { - if p == nil || p.StartLine == nil { - return 0 +// GetOrg returns the Org field. +func (p *PullRequestReviewCommentEvent) GetOrg() *Organization { + if p == nil { + return nil } - return *p.StartLine + return p.Org } -// GetStartSide returns the StartSide field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetStartSide() string { - if p == nil || p.StartSide == nil { - return "" +// GetPullRequest returns the PullRequest field. +func (p *PullRequestReviewCommentEvent) GetPullRequest() *PullRequest { + if p == nil { + return nil } - return *p.StartSide + return p.PullRequest } -// GetSubjectType returns the SubjectType field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetSubjectType() string { - if p == nil || p.SubjectType == nil { - return "" +// GetRepo returns the Repo field. +func (p *PullRequestReviewCommentEvent) GetRepo() *Repository { + if p == nil { + return nil } - return *p.SubjectType + return p.Repo } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetUpdatedAt() Timestamp { - if p == nil || p.UpdatedAt == nil { - return Timestamp{} +// GetSender returns the Sender field. +func (p *PullRequestReviewCommentEvent) GetSender() *User { + if p == nil { + return nil } - return *p.UpdatedAt + return p.Sender } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetURL() string { - if p == nil || p.URL == nil { +// GetMessage returns the Message field if it's non-nil, zero value otherwise. +func (p *PullRequestReviewDismissalRequest) GetMessage() string { + if p == nil || p.Message == nil { return "" } - return *p.URL -} - -// GetUser returns the User field. -func (p *PullRequestComment) GetUser() *User { - if p == nil { - return nil - } - return p.User + return *p.Message } // GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *PullRequestEvent) GetAction() string { +func (p *PullRequestReviewEvent) GetAction() string { if p == nil || p.Action == nil { return "" } return *p.Action } -// GetAfter returns the After field if it's non-nil, zero value otherwise. -func (p *PullRequestEvent) GetAfter() string { - if p == nil || p.After == nil { - return "" +// GetInstallation returns the Installation field. +func (p *PullRequestReviewEvent) GetInstallation() *Installation { + if p == nil { + return nil } - return *p.After + return p.Installation } -// GetAssignee returns the Assignee field. -func (p *PullRequestEvent) GetAssignee() *User { +// GetOrganization returns the Organization field. +func (p *PullRequestReviewEvent) GetOrganization() *Organization { if p == nil { return nil } - return p.Assignee + return p.Organization } -// GetBefore returns the Before field if it's non-nil, zero value otherwise. -func (p *PullRequestEvent) GetBefore() string { - if p == nil || p.Before == nil { - return "" +// GetPullRequest returns the PullRequest field. +func (p *PullRequestReviewEvent) GetPullRequest() *PullRequest { + if p == nil { + return nil } - return *p.Before + return p.PullRequest } -// GetChanges returns the Changes field. -func (p *PullRequestEvent) GetChanges() *EditChange { +// GetRepo returns the Repo field. +func (p *PullRequestReviewEvent) GetRepo() *Repository { if p == nil { return nil } - return p.Changes + return p.Repo } -// GetInstallation returns the Installation field. -func (p *PullRequestEvent) GetInstallation() *Installation { +// GetReview returns the Review field. +func (p *PullRequestReviewEvent) GetReview() *PullRequestReview { if p == nil { return nil } - return p.Installation + return p.Review } -// GetLabel returns the Label field. -func (p *PullRequestEvent) GetLabel() *Label { +// GetSender returns the Sender field. +func (p *PullRequestReviewEvent) GetSender() *User { if p == nil { return nil } - return p.Label + return p.Sender } -// GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (p *PullRequestEvent) GetNumber() int { - if p == nil || p.Number == nil { - return 0 +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (p *PullRequestReviewRequest) GetBody() string { + if p == nil || p.Body == nil { + return "" } - return *p.Number + return *p.Body } -// GetOrganization returns the Organization field. -func (p *PullRequestEvent) GetOrganization() *Organization { - if p == nil { - return nil +// GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. +func (p *PullRequestReviewRequest) GetCommitID() string { + if p == nil || p.CommitID == nil { + return "" } - return p.Organization + return *p.CommitID } -// GetPerformedViaGithubApp returns the PerformedViaGithubApp field. -func (p *PullRequestEvent) GetPerformedViaGithubApp() *App { - if p == nil { - return nil +// GetEvent returns the Event field if it's non-nil, zero value otherwise. +func (p *PullRequestReviewRequest) GetEvent() string { + if p == nil || p.Event == nil { + return "" } - return p.PerformedViaGithubApp + return *p.Event } -// GetPullRequest returns the PullRequest field. -func (p *PullRequestEvent) GetPullRequest() *PullRequest { - if p == nil { - return nil +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (p *PullRequestReviewRequest) GetNodeID() string { + if p == nil || p.NodeID == nil { + return "" } - return p.PullRequest + return *p.NodeID } -// GetRepo returns the Repo field. -func (p *PullRequestEvent) GetRepo() *Repository { +// GetBypassPullRequestAllowances returns the BypassPullRequestAllowances field. +func (p *PullRequestReviewsEnforcement) GetBypassPullRequestAllowances() *BypassPullRequestAllowances { if p == nil { return nil } - return p.Repo + return p.BypassPullRequestAllowances } -// GetRequestedReviewer returns the RequestedReviewer field. -func (p *PullRequestEvent) GetRequestedReviewer() *User { +// GetDismissalRestrictions returns the DismissalRestrictions field. +func (p *PullRequestReviewsEnforcement) GetDismissalRestrictions() *DismissalRestrictions { if p == nil { return nil } - return p.RequestedReviewer + return p.DismissalRestrictions } -// GetRequestedTeam returns the RequestedTeam field. -func (p *PullRequestEvent) GetRequestedTeam() *Team { +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (p *PullRequestReviewsEnforcementLevelChanges) GetFrom() string { + if p == nil || p.From == nil { + return "" + } + return *p.From +} + +// GetBypassPullRequestAllowancesRequest returns the BypassPullRequestAllowancesRequest field. +func (p *PullRequestReviewsEnforcementRequest) GetBypassPullRequestAllowancesRequest() *BypassPullRequestAllowancesRequest { if p == nil { return nil } - return p.RequestedTeam + return p.BypassPullRequestAllowancesRequest } -// GetSender returns the Sender field. -func (p *PullRequestEvent) GetSender() *User { +// GetDismissalRestrictionsRequest returns the DismissalRestrictionsRequest field. +func (p *PullRequestReviewsEnforcementRequest) GetDismissalRestrictionsRequest() *DismissalRestrictionsRequest { if p == nil { return nil } - return p.Sender + return p.DismissalRestrictionsRequest } -// GetDiffURL returns the DiffURL field if it's non-nil, zero value otherwise. -func (p *PullRequestLinks) GetDiffURL() string { - if p == nil || p.DiffURL == nil { - return "" +// GetRequireLastPushApproval returns the RequireLastPushApproval field if it's non-nil, zero value otherwise. +func (p *PullRequestReviewsEnforcementRequest) GetRequireLastPushApproval() bool { + if p == nil || p.RequireLastPushApproval == nil { + return false } - return *p.DiffURL + return *p.RequireLastPushApproval } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (p *PullRequestLinks) GetHTMLURL() string { - if p == nil || p.HTMLURL == nil { - return "" +// GetBypassPullRequestAllowancesRequest returns the BypassPullRequestAllowancesRequest field. +func (p *PullRequestReviewsEnforcementUpdate) GetBypassPullRequestAllowancesRequest() *BypassPullRequestAllowancesRequest { + if p == nil { + return nil } - return *p.HTMLURL + return p.BypassPullRequestAllowancesRequest } -// GetMergedAt returns the MergedAt field if it's non-nil, zero value otherwise. -func (p *PullRequestLinks) GetMergedAt() Timestamp { - if p == nil || p.MergedAt == nil { - return Timestamp{} +// GetDismissalRestrictionsRequest returns the DismissalRestrictionsRequest field. +func (p *PullRequestReviewsEnforcementUpdate) GetDismissalRestrictionsRequest() *DismissalRestrictionsRequest { + if p == nil { + return nil } - return *p.MergedAt + return p.DismissalRestrictionsRequest } -// GetPatchURL returns the PatchURL field if it's non-nil, zero value otherwise. -func (p *PullRequestLinks) GetPatchURL() string { - if p == nil || p.PatchURL == nil { - return "" +// GetDismissStaleReviews returns the DismissStaleReviews field if it's non-nil, zero value otherwise. +func (p *PullRequestReviewsEnforcementUpdate) GetDismissStaleReviews() bool { + if p == nil || p.DismissStaleReviews == nil { + return false } - return *p.PatchURL + return *p.DismissStaleReviews } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *PullRequestLinks) GetURL() string { - if p == nil || p.URL == nil { - return "" +// GetRequireCodeOwnerReviews returns the RequireCodeOwnerReviews field if it's non-nil, zero value otherwise. +func (p *PullRequestReviewsEnforcementUpdate) GetRequireCodeOwnerReviews() bool { + if p == nil || p.RequireCodeOwnerReviews == nil { + return false } - return *p.URL + return *p.RequireCodeOwnerReviews } -// GetMerged returns the Merged field if it's non-nil, zero value otherwise. -func (p *PullRequestMergeResult) GetMerged() bool { - if p == nil || p.Merged == nil { +// GetRequireLastPushApproval returns the RequireLastPushApproval field if it's non-nil, zero value otherwise. +func (p *PullRequestReviewsEnforcementUpdate) GetRequireLastPushApproval() bool { + if p == nil || p.RequireLastPushApproval == nil { return false } - return *p.Merged + return *p.RequireLastPushApproval } -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (p *PullRequestMergeResult) GetMessage() string { - if p == nil || p.Message == nil { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (p *PullRequestReviewThreadEvent) GetAction() string { + if p == nil || p.Action == nil { return "" } - return *p.Message + return *p.Action } -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (p *PullRequestMergeResult) GetSHA() string { - if p == nil || p.SHA == nil { - return "" - } - return *p.SHA -} - -// GetAuthorAssociation returns the AuthorAssociation field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetAuthorAssociation() string { - if p == nil || p.AuthorAssociation == nil { - return "" +// GetInstallation returns the Installation field. +func (p *PullRequestReviewThreadEvent) GetInstallation() *Installation { + if p == nil { + return nil } - return *p.AuthorAssociation + return p.Installation } -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetBody() string { - if p == nil || p.Body == nil { - return "" +// GetOrg returns the Org field. +func (p *PullRequestReviewThreadEvent) GetOrg() *Organization { + if p == nil { + return nil } - return *p.Body + return p.Org } -// GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetCommitID() string { - if p == nil || p.CommitID == nil { - return "" +// GetPullRequest returns the PullRequest field. +func (p *PullRequestReviewThreadEvent) GetPullRequest() *PullRequest { + if p == nil { + return nil } - return *p.CommitID + return p.PullRequest } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetHTMLURL() string { - if p == nil || p.HTMLURL == nil { - return "" +// GetRepo returns the Repo field. +func (p *PullRequestReviewThreadEvent) GetRepo() *Repository { + if p == nil { + return nil } - return *p.HTMLURL + return p.Repo } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetID() int64 { - if p == nil || p.ID == nil { - return 0 +// GetSender returns the Sender field. +func (p *PullRequestReviewThreadEvent) GetSender() *User { + if p == nil { + return nil } - return *p.ID + return p.Sender } -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetNodeID() string { - if p == nil || p.NodeID == nil { - return "" +// GetThread returns the Thread field. +func (p *PullRequestReviewThreadEvent) GetThread() *PullRequestThread { + if p == nil { + return nil } - return *p.NodeID + return p.Thread } -// GetPullRequestURL returns the PullRequestURL field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetPullRequestURL() string { - if p == nil || p.PullRequestURL == nil { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (p *PullRequestTargetEvent) GetAction() string { + if p == nil || p.Action == nil { return "" } - return *p.PullRequestURL + return *p.Action } -// GetState returns the State field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetState() string { - if p == nil || p.State == nil { +// GetAfter returns the After field if it's non-nil, zero value otherwise. +func (p *PullRequestTargetEvent) GetAfter() string { + if p == nil || p.After == nil { return "" } - return *p.State -} - -// GetSubmittedAt returns the SubmittedAt field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetSubmittedAt() Timestamp { - if p == nil || p.SubmittedAt == nil { - return Timestamp{} - } - return *p.SubmittedAt + return *p.After } -// GetUser returns the User field. -func (p *PullRequestReview) GetUser() *User { +// GetAssignee returns the Assignee field. +func (p *PullRequestTargetEvent) GetAssignee() *User { if p == nil { return nil } - return p.User + return p.Assignee } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewCommentEvent) GetAction() string { - if p == nil || p.Action == nil { +// GetBefore returns the Before field if it's non-nil, zero value otherwise. +func (p *PullRequestTargetEvent) GetBefore() string { + if p == nil || p.Before == nil { return "" } - return *p.Action + return *p.Before } // GetChanges returns the Changes field. -func (p *PullRequestReviewCommentEvent) GetChanges() *EditChange { +func (p *PullRequestTargetEvent) GetChanges() *EditChange { if p == nil { return nil } return p.Changes } -// GetComment returns the Comment field. -func (p *PullRequestReviewCommentEvent) GetComment() *PullRequestComment { - if p == nil { - return nil - } - return p.Comment -} - // GetInstallation returns the Installation field. -func (p *PullRequestReviewCommentEvent) GetInstallation() *Installation { +func (p *PullRequestTargetEvent) GetInstallation() *Installation { if p == nil { return nil } return p.Installation } -// GetOrg returns the Org field. -func (p *PullRequestReviewCommentEvent) GetOrg() *Organization { - if p == nil { - return nil - } - return p.Org -} - -// GetPullRequest returns the PullRequest field. -func (p *PullRequestReviewCommentEvent) GetPullRequest() *PullRequest { - if p == nil { - return nil - } - return p.PullRequest -} - -// GetRepo returns the Repo field. -func (p *PullRequestReviewCommentEvent) GetRepo() *Repository { - if p == nil { - return nil - } - return p.Repo -} - -// GetSender returns the Sender field. -func (p *PullRequestReviewCommentEvent) GetSender() *User { +// GetLabel returns the Label field. +func (p *PullRequestTargetEvent) GetLabel() *Label { if p == nil { return nil } - return p.Sender -} - -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewDismissalRequest) GetMessage() string { - if p == nil || p.Message == nil { - return "" - } - return *p.Message + return p.Label } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewEvent) GetAction() string { - if p == nil || p.Action == nil { - return "" +// GetNumber returns the Number field if it's non-nil, zero value otherwise. +func (p *PullRequestTargetEvent) GetNumber() int { + if p == nil || p.Number == nil { + return 0 } - return *p.Action + return *p.Number } -// GetInstallation returns the Installation field. -func (p *PullRequestReviewEvent) GetInstallation() *Installation { +// GetOrganization returns the Organization field. +func (p *PullRequestTargetEvent) GetOrganization() *Organization { if p == nil { return nil } - return p.Installation + return p.Organization } -// GetOrganization returns the Organization field. -func (p *PullRequestReviewEvent) GetOrganization() *Organization { +// GetPerformedViaGithubApp returns the PerformedViaGithubApp field. +func (p *PullRequestTargetEvent) GetPerformedViaGithubApp() *App { if p == nil { return nil } - return p.Organization + return p.PerformedViaGithubApp } // GetPullRequest returns the PullRequest field. -func (p *PullRequestReviewEvent) GetPullRequest() *PullRequest { +func (p *PullRequestTargetEvent) GetPullRequest() *PullRequest { if p == nil { return nil } @@ -17367,563 +17839,275 @@ func (p *PullRequestReviewEvent) GetPullRequest() *PullRequest { } // GetRepo returns the Repo field. -func (p *PullRequestReviewEvent) GetRepo() *Repository { +func (p *PullRequestTargetEvent) GetRepo() *Repository { if p == nil { return nil } return p.Repo } -// GetReview returns the Review field. -func (p *PullRequestReviewEvent) GetReview() *PullRequestReview { +// GetRequestedReviewer returns the RequestedReviewer field. +func (p *PullRequestTargetEvent) GetRequestedReviewer() *User { if p == nil { return nil } - return p.Review + return p.RequestedReviewer } -// GetSender returns the Sender field. -func (p *PullRequestReviewEvent) GetSender() *User { +// GetRequestedTeam returns the RequestedTeam field. +func (p *PullRequestTargetEvent) GetRequestedTeam() *Team { if p == nil { return nil } - return p.Sender -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewRequest) GetBody() string { - if p == nil || p.Body == nil { - return "" - } - return *p.Body + return p.RequestedTeam } -// GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewRequest) GetCommitID() string { - if p == nil || p.CommitID == nil { - return "" +// GetSender returns the Sender field. +func (p *PullRequestTargetEvent) GetSender() *User { + if p == nil { + return nil } - return *p.CommitID + return p.Sender } -// GetEvent returns the Event field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewRequest) GetEvent() string { - if p == nil || p.Event == nil { - return "" +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (p *PullRequestThread) GetID() int64 { + if p == nil || p.ID == nil { + return 0 } - return *p.Event + return *p.ID } // GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewRequest) GetNodeID() string { +func (p *PullRequestThread) GetNodeID() string { if p == nil || p.NodeID == nil { return "" } return *p.NodeID } -// GetBypassPullRequestAllowances returns the BypassPullRequestAllowances field. -func (p *PullRequestReviewsEnforcement) GetBypassPullRequestAllowances() *BypassPullRequestAllowances { - if p == nil { - return nil +// GetMergablePulls returns the MergablePulls field if it's non-nil, zero value otherwise. +func (p *PullStats) GetMergablePulls() int { + if p == nil || p.MergablePulls == nil { + return 0 } - return p.BypassPullRequestAllowances + return *p.MergablePulls } -// GetDismissalRestrictions returns the DismissalRestrictions field. -func (p *PullRequestReviewsEnforcement) GetDismissalRestrictions() *DismissalRestrictions { - if p == nil { - return nil +// GetMergedPulls returns the MergedPulls field if it's non-nil, zero value otherwise. +func (p *PullStats) GetMergedPulls() int { + if p == nil || p.MergedPulls == nil { + return 0 } - return p.DismissalRestrictions + return *p.MergedPulls } -// GetFrom returns the From field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewsEnforcementLevelChanges) GetFrom() string { - if p == nil || p.From == nil { - return "" +// GetTotalPulls returns the TotalPulls field if it's non-nil, zero value otherwise. +func (p *PullStats) GetTotalPulls() int { + if p == nil || p.TotalPulls == nil { + return 0 } - return *p.From + return *p.TotalPulls } -// GetBypassPullRequestAllowancesRequest returns the BypassPullRequestAllowancesRequest field. -func (p *PullRequestReviewsEnforcementRequest) GetBypassPullRequestAllowancesRequest() *BypassPullRequestAllowancesRequest { - if p == nil { - return nil - } - return p.BypassPullRequestAllowancesRequest -} - -// GetDismissalRestrictionsRequest returns the DismissalRestrictionsRequest field. -func (p *PullRequestReviewsEnforcementRequest) GetDismissalRestrictionsRequest() *DismissalRestrictionsRequest { - if p == nil { - return nil - } - return p.DismissalRestrictionsRequest -} - -// GetRequireLastPushApproval returns the RequireLastPushApproval field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewsEnforcementRequest) GetRequireLastPushApproval() bool { - if p == nil || p.RequireLastPushApproval == nil { - return false - } - return *p.RequireLastPushApproval -} - -// GetBypassPullRequestAllowancesRequest returns the BypassPullRequestAllowancesRequest field. -func (p *PullRequestReviewsEnforcementUpdate) GetBypassPullRequestAllowancesRequest() *BypassPullRequestAllowancesRequest { - if p == nil { - return nil - } - return p.BypassPullRequestAllowancesRequest -} - -// GetDismissalRestrictionsRequest returns the DismissalRestrictionsRequest field. -func (p *PullRequestReviewsEnforcementUpdate) GetDismissalRestrictionsRequest() *DismissalRestrictionsRequest { - if p == nil { - return nil +// GetUnmergablePulls returns the UnmergablePulls field if it's non-nil, zero value otherwise. +func (p *PullStats) GetUnmergablePulls() int { + if p == nil || p.UnmergablePulls == nil { + return 0 } - return p.DismissalRestrictionsRequest + return *p.UnmergablePulls } -// GetDismissStaleReviews returns the DismissStaleReviews field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewsEnforcementUpdate) GetDismissStaleReviews() bool { - if p == nil || p.DismissStaleReviews == nil { - return false +// GetCommits returns the Commits field if it's non-nil, zero value otherwise. +func (p *PunchCard) GetCommits() int { + if p == nil || p.Commits == nil { + return 0 } - return *p.DismissStaleReviews + return *p.Commits } -// GetRequireCodeOwnerReviews returns the RequireCodeOwnerReviews field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewsEnforcementUpdate) GetRequireCodeOwnerReviews() bool { - if p == nil || p.RequireCodeOwnerReviews == nil { - return false +// GetDay returns the Day field if it's non-nil, zero value otherwise. +func (p *PunchCard) GetDay() int { + if p == nil || p.Day == nil { + return 0 } - return *p.RequireCodeOwnerReviews + return *p.Day } -// GetRequireLastPushApproval returns the RequireLastPushApproval field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewsEnforcementUpdate) GetRequireLastPushApproval() bool { - if p == nil || p.RequireLastPushApproval == nil { - return false +// GetHour returns the Hour field if it's non-nil, zero value otherwise. +func (p *PunchCard) GetHour() int { + if p == nil || p.Hour == nil { + return 0 } - return *p.RequireLastPushApproval + return *p.Hour } // GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewThreadEvent) GetAction() string { +func (p *PushEvent) GetAction() string { if p == nil || p.Action == nil { return "" } return *p.Action } -// GetInstallation returns the Installation field. -func (p *PullRequestReviewThreadEvent) GetInstallation() *Installation { - if p == nil { - return nil +// GetAfter returns the After field if it's non-nil, zero value otherwise. +func (p *PushEvent) GetAfter() string { + if p == nil || p.After == nil { + return "" } - return p.Installation + return *p.After } -// GetOrg returns the Org field. -func (p *PullRequestReviewThreadEvent) GetOrg() *Organization { - if p == nil { - return nil +// GetBaseRef returns the BaseRef field if it's non-nil, zero value otherwise. +func (p *PushEvent) GetBaseRef() string { + if p == nil || p.BaseRef == nil { + return "" } - return p.Org + return *p.BaseRef } -// GetPullRequest returns the PullRequest field. -func (p *PullRequestReviewThreadEvent) GetPullRequest() *PullRequest { - if p == nil { - return nil +// GetBefore returns the Before field if it's non-nil, zero value otherwise. +func (p *PushEvent) GetBefore() string { + if p == nil || p.Before == nil { + return "" } - return p.PullRequest + return *p.Before } -// GetRepo returns the Repo field. -func (p *PullRequestReviewThreadEvent) GetRepo() *Repository { - if p == nil { +// GetCommits returns the Commits slice if it's non-nil, nil otherwise. +func (p *PushEvent) GetCommits() []*HeadCommit { + if p == nil || p.Commits == nil { return nil } - return p.Repo + return p.Commits } -// GetSender returns the Sender field. -func (p *PullRequestReviewThreadEvent) GetSender() *User { - if p == nil { - return nil +// GetCompare returns the Compare field if it's non-nil, zero value otherwise. +func (p *PushEvent) GetCompare() string { + if p == nil || p.Compare == nil { + return "" } - return p.Sender + return *p.Compare } -// GetThread returns the Thread field. -func (p *PullRequestReviewThreadEvent) GetThread() *PullRequestThread { - if p == nil { - return nil +// GetCreated returns the Created field if it's non-nil, zero value otherwise. +func (p *PushEvent) GetCreated() bool { + if p == nil || p.Created == nil { + return false } - return p.Thread + return *p.Created } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *PullRequestTargetEvent) GetAction() string { - if p == nil || p.Action == nil { - return "" +// GetDeleted returns the Deleted field if it's non-nil, zero value otherwise. +func (p *PushEvent) GetDeleted() bool { + if p == nil || p.Deleted == nil { + return false } - return *p.Action + return *p.Deleted } -// GetAfter returns the After field if it's non-nil, zero value otherwise. -func (p *PullRequestTargetEvent) GetAfter() string { - if p == nil || p.After == nil { - return "" +// GetDistinctSize returns the DistinctSize field if it's non-nil, zero value otherwise. +func (p *PushEvent) GetDistinctSize() int { + if p == nil || p.DistinctSize == nil { + return 0 } - return *p.After + return *p.DistinctSize } -// GetAssignee returns the Assignee field. -func (p *PullRequestTargetEvent) GetAssignee() *User { - if p == nil { - return nil +// GetForced returns the Forced field if it's non-nil, zero value otherwise. +func (p *PushEvent) GetForced() bool { + if p == nil || p.Forced == nil { + return false } - return p.Assignee + return *p.Forced } -// GetBefore returns the Before field if it's non-nil, zero value otherwise. -func (p *PullRequestTargetEvent) GetBefore() string { - if p == nil || p.Before == nil { +// GetHead returns the Head field if it's non-nil, zero value otherwise. +func (p *PushEvent) GetHead() string { + if p == nil || p.Head == nil { return "" } - return *p.Before + return *p.Head } -// GetChanges returns the Changes field. -func (p *PullRequestTargetEvent) GetChanges() *EditChange { +// GetHeadCommit returns the HeadCommit field. +func (p *PushEvent) GetHeadCommit() *HeadCommit { if p == nil { return nil } - return p.Changes + return p.HeadCommit } // GetInstallation returns the Installation field. -func (p *PullRequestTargetEvent) GetInstallation() *Installation { +func (p *PushEvent) GetInstallation() *Installation { if p == nil { return nil } return p.Installation } -// GetLabel returns the Label field. -func (p *PullRequestTargetEvent) GetLabel() *Label { - if p == nil { - return nil - } - return p.Label -} - -// GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (p *PullRequestTargetEvent) GetNumber() int { - if p == nil || p.Number == nil { - return 0 - } - return *p.Number -} - // GetOrganization returns the Organization field. -func (p *PullRequestTargetEvent) GetOrganization() *Organization { +func (p *PushEvent) GetOrganization() *Organization { if p == nil { return nil } return p.Organization } -// GetPerformedViaGithubApp returns the PerformedViaGithubApp field. -func (p *PullRequestTargetEvent) GetPerformedViaGithubApp() *App { - if p == nil { - return nil - } - return p.PerformedViaGithubApp -} - -// GetPullRequest returns the PullRequest field. -func (p *PullRequestTargetEvent) GetPullRequest() *PullRequest { +// GetPusher returns the Pusher field. +func (p *PushEvent) GetPusher() *CommitAuthor { if p == nil { return nil } - return p.PullRequest + return p.Pusher } -// GetRepo returns the Repo field. -func (p *PullRequestTargetEvent) GetRepo() *Repository { - if p == nil { - return nil +// GetPushID returns the PushID field if it's non-nil, zero value otherwise. +func (p *PushEvent) GetPushID() int64 { + if p == nil || p.PushID == nil { + return 0 } - return p.Repo + return *p.PushID } -// GetRequestedReviewer returns the RequestedReviewer field. -func (p *PullRequestTargetEvent) GetRequestedReviewer() *User { - if p == nil { - return nil +// GetRef returns the Ref field if it's non-nil, zero value otherwise. +func (p *PushEvent) GetRef() string { + if p == nil || p.Ref == nil { + return "" } - return p.RequestedReviewer + return *p.Ref } -// GetRequestedTeam returns the RequestedTeam field. -func (p *PullRequestTargetEvent) GetRequestedTeam() *Team { +// GetRepo returns the Repo field. +func (p *PushEvent) GetRepo() *PushEventRepository { if p == nil { return nil } - return p.RequestedTeam + return p.Repo } // GetSender returns the Sender field. -func (p *PullRequestTargetEvent) GetSender() *User { +func (p *PushEvent) GetSender() *User { if p == nil { return nil } return p.Sender } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *PullRequestThread) GetID() int64 { - if p == nil || p.ID == nil { +// GetSize returns the Size field if it's non-nil, zero value otherwise. +func (p *PushEvent) GetSize() int { + if p == nil || p.Size == nil { return 0 } - return *p.ID + return *p.Size } -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *PullRequestThread) GetNodeID() string { - if p == nil || p.NodeID == nil { +// GetEmail returns the Email field if it's non-nil, zero value otherwise. +func (p *PushEventRepoOwner) GetEmail() string { + if p == nil || p.Email == nil { return "" } - return *p.NodeID -} - -// GetMergablePulls returns the MergablePulls field if it's non-nil, zero value otherwise. -func (p *PullStats) GetMergablePulls() int { - if p == nil || p.MergablePulls == nil { - return 0 - } - return *p.MergablePulls -} - -// GetMergedPulls returns the MergedPulls field if it's non-nil, zero value otherwise. -func (p *PullStats) GetMergedPulls() int { - if p == nil || p.MergedPulls == nil { - return 0 - } - return *p.MergedPulls -} - -// GetTotalPulls returns the TotalPulls field if it's non-nil, zero value otherwise. -func (p *PullStats) GetTotalPulls() int { - if p == nil || p.TotalPulls == nil { - return 0 - } - return *p.TotalPulls -} - -// GetUnmergablePulls returns the UnmergablePulls field if it's non-nil, zero value otherwise. -func (p *PullStats) GetUnmergablePulls() int { - if p == nil || p.UnmergablePulls == nil { - return 0 - } - return *p.UnmergablePulls -} - -// GetCommits returns the Commits field if it's non-nil, zero value otherwise. -func (p *PunchCard) GetCommits() int { - if p == nil || p.Commits == nil { - return 0 - } - return *p.Commits -} - -// GetDay returns the Day field if it's non-nil, zero value otherwise. -func (p *PunchCard) GetDay() int { - if p == nil || p.Day == nil { - return 0 - } - return *p.Day -} - -// GetHour returns the Hour field if it's non-nil, zero value otherwise. -func (p *PunchCard) GetHour() int { - if p == nil || p.Hour == nil { - return 0 - } - return *p.Hour -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetAction() string { - if p == nil || p.Action == nil { - return "" - } - return *p.Action -} - -// GetAfter returns the After field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetAfter() string { - if p == nil || p.After == nil { - return "" - } - return *p.After -} - -// GetBaseRef returns the BaseRef field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetBaseRef() string { - if p == nil || p.BaseRef == nil { - return "" - } - return *p.BaseRef -} - -// GetBefore returns the Before field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetBefore() string { - if p == nil || p.Before == nil { - return "" - } - return *p.Before -} - -// GetCommits returns the Commits slice if it's non-nil, nil otherwise. -func (p *PushEvent) GetCommits() []*HeadCommit { - if p == nil || p.Commits == nil { - return nil - } - return p.Commits -} - -// GetCompare returns the Compare field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetCompare() string { - if p == nil || p.Compare == nil { - return "" - } - return *p.Compare -} - -// GetCreated returns the Created field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetCreated() bool { - if p == nil || p.Created == nil { - return false - } - return *p.Created -} - -// GetDeleted returns the Deleted field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetDeleted() bool { - if p == nil || p.Deleted == nil { - return false - } - return *p.Deleted -} - -// GetDistinctSize returns the DistinctSize field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetDistinctSize() int { - if p == nil || p.DistinctSize == nil { - return 0 - } - return *p.DistinctSize -} - -// GetForced returns the Forced field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetForced() bool { - if p == nil || p.Forced == nil { - return false - } - return *p.Forced -} - -// GetHead returns the Head field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetHead() string { - if p == nil || p.Head == nil { - return "" - } - return *p.Head -} - -// GetHeadCommit returns the HeadCommit field. -func (p *PushEvent) GetHeadCommit() *HeadCommit { - if p == nil { - return nil - } - return p.HeadCommit -} - -// GetInstallation returns the Installation field. -func (p *PushEvent) GetInstallation() *Installation { - if p == nil { - return nil - } - return p.Installation -} - -// GetOrganization returns the Organization field. -func (p *PushEvent) GetOrganization() *Organization { - if p == nil { - return nil - } - return p.Organization -} - -// GetPusher returns the Pusher field. -func (p *PushEvent) GetPusher() *CommitAuthor { - if p == nil { - return nil - } - return p.Pusher -} - -// GetPushID returns the PushID field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetPushID() int64 { - if p == nil || p.PushID == nil { - return 0 - } - return *p.PushID -} - -// GetRef returns the Ref field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetRef() string { - if p == nil || p.Ref == nil { - return "" - } - return *p.Ref -} - -// GetRepo returns the Repo field. -func (p *PushEvent) GetRepo() *PushEventRepository { - if p == nil { - return nil - } - return p.Repo -} - -// GetSender returns the Sender field. -func (p *PushEvent) GetSender() *User { - if p == nil { - return nil - } - return p.Sender -} - -// GetSize returns the Size field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetSize() int { - if p == nil || p.Size == nil { - return 0 - } - return *p.Size -} - -// GetEmail returns the Email field if it's non-nil, zero value otherwise. -func (p *PushEventRepoOwner) GetEmail() string { - if p == nil || p.Email == nil { - return "" - } - return *p.Email + return *p.Email } // GetName returns the Name field if it's non-nil, zero value otherwise. @@ -18291,1019 +18475,1547 @@ func (r *RateLimits) GetSCIM() *Rate { if r == nil { return nil } - return r.SCIM + return r.SCIM +} + +// GetSearch returns the Search field. +func (r *RateLimits) GetSearch() *Rate { + if r == nil { + return nil + } + return r.Search +} + +// GetSourceImport returns the SourceImport field. +func (r *RateLimits) GetSourceImport() *Rate { + if r == nil { + return nil + } + return r.SourceImport +} + +// GetContent returns the Content field if it's non-nil, zero value otherwise. +func (r *Reaction) GetContent() string { + if r == nil || r.Content == nil { + return "" + } + return *r.Content +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (r *Reaction) GetID() int64 { + if r == nil || r.ID == nil { + return 0 + } + return *r.ID +} + +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (r *Reaction) GetNodeID() string { + if r == nil || r.NodeID == nil { + return "" + } + return *r.NodeID +} + +// GetUser returns the User field. +func (r *Reaction) GetUser() *User { + if r == nil { + return nil + } + return r.User +} + +// GetConfused returns the Confused field if it's non-nil, zero value otherwise. +func (r *Reactions) GetConfused() int { + if r == nil || r.Confused == nil { + return 0 + } + return *r.Confused +} + +// GetEyes returns the Eyes field if it's non-nil, zero value otherwise. +func (r *Reactions) GetEyes() int { + if r == nil || r.Eyes == nil { + return 0 + } + return *r.Eyes +} + +// GetHeart returns the Heart field if it's non-nil, zero value otherwise. +func (r *Reactions) GetHeart() int { + if r == nil || r.Heart == nil { + return 0 + } + return *r.Heart +} + +// GetHooray returns the Hooray field if it's non-nil, zero value otherwise. +func (r *Reactions) GetHooray() int { + if r == nil || r.Hooray == nil { + return 0 + } + return *r.Hooray +} + +// GetLaugh returns the Laugh field if it's non-nil, zero value otherwise. +func (r *Reactions) GetLaugh() int { + if r == nil || r.Laugh == nil { + return 0 + } + return *r.Laugh +} + +// GetMinusOne returns the MinusOne field if it's non-nil, zero value otherwise. +func (r *Reactions) GetMinusOne() int { + if r == nil || r.MinusOne == nil { + return 0 + } + return *r.MinusOne +} + +// GetPlusOne returns the PlusOne field if it's non-nil, zero value otherwise. +func (r *Reactions) GetPlusOne() int { + if r == nil || r.PlusOne == nil { + return 0 + } + return *r.PlusOne +} + +// GetRocket returns the Rocket field if it's non-nil, zero value otherwise. +func (r *Reactions) GetRocket() int { + if r == nil || r.Rocket == nil { + return 0 + } + return *r.Rocket +} + +// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. +func (r *Reactions) GetTotalCount() int { + if r == nil || r.TotalCount == nil { + return 0 + } + return *r.TotalCount +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (r *Reactions) GetURL() string { + if r == nil || r.URL == nil { + return "" + } + return *r.URL +} + +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (r *Reference) GetNodeID() string { + if r == nil || r.NodeID == nil { + return "" + } + return *r.NodeID +} + +// GetObject returns the Object field. +func (r *Reference) GetObject() *GitObject { + if r == nil { + return nil + } + return r.Object +} + +// GetRef returns the Ref field if it's non-nil, zero value otherwise. +func (r *Reference) GetRef() string { + if r == nil || r.Ref == nil { + return "" + } + return *r.Ref +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (r *Reference) GetURL() string { + if r == nil || r.URL == nil { + return "" + } + return *r.URL +} + +// GetPath returns the Path field if it's non-nil, zero value otherwise. +func (r *ReferencedWorkflow) GetPath() string { + if r == nil || r.Path == nil { + return "" + } + return *r.Path +} + +// GetRef returns the Ref field if it's non-nil, zero value otherwise. +func (r *ReferencedWorkflow) GetRef() string { + if r == nil || r.Ref == nil { + return "" + } + return *r.Ref +} + +// GetSHA returns the SHA field if it's non-nil, zero value otherwise. +func (r *ReferencedWorkflow) GetSHA() string { + if r == nil || r.SHA == nil { + return "" + } + return *r.SHA +} + +// GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. +func (r *RegistrationToken) GetExpiresAt() Timestamp { + if r == nil || r.ExpiresAt == nil { + return Timestamp{} + } + return *r.ExpiresAt +} + +// GetToken returns the Token field if it's non-nil, zero value otherwise. +func (r *RegistrationToken) GetToken() string { + if r == nil || r.Token == nil { + return "" + } + return *r.Token +} + +// GetBrowserDownloadURL returns the BrowserDownloadURL field if it's non-nil, zero value otherwise. +func (r *ReleaseAsset) GetBrowserDownloadURL() string { + if r == nil || r.BrowserDownloadURL == nil { + return "" + } + return *r.BrowserDownloadURL +} + +// GetContentType returns the ContentType field if it's non-nil, zero value otherwise. +func (r *ReleaseAsset) GetContentType() string { + if r == nil || r.ContentType == nil { + return "" + } + return *r.ContentType +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (r *ReleaseAsset) GetCreatedAt() Timestamp { + if r == nil || r.CreatedAt == nil { + return Timestamp{} + } + return *r.CreatedAt +} + +// GetDownloadCount returns the DownloadCount field if it's non-nil, zero value otherwise. +func (r *ReleaseAsset) GetDownloadCount() int { + if r == nil || r.DownloadCount == nil { + return 0 + } + return *r.DownloadCount +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (r *ReleaseAsset) GetID() int64 { + if r == nil || r.ID == nil { + return 0 + } + return *r.ID +} + +// GetLabel returns the Label field if it's non-nil, zero value otherwise. +func (r *ReleaseAsset) GetLabel() string { + if r == nil || r.Label == nil { + return "" + } + return *r.Label +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (r *ReleaseAsset) GetName() string { + if r == nil || r.Name == nil { + return "" + } + return *r.Name +} + +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (r *ReleaseAsset) GetNodeID() string { + if r == nil || r.NodeID == nil { + return "" + } + return *r.NodeID +} + +// GetSize returns the Size field if it's non-nil, zero value otherwise. +func (r *ReleaseAsset) GetSize() int { + if r == nil || r.Size == nil { + return 0 + } + return *r.Size +} + +// GetState returns the State field if it's non-nil, zero value otherwise. +func (r *ReleaseAsset) GetState() string { + if r == nil || r.State == nil { + return "" + } + return *r.State +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (r *ReleaseAsset) GetUpdatedAt() Timestamp { + if r == nil || r.UpdatedAt == nil { + return Timestamp{} + } + return *r.UpdatedAt +} + +// GetUploader returns the Uploader field. +func (r *ReleaseAsset) GetUploader() *User { + if r == nil { + return nil + } + return r.Uploader +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (r *ReleaseAsset) GetURL() string { + if r == nil || r.URL == nil { + return "" + } + return *r.URL +} + +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (r *ReleaseEvent) GetAction() string { + if r == nil || r.Action == nil { + return "" + } + return *r.Action +} + +// GetInstallation returns the Installation field. +func (r *ReleaseEvent) GetInstallation() *Installation { + if r == nil { + return nil + } + return r.Installation +} + +// GetOrg returns the Org field. +func (r *ReleaseEvent) GetOrg() *Organization { + if r == nil { + return nil + } + return r.Org +} + +// GetRelease returns the Release field. +func (r *ReleaseEvent) GetRelease() *RepositoryRelease { + if r == nil { + return nil + } + return r.Release +} + +// GetRepo returns the Repo field. +func (r *ReleaseEvent) GetRepo() *Repository { + if r == nil { + return nil + } + return r.Repo +} + +// GetSender returns the Sender field. +func (r *ReleaseEvent) GetSender() *User { + if r == nil { + return nil + } + return r.Sender +} + +// GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. +func (r *RemoveToken) GetExpiresAt() Timestamp { + if r == nil || r.ExpiresAt == nil { + return Timestamp{} + } + return *r.ExpiresAt +} + +// GetToken returns the Token field if it's non-nil, zero value otherwise. +func (r *RemoveToken) GetToken() string { + if r == nil || r.Token == nil { + return "" + } + return *r.Token +} + +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (r *Rename) GetFrom() string { + if r == nil || r.From == nil { + return "" + } + return *r.From +} + +// GetTo returns the To field if it's non-nil, zero value otherwise. +func (r *Rename) GetTo() string { + if r == nil || r.To == nil { + return "" + } + return *r.To +} + +// GetMessage returns the Message field if it's non-nil, zero value otherwise. +func (r *RenameOrgResponse) GetMessage() string { + if r == nil || r.Message == nil { + return "" + } + return *r.Message +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (r *RenameOrgResponse) GetURL() string { + if r == nil || r.URL == nil { + return "" + } + return *r.URL +} + +// GetLogin returns the Login field if it's non-nil, zero value otherwise. +func (r *RepoAdvisoryCredit) GetLogin() string { + if r == nil || r.Login == nil { + return "" + } + return *r.Login +} + +// GetType returns the Type field if it's non-nil, zero value otherwise. +func (r *RepoAdvisoryCredit) GetType() string { + if r == nil || r.Type == nil { + return "" + } + return *r.Type +} + +// GetState returns the State field if it's non-nil, zero value otherwise. +func (r *RepoAdvisoryCreditDetailed) GetState() string { + if r == nil || r.State == nil { + return "" + } + return *r.State +} + +// GetType returns the Type field if it's non-nil, zero value otherwise. +func (r *RepoAdvisoryCreditDetailed) GetType() string { + if r == nil || r.Type == nil { + return "" + } + return *r.Type +} + +// GetUser returns the User field. +func (r *RepoAdvisoryCreditDetailed) GetUser() *User { + if r == nil { + return nil + } + return r.User +} + +// GetDownloadLocation returns the DownloadLocation field if it's non-nil, zero value otherwise. +func (r *RepoDependencies) GetDownloadLocation() string { + if r == nil || r.DownloadLocation == nil { + return "" + } + return *r.DownloadLocation +} + +// GetFilesAnalyzed returns the FilesAnalyzed field if it's non-nil, zero value otherwise. +func (r *RepoDependencies) GetFilesAnalyzed() bool { + if r == nil || r.FilesAnalyzed == nil { + return false + } + return *r.FilesAnalyzed +} + +// GetLicenseConcluded returns the LicenseConcluded field if it's non-nil, zero value otherwise. +func (r *RepoDependencies) GetLicenseConcluded() string { + if r == nil || r.LicenseConcluded == nil { + return "" + } + return *r.LicenseConcluded +} + +// GetLicenseDeclared returns the LicenseDeclared field if it's non-nil, zero value otherwise. +func (r *RepoDependencies) GetLicenseDeclared() string { + if r == nil || r.LicenseDeclared == nil { + return "" + } + return *r.LicenseDeclared +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (r *RepoDependencies) GetName() string { + if r == nil || r.Name == nil { + return "" + } + return *r.Name +} + +// GetSPDXID returns the SPDXID field if it's non-nil, zero value otherwise. +func (r *RepoDependencies) GetSPDXID() string { + if r == nil || r.SPDXID == nil { + return "" + } + return *r.SPDXID +} + +// GetVersionInfo returns the VersionInfo field if it's non-nil, zero value otherwise. +func (r *RepoDependencies) GetVersionInfo() string { + if r == nil || r.VersionInfo == nil { + return "" + } + return *r.VersionInfo +} + +// GetBranch returns the Branch field if it's non-nil, zero value otherwise. +func (r *RepoMergeUpstreamRequest) GetBranch() string { + if r == nil || r.Branch == nil { + return "" + } + return *r.Branch +} + +// GetBaseBranch returns the BaseBranch field if it's non-nil, zero value otherwise. +func (r *RepoMergeUpstreamResult) GetBaseBranch() string { + if r == nil || r.BaseBranch == nil { + return "" + } + return *r.BaseBranch +} + +// GetMergeType returns the MergeType field if it's non-nil, zero value otherwise. +func (r *RepoMergeUpstreamResult) GetMergeType() string { + if r == nil || r.MergeType == nil { + return "" + } + return *r.MergeType +} + +// GetMessage returns the Message field if it's non-nil, zero value otherwise. +func (r *RepoMergeUpstreamResult) GetMessage() string { + if r == nil || r.Message == nil { + return "" + } + return *r.Message +} + +// GetFrom returns the From field if it's non-nil, zero value otherwise. +func (r *RepoName) GetFrom() string { + if r == nil || r.From == nil { + return "" + } + return *r.From } -// GetSearch returns the Search field. -func (r *RateLimits) GetSearch() *Rate { - if r == nil { - return nil +// GetBadgeURL returns the BadgeURL field if it's non-nil, zero value otherwise. +func (r *RepoRequiredWorkflow) GetBadgeURL() string { + if r == nil || r.BadgeURL == nil { + return "" } - return r.Search + return *r.BadgeURL } -// GetSourceImport returns the SourceImport field. -func (r *RateLimits) GetSourceImport() *Rate { - if r == nil { - return nil +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (r *RepoRequiredWorkflow) GetCreatedAt() Timestamp { + if r == nil || r.CreatedAt == nil { + return Timestamp{} } - return r.SourceImport + return *r.CreatedAt } -// GetContent returns the Content field if it's non-nil, zero value otherwise. -func (r *Reaction) GetContent() string { - if r == nil || r.Content == nil { +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (r *RepoRequiredWorkflow) GetHTMLURL() string { + if r == nil || r.HTMLURL == nil { return "" } - return *r.Content + return *r.HTMLURL } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *Reaction) GetID() int64 { +func (r *RepoRequiredWorkflow) GetID() int64 { if r == nil || r.ID == nil { return 0 } return *r.ID } -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *Reaction) GetNodeID() string { - if r == nil || r.NodeID == nil { +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (r *RepoRequiredWorkflow) GetName() string { + if r == nil || r.Name == nil { return "" } - return *r.NodeID + return *r.Name } -// GetUser returns the User field. -func (r *Reaction) GetUser() *User { - if r == nil { - return nil +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (r *RepoRequiredWorkflow) GetNodeID() string { + if r == nil || r.NodeID == nil { + return "" } - return r.User + return *r.NodeID } -// GetConfused returns the Confused field if it's non-nil, zero value otherwise. -func (r *Reactions) GetConfused() int { - if r == nil || r.Confused == nil { - return 0 +// GetPath returns the Path field if it's non-nil, zero value otherwise. +func (r *RepoRequiredWorkflow) GetPath() string { + if r == nil || r.Path == nil { + return "" } - return *r.Confused + return *r.Path } -// GetEyes returns the Eyes field if it's non-nil, zero value otherwise. -func (r *Reactions) GetEyes() int { - if r == nil || r.Eyes == nil { - return 0 +// GetSourceRepository returns the SourceRepository field. +func (r *RepoRequiredWorkflow) GetSourceRepository() *Repository { + if r == nil { + return nil } - return *r.Eyes + return r.SourceRepository } -// GetHeart returns the Heart field if it's non-nil, zero value otherwise. -func (r *Reactions) GetHeart() int { - if r == nil || r.Heart == nil { - return 0 +// GetState returns the State field if it's non-nil, zero value otherwise. +func (r *RepoRequiredWorkflow) GetState() string { + if r == nil || r.State == nil { + return "" } - return *r.Heart + return *r.State } -// GetHooray returns the Hooray field if it's non-nil, zero value otherwise. -func (r *Reactions) GetHooray() int { - if r == nil || r.Hooray == nil { - return 0 +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (r *RepoRequiredWorkflow) GetUpdatedAt() Timestamp { + if r == nil || r.UpdatedAt == nil { + return Timestamp{} } - return *r.Hooray + return *r.UpdatedAt } -// GetLaugh returns the Laugh field if it's non-nil, zero value otherwise. -func (r *Reactions) GetLaugh() int { - if r == nil || r.Laugh == nil { - return 0 +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (r *RepoRequiredWorkflow) GetURL() string { + if r == nil || r.URL == nil { + return "" } - return *r.Laugh + return *r.URL } -// GetMinusOne returns the MinusOne field if it's non-nil, zero value otherwise. -func (r *Reactions) GetMinusOne() int { - if r == nil || r.MinusOne == nil { +// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. +func (r *RepoRequiredWorkflows) GetTotalCount() int { + if r == nil || r.TotalCount == nil { return 0 } - return *r.MinusOne + return *r.TotalCount } -// GetPlusOne returns the PlusOne field if it's non-nil, zero value otherwise. -func (r *Reactions) GetPlusOne() int { - if r == nil || r.PlusOne == nil { - return 0 +// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. +func (r *RepositoriesSearchResult) GetIncompleteResults() bool { + if r == nil || r.IncompleteResults == nil { + return false } - return *r.PlusOne + return *r.IncompleteResults } -// GetRocket returns the Rocket field if it's non-nil, zero value otherwise. -func (r *Reactions) GetRocket() int { - if r == nil || r.Rocket == nil { +// GetTotal returns the Total field if it's non-nil, zero value otherwise. +func (r *RepositoriesSearchResult) GetTotal() int { + if r == nil || r.Total == nil { return 0 } - return *r.Rocket + return *r.Total } -// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. -func (r *Reactions) GetTotalCount() int { - if r == nil || r.TotalCount == nil { - return 0 +// GetAllowAutoMerge returns the AllowAutoMerge field if it's non-nil, zero value otherwise. +func (r *Repository) GetAllowAutoMerge() bool { + if r == nil || r.AllowAutoMerge == nil { + return false } - return *r.TotalCount + return *r.AllowAutoMerge } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *Reactions) GetURL() string { - if r == nil || r.URL == nil { - return "" +// GetAllowForking returns the AllowForking field if it's non-nil, zero value otherwise. +func (r *Repository) GetAllowForking() bool { + if r == nil || r.AllowForking == nil { + return false } - return *r.URL + return *r.AllowForking } -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *Reference) GetNodeID() string { - if r == nil || r.NodeID == nil { - return "" +// GetAllowMergeCommit returns the AllowMergeCommit field if it's non-nil, zero value otherwise. +func (r *Repository) GetAllowMergeCommit() bool { + if r == nil || r.AllowMergeCommit == nil { + return false } - return *r.NodeID + return *r.AllowMergeCommit } -// GetObject returns the Object field. -func (r *Reference) GetObject() *GitObject { - if r == nil { - return nil +// GetAllowRebaseMerge returns the AllowRebaseMerge field if it's non-nil, zero value otherwise. +func (r *Repository) GetAllowRebaseMerge() bool { + if r == nil || r.AllowRebaseMerge == nil { + return false } - return r.Object + return *r.AllowRebaseMerge } -// GetRef returns the Ref field if it's non-nil, zero value otherwise. -func (r *Reference) GetRef() string { - if r == nil || r.Ref == nil { - return "" +// GetAllowSquashMerge returns the AllowSquashMerge field if it's non-nil, zero value otherwise. +func (r *Repository) GetAllowSquashMerge() bool { + if r == nil || r.AllowSquashMerge == nil { + return false } - return *r.Ref + return *r.AllowSquashMerge } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *Reference) GetURL() string { - if r == nil || r.URL == nil { - return "" +// GetAllowUpdateBranch returns the AllowUpdateBranch field if it's non-nil, zero value otherwise. +func (r *Repository) GetAllowUpdateBranch() bool { + if r == nil || r.AllowUpdateBranch == nil { + return false } - return *r.URL + return *r.AllowUpdateBranch } -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (r *ReferencedWorkflow) GetPath() string { - if r == nil || r.Path == nil { - return "" +// GetArchived returns the Archived field if it's non-nil, zero value otherwise. +func (r *Repository) GetArchived() bool { + if r == nil || r.Archived == nil { + return false } - return *r.Path + return *r.Archived } -// GetRef returns the Ref field if it's non-nil, zero value otherwise. -func (r *ReferencedWorkflow) GetRef() string { - if r == nil || r.Ref == nil { +// GetArchiveURL returns the ArchiveURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetArchiveURL() string { + if r == nil || r.ArchiveURL == nil { return "" } - return *r.Ref + return *r.ArchiveURL } -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (r *ReferencedWorkflow) GetSHA() string { - if r == nil || r.SHA == nil { +// GetAssigneesURL returns the AssigneesURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetAssigneesURL() string { + if r == nil || r.AssigneesURL == nil { return "" } - return *r.SHA -} - -// GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. -func (r *RegistrationToken) GetExpiresAt() Timestamp { - if r == nil || r.ExpiresAt == nil { - return Timestamp{} - } - return *r.ExpiresAt + return *r.AssigneesURL } -// GetToken returns the Token field if it's non-nil, zero value otherwise. -func (r *RegistrationToken) GetToken() string { - if r == nil || r.Token == nil { - return "" +// GetAutoInit returns the AutoInit field if it's non-nil, zero value otherwise. +func (r *Repository) GetAutoInit() bool { + if r == nil || r.AutoInit == nil { + return false } - return *r.Token + return *r.AutoInit } -// GetBrowserDownloadURL returns the BrowserDownloadURL field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetBrowserDownloadURL() string { - if r == nil || r.BrowserDownloadURL == nil { +// GetBlobsURL returns the BlobsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetBlobsURL() string { + if r == nil || r.BlobsURL == nil { return "" } - return *r.BrowserDownloadURL + return *r.BlobsURL } -// GetContentType returns the ContentType field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetContentType() string { - if r == nil || r.ContentType == nil { +// GetBranchesURL returns the BranchesURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetBranchesURL() string { + if r == nil || r.BranchesURL == nil { return "" } - return *r.ContentType -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetCreatedAt() Timestamp { - if r == nil || r.CreatedAt == nil { - return Timestamp{} - } - return *r.CreatedAt + return *r.BranchesURL } -// GetDownloadCount returns the DownloadCount field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetDownloadCount() int { - if r == nil || r.DownloadCount == nil { - return 0 +// GetCloneURL returns the CloneURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetCloneURL() string { + if r == nil || r.CloneURL == nil { + return "" } - return *r.DownloadCount + return *r.CloneURL } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetID() int64 { - if r == nil || r.ID == nil { - return 0 +// GetCodeOfConduct returns the CodeOfConduct field. +func (r *Repository) GetCodeOfConduct() *CodeOfConduct { + if r == nil { + return nil } - return *r.ID + return r.CodeOfConduct } -// GetLabel returns the Label field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetLabel() string { - if r == nil || r.Label == nil { +// GetCollaboratorsURL returns the CollaboratorsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetCollaboratorsURL() string { + if r == nil || r.CollaboratorsURL == nil { return "" } - return *r.Label + return *r.CollaboratorsURL } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetName() string { - if r == nil || r.Name == nil { +// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetCommentsURL() string { + if r == nil || r.CommentsURL == nil { return "" } - return *r.Name + return *r.CommentsURL } -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetNodeID() string { - if r == nil || r.NodeID == nil { +// GetCommitsURL returns the CommitsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetCommitsURL() string { + if r == nil || r.CommitsURL == nil { return "" } - return *r.NodeID + return *r.CommitsURL } -// GetSize returns the Size field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetSize() int { - if r == nil || r.Size == nil { - return 0 +// GetCompareURL returns the CompareURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetCompareURL() string { + if r == nil || r.CompareURL == nil { + return "" } - return *r.Size + return *r.CompareURL } -// GetState returns the State field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetState() string { - if r == nil || r.State == nil { +// GetContentsURL returns the ContentsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetContentsURL() string { + if r == nil || r.ContentsURL == nil { return "" } - return *r.State + return *r.ContentsURL } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetUpdatedAt() Timestamp { - if r == nil || r.UpdatedAt == nil { - return Timestamp{} +// GetContributorsURL returns the ContributorsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetContributorsURL() string { + if r == nil || r.ContributorsURL == nil { + return "" } - return *r.UpdatedAt + return *r.ContributorsURL } -// GetUploader returns the Uploader field. -func (r *ReleaseAsset) GetUploader() *User { - if r == nil { - return nil +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (r *Repository) GetCreatedAt() Timestamp { + if r == nil || r.CreatedAt == nil { + return Timestamp{} } - return r.Uploader + return *r.CreatedAt } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetURL() string { - if r == nil || r.URL == nil { +// GetDefaultBranch returns the DefaultBranch field if it's non-nil, zero value otherwise. +func (r *Repository) GetDefaultBranch() string { + if r == nil || r.DefaultBranch == nil { return "" } - return *r.URL + return *r.DefaultBranch } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (r *ReleaseEvent) GetAction() string { - if r == nil || r.Action == nil { - return "" +// GetDeleteBranchOnMerge returns the DeleteBranchOnMerge field if it's non-nil, zero value otherwise. +func (r *Repository) GetDeleteBranchOnMerge() bool { + if r == nil || r.DeleteBranchOnMerge == nil { + return false } - return *r.Action + return *r.DeleteBranchOnMerge } -// GetInstallation returns the Installation field. -func (r *ReleaseEvent) GetInstallation() *Installation { - if r == nil { - return nil +// GetDeploymentsURL returns the DeploymentsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetDeploymentsURL() string { + if r == nil || r.DeploymentsURL == nil { + return "" } - return r.Installation + return *r.DeploymentsURL } -// GetOrg returns the Org field. -func (r *ReleaseEvent) GetOrg() *Organization { - if r == nil { - return nil +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (r *Repository) GetDescription() string { + if r == nil || r.Description == nil { + return "" } - return r.Org + return *r.Description } -// GetRelease returns the Release field. -func (r *ReleaseEvent) GetRelease() *RepositoryRelease { - if r == nil { - return nil +// GetDisabled returns the Disabled field if it's non-nil, zero value otherwise. +func (r *Repository) GetDisabled() bool { + if r == nil || r.Disabled == nil { + return false } - return r.Release + return *r.Disabled } -// GetRepo returns the Repo field. -func (r *ReleaseEvent) GetRepo() *Repository { - if r == nil { - return nil +// GetDownloadsURL returns the DownloadsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetDownloadsURL() string { + if r == nil || r.DownloadsURL == nil { + return "" } - return r.Repo + return *r.DownloadsURL } -// GetSender returns the Sender field. -func (r *ReleaseEvent) GetSender() *User { - if r == nil { - return nil +// GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetEventsURL() string { + if r == nil || r.EventsURL == nil { + return "" } - return r.Sender + return *r.EventsURL } -// GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. -func (r *RemoveToken) GetExpiresAt() Timestamp { - if r == nil || r.ExpiresAt == nil { - return Timestamp{} +// GetFork returns the Fork field if it's non-nil, zero value otherwise. +func (r *Repository) GetFork() bool { + if r == nil || r.Fork == nil { + return false } - return *r.ExpiresAt + return *r.Fork } -// GetToken returns the Token field if it's non-nil, zero value otherwise. -func (r *RemoveToken) GetToken() string { - if r == nil || r.Token == nil { - return "" +// GetForksCount returns the ForksCount field if it's non-nil, zero value otherwise. +func (r *Repository) GetForksCount() int { + if r == nil || r.ForksCount == nil { + return 0 } - return *r.Token + return *r.ForksCount } -// GetFrom returns the From field if it's non-nil, zero value otherwise. -func (r *Rename) GetFrom() string { - if r == nil || r.From == nil { +// GetForksURL returns the ForksURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetForksURL() string { + if r == nil || r.ForksURL == nil { return "" } - return *r.From + return *r.ForksURL } -// GetTo returns the To field if it's non-nil, zero value otherwise. -func (r *Rename) GetTo() string { - if r == nil || r.To == nil { +// GetFullName returns the FullName field if it's non-nil, zero value otherwise. +func (r *Repository) GetFullName() string { + if r == nil || r.FullName == nil { return "" } - return *r.To + return *r.FullName } -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (r *RenameOrgResponse) GetMessage() string { - if r == nil || r.Message == nil { +// GetGitCommitsURL returns the GitCommitsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetGitCommitsURL() string { + if r == nil || r.GitCommitsURL == nil { return "" } - return *r.Message + return *r.GitCommitsURL } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *RenameOrgResponse) GetURL() string { - if r == nil || r.URL == nil { +// GetGitignoreTemplate returns the GitignoreTemplate field if it's non-nil, zero value otherwise. +func (r *Repository) GetGitignoreTemplate() string { + if r == nil || r.GitignoreTemplate == nil { return "" } - return *r.URL + return *r.GitignoreTemplate } -// GetLogin returns the Login field if it's non-nil, zero value otherwise. -func (r *RepoAdvisoryCredit) GetLogin() string { - if r == nil || r.Login == nil { +// GetGitRefsURL returns the GitRefsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetGitRefsURL() string { + if r == nil || r.GitRefsURL == nil { return "" } - return *r.Login + return *r.GitRefsURL } -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (r *RepoAdvisoryCredit) GetType() string { - if r == nil || r.Type == nil { +// GetGitTagsURL returns the GitTagsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetGitTagsURL() string { + if r == nil || r.GitTagsURL == nil { return "" } - return *r.Type + return *r.GitTagsURL } -// GetState returns the State field if it's non-nil, zero value otherwise. -func (r *RepoAdvisoryCreditDetailed) GetState() string { - if r == nil || r.State == nil { +// GetGitURL returns the GitURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetGitURL() string { + if r == nil || r.GitURL == nil { return "" } - return *r.State + return *r.GitURL } -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (r *RepoAdvisoryCreditDetailed) GetType() string { - if r == nil || r.Type == nil { - return "" +// GetHasDiscussions returns the HasDiscussions field if it's non-nil, zero value otherwise. +func (r *Repository) GetHasDiscussions() bool { + if r == nil || r.HasDiscussions == nil { + return false } - return *r.Type + return *r.HasDiscussions } -// GetUser returns the User field. -func (r *RepoAdvisoryCreditDetailed) GetUser() *User { - if r == nil { - return nil +// GetHasDownloads returns the HasDownloads field if it's non-nil, zero value otherwise. +func (r *Repository) GetHasDownloads() bool { + if r == nil || r.HasDownloads == nil { + return false } - return r.User + return *r.HasDownloads } -// GetDownloadLocation returns the DownloadLocation field if it's non-nil, zero value otherwise. -func (r *RepoDependencies) GetDownloadLocation() string { - if r == nil || r.DownloadLocation == nil { - return "" +// GetHasIssues returns the HasIssues field if it's non-nil, zero value otherwise. +func (r *Repository) GetHasIssues() bool { + if r == nil || r.HasIssues == nil { + return false } - return *r.DownloadLocation + return *r.HasIssues } -// GetFilesAnalyzed returns the FilesAnalyzed field if it's non-nil, zero value otherwise. -func (r *RepoDependencies) GetFilesAnalyzed() bool { - if r == nil || r.FilesAnalyzed == nil { +// GetHasPages returns the HasPages field if it's non-nil, zero value otherwise. +func (r *Repository) GetHasPages() bool { + if r == nil || r.HasPages == nil { return false } - return *r.FilesAnalyzed + return *r.HasPages } -// GetLicenseConcluded returns the LicenseConcluded field if it's non-nil, zero value otherwise. -func (r *RepoDependencies) GetLicenseConcluded() string { - if r == nil || r.LicenseConcluded == nil { - return "" +// GetHasProjects returns the HasProjects field if it's non-nil, zero value otherwise. +func (r *Repository) GetHasProjects() bool { + if r == nil || r.HasProjects == nil { + return false } - return *r.LicenseConcluded + return *r.HasProjects } -// GetLicenseDeclared returns the LicenseDeclared field if it's non-nil, zero value otherwise. -func (r *RepoDependencies) GetLicenseDeclared() string { - if r == nil || r.LicenseDeclared == nil { - return "" +// GetHasWiki returns the HasWiki field if it's non-nil, zero value otherwise. +func (r *Repository) GetHasWiki() bool { + if r == nil || r.HasWiki == nil { + return false } - return *r.LicenseDeclared + return *r.HasWiki } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (r *RepoDependencies) GetName() string { - if r == nil || r.Name == nil { +// GetHomepage returns the Homepage field if it's non-nil, zero value otherwise. +func (r *Repository) GetHomepage() string { + if r == nil || r.Homepage == nil { return "" } - return *r.Name + return *r.Homepage } -// GetSPDXID returns the SPDXID field if it's non-nil, zero value otherwise. -func (r *RepoDependencies) GetSPDXID() string { - if r == nil || r.SPDXID == nil { +// GetHooksURL returns the HooksURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetHooksURL() string { + if r == nil || r.HooksURL == nil { return "" } - return *r.SPDXID + return *r.HooksURL } -// GetVersionInfo returns the VersionInfo field if it's non-nil, zero value otherwise. -func (r *RepoDependencies) GetVersionInfo() string { - if r == nil || r.VersionInfo == nil { +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetHTMLURL() string { + if r == nil || r.HTMLURL == nil { return "" } - return *r.VersionInfo + return *r.HTMLURL } -// GetBranch returns the Branch field if it's non-nil, zero value otherwise. -func (r *RepoMergeUpstreamRequest) GetBranch() string { - if r == nil || r.Branch == nil { - return "" +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (r *Repository) GetID() int64 { + if r == nil || r.ID == nil { + return 0 } - return *r.Branch + return *r.ID } -// GetBaseBranch returns the BaseBranch field if it's non-nil, zero value otherwise. -func (r *RepoMergeUpstreamResult) GetBaseBranch() string { - if r == nil || r.BaseBranch == nil { +// GetIssueCommentURL returns the IssueCommentURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetIssueCommentURL() string { + if r == nil || r.IssueCommentURL == nil { return "" } - return *r.BaseBranch + return *r.IssueCommentURL } -// GetMergeType returns the MergeType field if it's non-nil, zero value otherwise. -func (r *RepoMergeUpstreamResult) GetMergeType() string { - if r == nil || r.MergeType == nil { +// GetIssueEventsURL returns the IssueEventsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetIssueEventsURL() string { + if r == nil || r.IssueEventsURL == nil { return "" } - return *r.MergeType + return *r.IssueEventsURL } -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (r *RepoMergeUpstreamResult) GetMessage() string { - if r == nil || r.Message == nil { +// GetIssuesURL returns the IssuesURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetIssuesURL() string { + if r == nil || r.IssuesURL == nil { return "" } - return *r.Message + return *r.IssuesURL } -// GetFrom returns the From field if it's non-nil, zero value otherwise. -func (r *RepoName) GetFrom() string { - if r == nil || r.From == nil { - return "" +// GetIsTemplate returns the IsTemplate field if it's non-nil, zero value otherwise. +func (r *Repository) GetIsTemplate() bool { + if r == nil || r.IsTemplate == nil { + return false } - return *r.From + return *r.IsTemplate } -// GetBadgeURL returns the BadgeURL field if it's non-nil, zero value otherwise. -func (r *RepoRequiredWorkflow) GetBadgeURL() string { - if r == nil || r.BadgeURL == nil { +// GetKeysURL returns the KeysURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetKeysURL() string { + if r == nil || r.KeysURL == nil { return "" } - return *r.BadgeURL + return *r.KeysURL } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (r *RepoRequiredWorkflow) GetCreatedAt() Timestamp { - if r == nil || r.CreatedAt == nil { - return Timestamp{} +// GetLabelsURL returns the LabelsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetLabelsURL() string { + if r == nil || r.LabelsURL == nil { + return "" } - return *r.CreatedAt + return *r.LabelsURL } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (r *RepoRequiredWorkflow) GetHTMLURL() string { - if r == nil || r.HTMLURL == nil { +// GetLanguage returns the Language field if it's non-nil, zero value otherwise. +func (r *Repository) GetLanguage() string { + if r == nil || r.Language == nil { return "" } - return *r.HTMLURL + return *r.Language } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *RepoRequiredWorkflow) GetID() int64 { - if r == nil || r.ID == nil { - return 0 +// GetLanguagesURL returns the LanguagesURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetLanguagesURL() string { + if r == nil || r.LanguagesURL == nil { + return "" } - return *r.ID + return *r.LanguagesURL } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (r *RepoRequiredWorkflow) GetName() string { - if r == nil || r.Name == nil { - return "" +// GetLicense returns the License field. +func (r *Repository) GetLicense() *License { + if r == nil { + return nil } - return *r.Name + return r.License } -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *RepoRequiredWorkflow) GetNodeID() string { - if r == nil || r.NodeID == nil { +// GetLicenseTemplate returns the LicenseTemplate field if it's non-nil, zero value otherwise. +func (r *Repository) GetLicenseTemplate() string { + if r == nil || r.LicenseTemplate == nil { return "" } - return *r.NodeID + return *r.LicenseTemplate } -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (r *RepoRequiredWorkflow) GetPath() string { - if r == nil || r.Path == nil { +// GetMasterBranch returns the MasterBranch field if it's non-nil, zero value otherwise. +func (r *Repository) GetMasterBranch() string { + if r == nil || r.MasterBranch == nil { return "" } - return *r.Path + return *r.MasterBranch } -// GetSourceRepository returns the SourceRepository field. -func (r *RepoRequiredWorkflow) GetSourceRepository() *Repository { - if r == nil { - return nil +// GetMergeCommitMessage returns the MergeCommitMessage field if it's non-nil, zero value otherwise. +func (r *Repository) GetMergeCommitMessage() string { + if r == nil || r.MergeCommitMessage == nil { + return "" } - return r.SourceRepository + return *r.MergeCommitMessage } -// GetState returns the State field if it's non-nil, zero value otherwise. -func (r *RepoRequiredWorkflow) GetState() string { - if r == nil || r.State == nil { +// GetMergeCommitTitle returns the MergeCommitTitle field if it's non-nil, zero value otherwise. +func (r *Repository) GetMergeCommitTitle() string { + if r == nil || r.MergeCommitTitle == nil { return "" } - return *r.State + return *r.MergeCommitTitle } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (r *RepoRequiredWorkflow) GetUpdatedAt() Timestamp { - if r == nil || r.UpdatedAt == nil { - return Timestamp{} +// GetMergesURL returns the MergesURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetMergesURL() string { + if r == nil || r.MergesURL == nil { + return "" } - return *r.UpdatedAt + return *r.MergesURL } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *RepoRequiredWorkflow) GetURL() string { - if r == nil || r.URL == nil { +// GetMilestonesURL returns the MilestonesURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetMilestonesURL() string { + if r == nil || r.MilestonesURL == nil { return "" } - return *r.URL + return *r.MilestonesURL } -// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. -func (r *RepoRequiredWorkflows) GetTotalCount() int { - if r == nil || r.TotalCount == nil { - return 0 +// GetMirrorURL returns the MirrorURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetMirrorURL() string { + if r == nil || r.MirrorURL == nil { + return "" } - return *r.TotalCount + return *r.MirrorURL } -// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. -func (r *RepositoriesSearchResult) GetIncompleteResults() bool { - if r == nil || r.IncompleteResults == nil { - return false +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (r *Repository) GetName() string { + if r == nil || r.Name == nil { + return "" } - return *r.IncompleteResults + return *r.Name } -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (r *RepositoriesSearchResult) GetTotal() int { - if r == nil || r.Total == nil { +// GetNetworkCount returns the NetworkCount field if it's non-nil, zero value otherwise. +func (r *Repository) GetNetworkCount() int { + if r == nil || r.NetworkCount == nil { return 0 } - return *r.Total -} - -// GetAllowAutoMerge returns the AllowAutoMerge field if it's non-nil, zero value otherwise. -func (r *Repository) GetAllowAutoMerge() bool { - if r == nil || r.AllowAutoMerge == nil { - return false - } - return *r.AllowAutoMerge + return *r.NetworkCount } -// GetAllowForking returns the AllowForking field if it's non-nil, zero value otherwise. -func (r *Repository) GetAllowForking() bool { - if r == nil || r.AllowForking == nil { - return false +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (r *Repository) GetNodeID() string { + if r == nil || r.NodeID == nil { + return "" } - return *r.AllowForking + return *r.NodeID } -// GetAllowMergeCommit returns the AllowMergeCommit field if it's non-nil, zero value otherwise. -func (r *Repository) GetAllowMergeCommit() bool { - if r == nil || r.AllowMergeCommit == nil { - return false +// GetNotificationsURL returns the NotificationsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetNotificationsURL() string { + if r == nil || r.NotificationsURL == nil { + return "" } - return *r.AllowMergeCommit + return *r.NotificationsURL } -// GetAllowRebaseMerge returns the AllowRebaseMerge field if it's non-nil, zero value otherwise. -func (r *Repository) GetAllowRebaseMerge() bool { - if r == nil || r.AllowRebaseMerge == nil { - return false +// GetOpenIssues returns the OpenIssues field if it's non-nil, zero value otherwise. +func (r *Repository) GetOpenIssues() int { + if r == nil || r.OpenIssues == nil { + return 0 } - return *r.AllowRebaseMerge + return *r.OpenIssues } -// GetAllowSquashMerge returns the AllowSquashMerge field if it's non-nil, zero value otherwise. -func (r *Repository) GetAllowSquashMerge() bool { - if r == nil || r.AllowSquashMerge == nil { - return false +// GetOpenIssuesCount returns the OpenIssuesCount field if it's non-nil, zero value otherwise. +func (r *Repository) GetOpenIssuesCount() int { + if r == nil || r.OpenIssuesCount == nil { + return 0 } - return *r.AllowSquashMerge + return *r.OpenIssuesCount } -// GetAllowUpdateBranch returns the AllowUpdateBranch field if it's non-nil, zero value otherwise. -func (r *Repository) GetAllowUpdateBranch() bool { - if r == nil || r.AllowUpdateBranch == nil { - return false +// GetOrganization returns the Organization field. +func (r *Repository) GetOrganization() *Organization { + if r == nil { + return nil } - return *r.AllowUpdateBranch + return r.Organization } -// GetArchived returns the Archived field if it's non-nil, zero value otherwise. -func (r *Repository) GetArchived() bool { - if r == nil || r.Archived == nil { - return false +// GetOwner returns the Owner field. +func (r *Repository) GetOwner() *User { + if r == nil { + return nil } - return *r.Archived + return r.Owner } -// GetArchiveURL returns the ArchiveURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetArchiveURL() string { - if r == nil || r.ArchiveURL == nil { - return "" +// GetParent returns the Parent field. +func (r *Repository) GetParent() *Repository { + if r == nil { + return nil } - return *r.ArchiveURL + return r.Parent } -// GetAssigneesURL returns the AssigneesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetAssigneesURL() string { - if r == nil || r.AssigneesURL == nil { - return "" +// GetPermissions returns the Permissions map if it's non-nil, an empty map otherwise. +func (r *Repository) GetPermissions() map[string]bool { + if r == nil || r.Permissions == nil { + return map[string]bool{} } - return *r.AssigneesURL + return r.Permissions } -// GetAutoInit returns the AutoInit field if it's non-nil, zero value otherwise. -func (r *Repository) GetAutoInit() bool { - if r == nil || r.AutoInit == nil { +// GetPrivate returns the Private field if it's non-nil, zero value otherwise. +func (r *Repository) GetPrivate() bool { + if r == nil || r.Private == nil { return false } - return *r.AutoInit + return *r.Private } -// GetBlobsURL returns the BlobsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetBlobsURL() string { - if r == nil || r.BlobsURL == nil { +// GetPullsURL returns the PullsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetPullsURL() string { + if r == nil || r.PullsURL == nil { return "" } - return *r.BlobsURL + return *r.PullsURL } -// GetBranchesURL returns the BranchesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetBranchesURL() string { - if r == nil || r.BranchesURL == nil { +// GetPushedAt returns the PushedAt field if it's non-nil, zero value otherwise. +func (r *Repository) GetPushedAt() Timestamp { + if r == nil || r.PushedAt == nil { + return Timestamp{} + } + return *r.PushedAt +} + +// GetReleasesURL returns the ReleasesURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetReleasesURL() string { + if r == nil || r.ReleasesURL == nil { return "" } - return *r.BranchesURL + return *r.ReleasesURL } -// GetCloneURL returns the CloneURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetCloneURL() string { - if r == nil || r.CloneURL == nil { +// GetRoleName returns the RoleName field if it's non-nil, zero value otherwise. +func (r *Repository) GetRoleName() string { + if r == nil || r.RoleName == nil { return "" } - return *r.CloneURL + return *r.RoleName } -// GetCodeOfConduct returns the CodeOfConduct field. -func (r *Repository) GetCodeOfConduct() *CodeOfConduct { +// GetSecurityAndAnalysis returns the SecurityAndAnalysis field. +func (r *Repository) GetSecurityAndAnalysis() *SecurityAndAnalysis { if r == nil { return nil } - return r.CodeOfConduct + return r.SecurityAndAnalysis } -// GetCollaboratorsURL returns the CollaboratorsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetCollaboratorsURL() string { - if r == nil || r.CollaboratorsURL == nil { - return "" +// GetSize returns the Size field if it's non-nil, zero value otherwise. +func (r *Repository) GetSize() int { + if r == nil || r.Size == nil { + return 0 } - return *r.CollaboratorsURL + return *r.Size } -// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetCommentsURL() string { - if r == nil || r.CommentsURL == nil { - return "" +// GetSource returns the Source field. +func (r *Repository) GetSource() *Repository { + if r == nil { + return nil } - return *r.CommentsURL + return r.Source } -// GetCommitsURL returns the CommitsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetCommitsURL() string { - if r == nil || r.CommitsURL == nil { +// GetSquashMergeCommitMessage returns the SquashMergeCommitMessage field if it's non-nil, zero value otherwise. +func (r *Repository) GetSquashMergeCommitMessage() string { + if r == nil || r.SquashMergeCommitMessage == nil { return "" } - return *r.CommitsURL + return *r.SquashMergeCommitMessage } -// GetCompareURL returns the CompareURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetCompareURL() string { - if r == nil || r.CompareURL == nil { +// GetSquashMergeCommitTitle returns the SquashMergeCommitTitle field if it's non-nil, zero value otherwise. +func (r *Repository) GetSquashMergeCommitTitle() string { + if r == nil || r.SquashMergeCommitTitle == nil { return "" } - return *r.CompareURL + return *r.SquashMergeCommitTitle } -// GetContentsURL returns the ContentsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetContentsURL() string { - if r == nil || r.ContentsURL == nil { +// GetSSHURL returns the SSHURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetSSHURL() string { + if r == nil || r.SSHURL == nil { return "" } - return *r.ContentsURL + return *r.SSHURL } -// GetContributorsURL returns the ContributorsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetContributorsURL() string { - if r == nil || r.ContributorsURL == nil { - return "" +// GetStargazersCount returns the StargazersCount field if it's non-nil, zero value otherwise. +func (r *Repository) GetStargazersCount() int { + if r == nil || r.StargazersCount == nil { + return 0 } - return *r.ContributorsURL + return *r.StargazersCount } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (r *Repository) GetCreatedAt() Timestamp { - if r == nil || r.CreatedAt == nil { - return Timestamp{} +// GetStargazersURL returns the StargazersURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetStargazersURL() string { + if r == nil || r.StargazersURL == nil { + return "" } - return *r.CreatedAt + return *r.StargazersURL } -// GetDefaultBranch returns the DefaultBranch field if it's non-nil, zero value otherwise. -func (r *Repository) GetDefaultBranch() string { - if r == nil || r.DefaultBranch == nil { +// GetStatusesURL returns the StatusesURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetStatusesURL() string { + if r == nil || r.StatusesURL == nil { return "" } - return *r.DefaultBranch + return *r.StatusesURL } -// GetDeleteBranchOnMerge returns the DeleteBranchOnMerge field if it's non-nil, zero value otherwise. -func (r *Repository) GetDeleteBranchOnMerge() bool { - if r == nil || r.DeleteBranchOnMerge == nil { - return false +// GetSubscribersCount returns the SubscribersCount field if it's non-nil, zero value otherwise. +func (r *Repository) GetSubscribersCount() int { + if r == nil || r.SubscribersCount == nil { + return 0 } - return *r.DeleteBranchOnMerge + return *r.SubscribersCount } -// GetDeploymentsURL returns the DeploymentsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetDeploymentsURL() string { - if r == nil || r.DeploymentsURL == nil { +// GetSubscribersURL returns the SubscribersURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetSubscribersURL() string { + if r == nil || r.SubscribersURL == nil { return "" } - return *r.DeploymentsURL + return *r.SubscribersURL } -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (r *Repository) GetDescription() string { - if r == nil || r.Description == nil { +// GetSubscriptionURL returns the SubscriptionURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetSubscriptionURL() string { + if r == nil || r.SubscriptionURL == nil { return "" } - return *r.Description + return *r.SubscriptionURL } -// GetDisabled returns the Disabled field if it's non-nil, zero value otherwise. -func (r *Repository) GetDisabled() bool { - if r == nil || r.Disabled == nil { - return false +// GetSVNURL returns the SVNURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetSVNURL() string { + if r == nil || r.SVNURL == nil { + return "" } - return *r.Disabled + return *r.SVNURL } -// GetDownloadsURL returns the DownloadsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetDownloadsURL() string { - if r == nil || r.DownloadsURL == nil { +// GetTagsURL returns the TagsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetTagsURL() string { + if r == nil || r.TagsURL == nil { return "" } - return *r.DownloadsURL + return *r.TagsURL } -// GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetEventsURL() string { - if r == nil || r.EventsURL == nil { - return "" +// GetTeamID returns the TeamID field if it's non-nil, zero value otherwise. +func (r *Repository) GetTeamID() int64 { + if r == nil || r.TeamID == nil { + return 0 } - return *r.EventsURL + return *r.TeamID } -// GetFork returns the Fork field if it's non-nil, zero value otherwise. -func (r *Repository) GetFork() bool { - if r == nil || r.Fork == nil { - return false +// GetTeamsURL returns the TeamsURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetTeamsURL() string { + if r == nil || r.TeamsURL == nil { + return "" } - return *r.Fork + return *r.TeamsURL } -// GetForksCount returns the ForksCount field if it's non-nil, zero value otherwise. -func (r *Repository) GetForksCount() int { - if r == nil || r.ForksCount == nil { - return 0 +// GetTemplateRepository returns the TemplateRepository field. +func (r *Repository) GetTemplateRepository() *Repository { + if r == nil { + return nil } - return *r.ForksCount + return r.TemplateRepository } -// GetForksURL returns the ForksURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetForksURL() string { - if r == nil || r.ForksURL == nil { +// GetTreesURL returns the TreesURL field if it's non-nil, zero value otherwise. +func (r *Repository) GetTreesURL() string { + if r == nil || r.TreesURL == nil { return "" } - return *r.ForksURL + return *r.TreesURL } -// GetFullName returns the FullName field if it's non-nil, zero value otherwise. -func (r *Repository) GetFullName() string { - if r == nil || r.FullName == nil { - return "" +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (r *Repository) GetUpdatedAt() Timestamp { + if r == nil || r.UpdatedAt == nil { + return Timestamp{} } - return *r.FullName + return *r.UpdatedAt } -// GetGitCommitsURL returns the GitCommitsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetGitCommitsURL() string { - if r == nil || r.GitCommitsURL == nil { +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (r *Repository) GetURL() string { + if r == nil || r.URL == nil { return "" } - return *r.GitCommitsURL + return *r.URL } -// GetGitignoreTemplate returns the GitignoreTemplate field if it's non-nil, zero value otherwise. -func (r *Repository) GetGitignoreTemplate() string { - if r == nil || r.GitignoreTemplate == nil { - return "" +// GetUseSquashPRTitleAsDefault returns the UseSquashPRTitleAsDefault field if it's non-nil, zero value otherwise. +func (r *Repository) GetUseSquashPRTitleAsDefault() bool { + if r == nil || r.UseSquashPRTitleAsDefault == nil { + return false } - return *r.GitignoreTemplate + return *r.UseSquashPRTitleAsDefault } -// GetGitRefsURL returns the GitRefsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetGitRefsURL() string { - if r == nil || r.GitRefsURL == nil { +// GetVisibility returns the Visibility field if it's non-nil, zero value otherwise. +func (r *Repository) GetVisibility() string { + if r == nil || r.Visibility == nil { return "" } - return *r.GitRefsURL + return *r.Visibility } -// GetGitTagsURL returns the GitTagsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetGitTagsURL() string { - if r == nil || r.GitTagsURL == nil { - return "" +// GetWatchers returns the Watchers field if it's non-nil, zero value otherwise. +func (r *Repository) GetWatchers() int { + if r == nil || r.Watchers == nil { + return 0 } - return *r.GitTagsURL + return *r.Watchers } -// GetGitURL returns the GitURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetGitURL() string { - if r == nil || r.GitURL == nil { - return "" +// GetWatchersCount returns the WatchersCount field if it's non-nil, zero value otherwise. +func (r *Repository) GetWatchersCount() int { + if r == nil || r.WatchersCount == nil { + return 0 } - return *r.GitURL + return *r.WatchersCount } -// GetHasDiscussions returns the HasDiscussions field if it's non-nil, zero value otherwise. -func (r *Repository) GetHasDiscussions() bool { - if r == nil || r.HasDiscussions == nil { +// GetWebCommitSignoffRequired returns the WebCommitSignoffRequired field if it's non-nil, zero value otherwise. +func (r *Repository) GetWebCommitSignoffRequired() bool { + if r == nil || r.WebCommitSignoffRequired == nil { return false } - return *r.HasDiscussions + return *r.WebCommitSignoffRequired } -// GetHasDownloads returns the HasDownloads field if it's non-nil, zero value otherwise. -func (r *Repository) GetHasDownloads() bool { - if r == nil || r.HasDownloads == nil { - return false +// GetAccessLevel returns the AccessLevel field if it's non-nil, zero value otherwise. +func (r *RepositoryActionsAccessLevel) GetAccessLevel() string { + if r == nil || r.AccessLevel == nil { + return "" } - return *r.HasDownloads + return *r.AccessLevel } -// GetHasIssues returns the HasIssues field if it's non-nil, zero value otherwise. -func (r *Repository) GetHasIssues() bool { - if r == nil || r.HasIssues == nil { - return false +// GetAdvancedSecurityCommitters returns the AdvancedSecurityCommitters field if it's non-nil, zero value otherwise. +func (r *RepositoryActiveCommitters) GetAdvancedSecurityCommitters() int { + if r == nil || r.AdvancedSecurityCommitters == nil { + return 0 } - return *r.HasIssues + return *r.AdvancedSecurityCommitters } -// GetHasPages returns the HasPages field if it's non-nil, zero value otherwise. -func (r *Repository) GetHasPages() bool { - if r == nil || r.HasPages == nil { - return false +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (r *RepositoryActiveCommitters) GetName() string { + if r == nil || r.Name == nil { + return "" } - return *r.HasPages + return *r.Name } -// GetHasProjects returns the HasProjects field if it's non-nil, zero value otherwise. -func (r *Repository) GetHasProjects() bool { - if r == nil || r.HasProjects == nil { - return false +// GetConfiguration returns the Configuration field. +func (r *RepositoryCodeSecurityConfiguration) GetConfiguration() *CodeSecurityConfiguration { + if r == nil { + return nil } - return *r.HasProjects + return r.Configuration } -// GetHasWiki returns the HasWiki field if it's non-nil, zero value otherwise. -func (r *Repository) GetHasWiki() bool { - if r == nil || r.HasWiki == nil { - return false +// 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.HasWiki + return *r.State } -// GetHomepage returns the Homepage field if it's non-nil, zero value otherwise. -func (r *Repository) GetHomepage() string { - if r == nil || r.Homepage == nil { +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (r *RepositoryComment) GetBody() string { + if r == nil || r.Body == nil { return "" } - return *r.Homepage + return *r.Body } -// GetHooksURL returns the HooksURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetHooksURL() string { - if r == nil || r.HooksURL == nil { +// GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. +func (r *RepositoryComment) GetCommitID() string { + if r == nil || r.CommitID == nil { return "" } - return *r.HooksURL + return *r.CommitID +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (r *RepositoryComment) GetCreatedAt() Timestamp { + if r == nil || r.CreatedAt == nil { + return Timestamp{} + } + return *r.CreatedAt } // GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetHTMLURL() string { +func (r *RepositoryComment) GetHTMLURL() string { if r == nil || r.HTMLURL == nil { return "" } @@ -19311,1299 +20023,1331 @@ func (r *Repository) GetHTMLURL() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *Repository) GetID() int64 { +func (r *RepositoryComment) GetID() int64 { if r == nil || r.ID == nil { return 0 } return *r.ID } -// GetIssueCommentURL returns the IssueCommentURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetIssueCommentURL() string { - if r == nil || r.IssueCommentURL == nil { +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (r *RepositoryComment) GetNodeID() string { + if r == nil || r.NodeID == nil { return "" } - return *r.IssueCommentURL + return *r.NodeID } -// GetIssueEventsURL returns the IssueEventsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetIssueEventsURL() string { - if r == nil || r.IssueEventsURL == nil { +// GetPath returns the Path field if it's non-nil, zero value otherwise. +func (r *RepositoryComment) GetPath() string { + if r == nil || r.Path == nil { return "" } - return *r.IssueEventsURL + return *r.Path } -// GetIssuesURL returns the IssuesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetIssuesURL() string { - if r == nil || r.IssuesURL == nil { +// GetPosition returns the Position field if it's non-nil, zero value otherwise. +func (r *RepositoryComment) GetPosition() int { + if r == nil || r.Position == nil { + return 0 + } + return *r.Position +} + +// GetReactions returns the Reactions field. +func (r *RepositoryComment) GetReactions() *Reactions { + if r == nil { + return nil + } + return r.Reactions +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (r *RepositoryComment) GetUpdatedAt() Timestamp { + if r == nil || r.UpdatedAt == nil { + return Timestamp{} + } + return *r.UpdatedAt +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (r *RepositoryComment) GetURL() string { + if r == nil || r.URL == nil { return "" } - return *r.IssuesURL + return *r.URL } -// GetIsTemplate returns the IsTemplate field if it's non-nil, zero value otherwise. -func (r *Repository) GetIsTemplate() bool { - if r == nil || r.IsTemplate == nil { - return false +// GetUser returns the User field. +func (r *RepositoryComment) GetUser() *User { + if r == nil { + return nil } - return *r.IsTemplate + return r.User } -// GetKeysURL returns the KeysURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetKeysURL() string { - if r == nil || r.KeysURL == nil { +// GetAuthor returns the Author field. +func (r *RepositoryCommit) GetAuthor() *User { + if r == nil { + return nil + } + return r.Author +} + +// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. +func (r *RepositoryCommit) GetCommentsURL() string { + if r == nil || r.CommentsURL == nil { return "" } - return *r.KeysURL + return *r.CommentsURL } -// GetLabelsURL returns the LabelsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetLabelsURL() string { - if r == nil || r.LabelsURL == nil { +// GetCommit returns the Commit field. +func (r *RepositoryCommit) GetCommit() *Commit { + if r == nil { + return nil + } + return r.Commit +} + +// GetCommitter returns the Committer field. +func (r *RepositoryCommit) GetCommitter() *User { + if r == nil { + return nil + } + return r.Committer +} + +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (r *RepositoryCommit) GetHTMLURL() string { + if r == nil || r.HTMLURL == nil { return "" } - return *r.LabelsURL + return *r.HTMLURL } -// GetLanguage returns the Language field if it's non-nil, zero value otherwise. -func (r *Repository) GetLanguage() string { - if r == nil || r.Language == nil { +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (r *RepositoryCommit) GetNodeID() string { + if r == nil || r.NodeID == nil { return "" } - return *r.Language + return *r.NodeID } -// GetLanguagesURL returns the LanguagesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetLanguagesURL() string { - if r == nil || r.LanguagesURL == nil { +// GetSHA returns the SHA field if it's non-nil, zero value otherwise. +func (r *RepositoryCommit) GetSHA() string { + if r == nil || r.SHA == nil { return "" } - return *r.LanguagesURL + return *r.SHA } -// GetLicense returns the License field. -func (r *Repository) GetLicense() *License { +// GetStats returns the Stats field. +func (r *RepositoryCommit) GetStats() *CommitStats { if r == nil { return nil } - return r.License + return r.Stats } -// GetLicenseTemplate returns the LicenseTemplate field if it's non-nil, zero value otherwise. -func (r *Repository) GetLicenseTemplate() string { - if r == nil || r.LicenseTemplate == nil { +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (r *RepositoryCommit) GetURL() string { + if r == nil || r.URL == nil { return "" } - return *r.LicenseTemplate + return *r.URL } -// GetMasterBranch returns the MasterBranch field if it's non-nil, zero value otherwise. -func (r *Repository) GetMasterBranch() string { - if r == nil || r.MasterBranch == nil { +// GetDownloadURL returns the DownloadURL field if it's non-nil, zero value otherwise. +func (r *RepositoryContent) GetDownloadURL() string { + if r == nil || r.DownloadURL == nil { return "" } - return *r.MasterBranch + return *r.DownloadURL } -// GetMergeCommitMessage returns the MergeCommitMessage field if it's non-nil, zero value otherwise. -func (r *Repository) GetMergeCommitMessage() string { - if r == nil || r.MergeCommitMessage == nil { +// GetEncoding returns the Encoding field if it's non-nil, zero value otherwise. +func (r *RepositoryContent) GetEncoding() string { + if r == nil || r.Encoding == nil { return "" } - return *r.MergeCommitMessage + return *r.Encoding } -// GetMergeCommitTitle returns the MergeCommitTitle field if it's non-nil, zero value otherwise. -func (r *Repository) GetMergeCommitTitle() string { - if r == nil || r.MergeCommitTitle == nil { +// GetGitURL returns the GitURL field if it's non-nil, zero value otherwise. +func (r *RepositoryContent) GetGitURL() string { + if r == nil || r.GitURL == nil { return "" } - return *r.MergeCommitTitle + return *r.GitURL } -// GetMergesURL returns the MergesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetMergesURL() string { - if r == nil || r.MergesURL == nil { +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (r *RepositoryContent) GetHTMLURL() string { + if r == nil || r.HTMLURL == nil { return "" } - return *r.MergesURL + return *r.HTMLURL } -// GetMilestonesURL returns the MilestonesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetMilestonesURL() string { - if r == nil || r.MilestonesURL == nil { +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (r *RepositoryContent) GetName() string { + if r == nil || r.Name == nil { return "" } - return *r.MilestonesURL + return *r.Name } -// GetMirrorURL returns the MirrorURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetMirrorURL() string { - if r == nil || r.MirrorURL == nil { +// GetPath returns the Path field if it's non-nil, zero value otherwise. +func (r *RepositoryContent) GetPath() string { + if r == nil || r.Path == nil { return "" } - return *r.MirrorURL + return *r.Path } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (r *Repository) GetName() string { - if r == nil || r.Name == nil { +// GetSHA returns the SHA field if it's non-nil, zero value otherwise. +func (r *RepositoryContent) GetSHA() string { + if r == nil || r.SHA == nil { return "" } - return *r.Name + return *r.SHA } -// GetNetworkCount returns the NetworkCount field if it's non-nil, zero value otherwise. -func (r *Repository) GetNetworkCount() int { - if r == nil || r.NetworkCount == nil { +// GetSize returns the Size field if it's non-nil, zero value otherwise. +func (r *RepositoryContent) GetSize() int { + if r == nil || r.Size == nil { return 0 } - return *r.NetworkCount + return *r.Size } -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *Repository) GetNodeID() string { - if r == nil || r.NodeID == nil { +// GetSubmoduleGitURL returns the SubmoduleGitURL field if it's non-nil, zero value otherwise. +func (r *RepositoryContent) GetSubmoduleGitURL() string { + if r == nil || r.SubmoduleGitURL == nil { return "" } - return *r.NodeID + return *r.SubmoduleGitURL } -// GetNotificationsURL returns the NotificationsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetNotificationsURL() string { - if r == nil || r.NotificationsURL == nil { +// GetTarget returns the Target field if it's non-nil, zero value otherwise. +func (r *RepositoryContent) GetTarget() string { + if r == nil || r.Target == nil { return "" } - return *r.NotificationsURL + return *r.Target } -// GetOpenIssues returns the OpenIssues field if it's non-nil, zero value otherwise. -func (r *Repository) GetOpenIssues() int { - if r == nil || r.OpenIssues == nil { - return 0 +// GetType returns the Type field if it's non-nil, zero value otherwise. +func (r *RepositoryContent) GetType() string { + if r == nil || r.Type == nil { + return "" } - return *r.OpenIssues + return *r.Type } -// GetOpenIssuesCount returns the OpenIssuesCount field if it's non-nil, zero value otherwise. -func (r *Repository) GetOpenIssuesCount() int { - if r == nil || r.OpenIssuesCount == nil { - return 0 +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (r *RepositoryContent) GetURL() string { + if r == nil || r.URL == nil { + return "" } - return *r.OpenIssuesCount + return *r.URL } -// GetOrganization returns the Organization field. -func (r *Repository) GetOrganization() *Organization { +// GetAuthor returns the Author field. +func (r *RepositoryContentFileOptions) GetAuthor() *CommitAuthor { if r == nil { return nil } - return r.Organization + return r.Author } -// GetOwner returns the Owner field. -func (r *Repository) GetOwner() *User { - if r == nil { - return nil +// GetBranch returns the Branch field if it's non-nil, zero value otherwise. +func (r *RepositoryContentFileOptions) GetBranch() string { + if r == nil || r.Branch == nil { + return "" } - return r.Owner + return *r.Branch } -// GetParent returns the Parent field. -func (r *Repository) GetParent() *Repository { +// GetCommitter returns the Committer field. +func (r *RepositoryContentFileOptions) GetCommitter() *CommitAuthor { if r == nil { return nil } - return r.Parent + return r.Committer } -// GetPermissions returns the Permissions map if it's non-nil, an empty map otherwise. -func (r *Repository) GetPermissions() map[string]bool { - if r == nil || r.Permissions == nil { - return map[string]bool{} +// GetMessage returns the Message field if it's non-nil, zero value otherwise. +func (r *RepositoryContentFileOptions) GetMessage() string { + if r == nil || r.Message == nil { + return "" } - return r.Permissions + return *r.Message } -// GetPrivate returns the Private field if it's non-nil, zero value otherwise. -func (r *Repository) GetPrivate() bool { - if r == nil || r.Private == nil { - return false +// GetSHA returns the SHA field if it's non-nil, zero value otherwise. +func (r *RepositoryContentFileOptions) GetSHA() string { + if r == nil || r.SHA == nil { + return "" } - return *r.Private + return *r.SHA } -// GetPullsURL returns the PullsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetPullsURL() string { - if r == nil || r.PullsURL == nil { - return "" +// GetContent returns the Content field. +func (r *RepositoryContentResponse) GetContent() *RepositoryContent { + if r == nil { + return nil } - return *r.PullsURL + return r.Content } -// GetPushedAt returns the PushedAt field if it's non-nil, zero value otherwise. -func (r *Repository) GetPushedAt() Timestamp { - if r == nil || r.PushedAt == nil { - return Timestamp{} +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (r *RepositoryDispatchEvent) GetAction() string { + if r == nil || r.Action == nil { + return "" } - return *r.PushedAt + return *r.Action } -// GetReleasesURL returns the ReleasesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetReleasesURL() string { - if r == nil || r.ReleasesURL == nil { +// GetBranch returns the Branch field if it's non-nil, zero value otherwise. +func (r *RepositoryDispatchEvent) GetBranch() string { + if r == nil || r.Branch == nil { return "" } - return *r.ReleasesURL + return *r.Branch } -// GetRoleName returns the RoleName field if it's non-nil, zero value otherwise. -func (r *Repository) GetRoleName() string { - if r == nil || r.RoleName == nil { - return "" +// GetInstallation returns the Installation field. +func (r *RepositoryDispatchEvent) GetInstallation() *Installation { + if r == nil { + return nil } - return *r.RoleName + return r.Installation } -// GetSecurityAndAnalysis returns the SecurityAndAnalysis field. -func (r *Repository) GetSecurityAndAnalysis() *SecurityAndAnalysis { +// GetOrg returns the Org field. +func (r *RepositoryDispatchEvent) GetOrg() *Organization { if r == nil { return nil } - return r.SecurityAndAnalysis + return r.Org } -// GetSize returns the Size field if it's non-nil, zero value otherwise. -func (r *Repository) GetSize() int { - if r == nil || r.Size == nil { - return 0 +// GetRepo returns the Repo field. +func (r *RepositoryDispatchEvent) GetRepo() *Repository { + if r == nil { + return nil } - return *r.Size + return r.Repo } -// GetSource returns the Source field. -func (r *Repository) GetSource() *Repository { +// GetSender returns the Sender field. +func (r *RepositoryDispatchEvent) GetSender() *User { if r == nil { return nil } - return r.Source + return r.Sender } -// GetSquashMergeCommitMessage returns the SquashMergeCommitMessage field if it's non-nil, zero value otherwise. -func (r *Repository) GetSquashMergeCommitMessage() string { - if r == nil || r.SquashMergeCommitMessage == nil { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (r *RepositoryEvent) GetAction() string { + if r == nil || r.Action == nil { return "" } - return *r.SquashMergeCommitMessage + return *r.Action } -// GetSquashMergeCommitTitle returns the SquashMergeCommitTitle field if it's non-nil, zero value otherwise. -func (r *Repository) GetSquashMergeCommitTitle() string { - if r == nil || r.SquashMergeCommitTitle == nil { - return "" +// GetChanges returns the Changes field. +func (r *RepositoryEvent) GetChanges() *EditChange { + if r == nil { + return nil } - return *r.SquashMergeCommitTitle + return r.Changes } -// GetSSHURL returns the SSHURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetSSHURL() string { - if r == nil || r.SSHURL == nil { - return "" +// GetInstallation returns the Installation field. +func (r *RepositoryEvent) GetInstallation() *Installation { + if r == nil { + return nil } - return *r.SSHURL + return r.Installation +} + +// GetOrg returns the Org field. +func (r *RepositoryEvent) GetOrg() *Organization { + if r == nil { + return nil + } + return r.Org +} + +// GetRepo returns the Repo field. +func (r *RepositoryEvent) GetRepo() *Repository { + if r == nil { + return nil + } + return r.Repo } -// GetStargazersCount returns the StargazersCount field if it's non-nil, zero value otherwise. -func (r *Repository) GetStargazersCount() int { - if r == nil || r.StargazersCount == nil { - return 0 +// GetSender returns the Sender field. +func (r *RepositoryEvent) GetSender() *User { + if r == nil { + return nil } - return *r.StargazersCount + return r.Sender } -// GetStargazersURL returns the StargazersURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetStargazersURL() string { - if r == nil || r.StargazersURL == nil { - return "" +// GetOrg returns the Org field. +func (r *RepositoryImportEvent) GetOrg() *Organization { + if r == nil { + return nil } - return *r.StargazersURL + return r.Org } -// GetStatusesURL returns the StatusesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetStatusesURL() string { - if r == nil || r.StatusesURL == nil { - return "" +// GetRepo returns the Repo field. +func (r *RepositoryImportEvent) GetRepo() *Repository { + if r == nil { + return nil } - return *r.StatusesURL + return r.Repo } -// GetSubscribersCount returns the SubscribersCount field if it's non-nil, zero value otherwise. -func (r *Repository) GetSubscribersCount() int { - if r == nil || r.SubscribersCount == nil { - return 0 +// GetSender returns the Sender field. +func (r *RepositoryImportEvent) GetSender() *User { + if r == nil { + return nil } - return *r.SubscribersCount + return r.Sender } -// GetSubscribersURL returns the SubscribersURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetSubscribersURL() string { - if r == nil || r.SubscribersURL == nil { +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (r *RepositoryImportEvent) GetStatus() string { + if r == nil || r.Status == nil { return "" } - return *r.SubscribersURL + return *r.Status } -// GetSubscriptionURL returns the SubscriptionURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetSubscriptionURL() string { - if r == nil || r.SubscriptionURL == nil { - return "" +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (r *RepositoryInvitation) GetCreatedAt() Timestamp { + if r == nil || r.CreatedAt == nil { + return Timestamp{} } - return *r.SubscriptionURL + return *r.CreatedAt } -// GetSVNURL returns the SVNURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetSVNURL() string { - if r == nil || r.SVNURL == nil { - return "" +// 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.SVNURL + return *r.Expired } -// GetTagsURL returns the TagsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetTagsURL() string { - if r == nil || r.TagsURL == nil { +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (r *RepositoryInvitation) GetHTMLURL() string { + if r == nil || r.HTMLURL == nil { return "" } - return *r.TagsURL + return *r.HTMLURL } -// GetTeamID returns the TeamID field if it's non-nil, zero value otherwise. -func (r *Repository) GetTeamID() int64 { - if r == nil || r.TeamID == nil { +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (r *RepositoryInvitation) GetID() int64 { + if r == nil || r.ID == nil { return 0 } - return *r.TeamID + return *r.ID } -// GetTeamsURL returns the TeamsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetTeamsURL() string { - if r == nil || r.TeamsURL == nil { - return "" +// GetInvitee returns the Invitee field. +func (r *RepositoryInvitation) GetInvitee() *User { + if r == nil { + return nil } - return *r.TeamsURL + return r.Invitee } -// GetTemplateRepository returns the TemplateRepository field. -func (r *Repository) GetTemplateRepository() *Repository { +// GetInviter returns the Inviter field. +func (r *RepositoryInvitation) GetInviter() *User { if r == nil { return nil } - return r.TemplateRepository + return r.Inviter } -// GetTreesURL returns the TreesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetTreesURL() string { - if r == nil || r.TreesURL == nil { +// GetPermissions returns the Permissions field if it's non-nil, zero value otherwise. +func (r *RepositoryInvitation) GetPermissions() string { + if r == nil || r.Permissions == nil { return "" } - return *r.TreesURL + return *r.Permissions } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (r *Repository) GetUpdatedAt() Timestamp { - if r == nil || r.UpdatedAt == nil { - return Timestamp{} +// GetRepo returns the Repo field. +func (r *RepositoryInvitation) GetRepo() *Repository { + if r == nil { + return nil } - return *r.UpdatedAt + return r.Repo } // GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *Repository) GetURL() string { +func (r *RepositoryInvitation) GetURL() string { if r == nil || r.URL == nil { return "" } return *r.URL } -// GetUseSquashPRTitleAsDefault returns the UseSquashPRTitleAsDefault field if it's non-nil, zero value otherwise. -func (r *Repository) GetUseSquashPRTitleAsDefault() bool { - if r == nil || r.UseSquashPRTitleAsDefault == nil { - return false - } - return *r.UseSquashPRTitleAsDefault -} - -// GetVisibility returns the Visibility field if it's non-nil, zero value otherwise. -func (r *Repository) GetVisibility() string { - if r == nil || r.Visibility == nil { +// GetContent returns the Content field if it's non-nil, zero value otherwise. +func (r *RepositoryLicense) GetContent() string { + if r == nil || r.Content == nil { return "" } - return *r.Visibility + return *r.Content } -// GetWatchers returns the Watchers field if it's non-nil, zero value otherwise. -func (r *Repository) GetWatchers() int { - if r == nil || r.Watchers == nil { - return 0 +// GetDownloadURL returns the DownloadURL field if it's non-nil, zero value otherwise. +func (r *RepositoryLicense) GetDownloadURL() string { + if r == nil || r.DownloadURL == nil { + return "" } - return *r.Watchers + return *r.DownloadURL } -// GetWatchersCount returns the WatchersCount field if it's non-nil, zero value otherwise. -func (r *Repository) GetWatchersCount() int { - if r == nil || r.WatchersCount == nil { - return 0 +// GetEncoding returns the Encoding field if it's non-nil, zero value otherwise. +func (r *RepositoryLicense) GetEncoding() string { + if r == nil || r.Encoding == nil { + return "" } - return *r.WatchersCount + return *r.Encoding } -// GetWebCommitSignoffRequired returns the WebCommitSignoffRequired field if it's non-nil, zero value otherwise. -func (r *Repository) GetWebCommitSignoffRequired() bool { - if r == nil || r.WebCommitSignoffRequired == nil { - return false +// GetGitURL returns the GitURL field if it's non-nil, zero value otherwise. +func (r *RepositoryLicense) GetGitURL() string { + if r == nil || r.GitURL == nil { + return "" } - return *r.WebCommitSignoffRequired + return *r.GitURL } -// GetAccessLevel returns the AccessLevel field if it's non-nil, zero value otherwise. -func (r *RepositoryActionsAccessLevel) GetAccessLevel() string { - if r == nil || r.AccessLevel == nil { +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (r *RepositoryLicense) GetHTMLURL() string { + if r == nil || r.HTMLURL == nil { return "" } - return *r.AccessLevel + return *r.HTMLURL } -// GetAdvancedSecurityCommitters returns the AdvancedSecurityCommitters field if it's non-nil, zero value otherwise. -func (r *RepositoryActiveCommitters) GetAdvancedSecurityCommitters() int { - if r == nil || r.AdvancedSecurityCommitters == nil { - return 0 +// GetLicense returns the License field. +func (r *RepositoryLicense) GetLicense() *License { + if r == nil { + return nil } - return *r.AdvancedSecurityCommitters + return r.License } // GetName returns the Name field if it's non-nil, zero value otherwise. -func (r *RepositoryActiveCommitters) GetName() string { +func (r *RepositoryLicense) GetName() string { if r == nil || r.Name == nil { return "" } return *r.Name } -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetBody() string { - if r == nil || r.Body == nil { +// GetPath returns the Path field if it's non-nil, zero value otherwise. +func (r *RepositoryLicense) GetPath() string { + if r == nil || r.Path == nil { return "" } - return *r.Body + return *r.Path } -// GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetCommitID() string { - if r == nil || r.CommitID == nil { +// GetSHA returns the SHA field if it's non-nil, zero value otherwise. +func (r *RepositoryLicense) GetSHA() string { + if r == nil || r.SHA == nil { return "" } - return *r.CommitID + return *r.SHA } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetCreatedAt() Timestamp { - if r == nil || r.CreatedAt == nil { - return Timestamp{} +// GetSize returns the Size field if it's non-nil, zero value otherwise. +func (r *RepositoryLicense) GetSize() int { + if r == nil || r.Size == nil { + return 0 } - return *r.CreatedAt + return *r.Size } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetHTMLURL() string { - if r == nil || r.HTMLURL == nil { +// GetType returns the Type field if it's non-nil, zero value otherwise. +func (r *RepositoryLicense) GetType() string { + if r == nil || r.Type == nil { return "" } - return *r.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetID() int64 { - if r == nil || r.ID == nil { - return 0 - } - return *r.ID + return *r.Type } -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetNodeID() string { - if r == nil || r.NodeID == nil { +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (r *RepositoryLicense) GetURL() string { + if r == nil || r.URL == nil { return "" } - return *r.NodeID + return *r.URL } -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetPath() string { - if r == nil || r.Path == nil { +// GetBase returns the Base field if it's non-nil, zero value otherwise. +func (r *RepositoryMergeRequest) GetBase() string { + if r == nil || r.Base == nil { return "" } - return *r.Path + return *r.Base } -// GetPosition returns the Position field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetPosition() int { - if r == nil || r.Position == nil { - return 0 +// GetCommitMessage returns the CommitMessage field if it's non-nil, zero value otherwise. +func (r *RepositoryMergeRequest) GetCommitMessage() string { + if r == nil || r.CommitMessage == nil { + return "" } - return *r.Position + return *r.CommitMessage } -// GetReactions returns the Reactions field. -func (r *RepositoryComment) GetReactions() *Reactions { - if r == nil { - return nil +// GetHead returns the Head field if it's non-nil, zero value otherwise. +func (r *RepositoryMergeRequest) GetHead() string { + if r == nil || r.Head == nil { + return "" } - return r.Reactions + return *r.Head } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetUpdatedAt() Timestamp { - if r == nil || r.UpdatedAt == nil { - return Timestamp{} +// GetPermission returns the Permission field if it's non-nil, zero value otherwise. +func (r *RepositoryPermissionLevel) GetPermission() string { + if r == nil || r.Permission == nil { + return "" } - return *r.UpdatedAt + return *r.Permission } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetURL() string { - if r == nil || r.URL == nil { +// GetRoleName returns the RoleName field if it's non-nil, zero value otherwise. +func (r *RepositoryPermissionLevel) GetRoleName() string { + if r == nil || r.RoleName == nil { return "" } - return *r.URL + return *r.RoleName } // GetUser returns the User field. -func (r *RepositoryComment) GetUser() *User { +func (r *RepositoryPermissionLevel) GetUser() *User { if r == nil { return nil } return r.User } +// GetAssetsURL returns the AssetsURL field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetAssetsURL() string { + if r == nil || r.AssetsURL == nil { + return "" + } + return *r.AssetsURL +} + // GetAuthor returns the Author field. -func (r *RepositoryCommit) GetAuthor() *User { +func (r *RepositoryRelease) GetAuthor() *User { if r == nil { return nil } return r.Author } -// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. -func (r *RepositoryCommit) GetCommentsURL() string { - if r == nil || r.CommentsURL == nil { +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetBody() string { + if r == nil || r.Body == nil { return "" } - return *r.CommentsURL + return *r.Body } -// GetCommit returns the Commit field. -func (r *RepositoryCommit) GetCommit() *Commit { - if r == nil { - return nil +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetCreatedAt() Timestamp { + if r == nil || r.CreatedAt == nil { + return Timestamp{} } - return r.Commit + return *r.CreatedAt } -// GetCommitter returns the Committer field. -func (r *RepositoryCommit) GetCommitter() *User { - if r == nil { - return nil +// GetDiscussionCategoryName returns the DiscussionCategoryName field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetDiscussionCategoryName() string { + if r == nil || r.DiscussionCategoryName == nil { + return "" } - return r.Committer + return *r.DiscussionCategoryName } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (r *RepositoryCommit) GetHTMLURL() string { - if r == nil || r.HTMLURL == nil { - return "" +// GetDraft returns the Draft field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetDraft() bool { + if r == nil || r.Draft == nil { + return false } - return *r.HTMLURL + return *r.Draft } -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *RepositoryCommit) GetNodeID() string { - if r == nil || r.NodeID == nil { - return "" +// GetGenerateReleaseNotes returns the GenerateReleaseNotes field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetGenerateReleaseNotes() bool { + if r == nil || r.GenerateReleaseNotes == nil { + return false } - return *r.NodeID + return *r.GenerateReleaseNotes } -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (r *RepositoryCommit) GetSHA() string { - if r == nil || r.SHA == nil { +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetHTMLURL() string { + if r == nil || r.HTMLURL == nil { return "" } - return *r.SHA + return *r.HTMLURL } -// GetStats returns the Stats field. -func (r *RepositoryCommit) GetStats() *CommitStats { - if r == nil { - return nil +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetID() int64 { + if r == nil || r.ID == nil { + return 0 } - return r.Stats + return *r.ID } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *RepositoryCommit) GetURL() string { - if r == nil || r.URL == nil { +// GetMakeLatest returns the MakeLatest field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetMakeLatest() string { + if r == nil || r.MakeLatest == nil { return "" } - return *r.URL + return *r.MakeLatest } -// GetDownloadURL returns the DownloadURL field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetDownloadURL() string { - if r == nil || r.DownloadURL == nil { +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetName() string { + if r == nil || r.Name == nil { return "" } - return *r.DownloadURL + return *r.Name } -// GetEncoding returns the Encoding field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetEncoding() string { - if r == nil || r.Encoding == nil { +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetNodeID() string { + if r == nil || r.NodeID == nil { return "" } - return *r.Encoding + return *r.NodeID } -// GetGitURL returns the GitURL field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetGitURL() string { - if r == nil || r.GitURL == nil { - return "" +// GetPrerelease returns the Prerelease field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetPrerelease() bool { + if r == nil || r.Prerelease == nil { + return false } - return *r.GitURL + return *r.Prerelease } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetHTMLURL() string { - if r == nil || r.HTMLURL == nil { - return "" +// GetPublishedAt returns the PublishedAt field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetPublishedAt() Timestamp { + if r == nil || r.PublishedAt == nil { + return Timestamp{} } - return *r.HTMLURL + return *r.PublishedAt } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetName() string { - if r == nil || r.Name == nil { +// GetTagName returns the TagName field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetTagName() string { + if r == nil || r.TagName == nil { return "" } - return *r.Name + return *r.TagName } -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetPath() string { - if r == nil || r.Path == nil { +// GetTarballURL returns the TarballURL field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetTarballURL() string { + if r == nil || r.TarballURL == nil { return "" } - return *r.Path + return *r.TarballURL } -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetSHA() string { - if r == nil || r.SHA == nil { +// GetTargetCommitish returns the TargetCommitish field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetTargetCommitish() string { + if r == nil || r.TargetCommitish == nil { return "" } - return *r.SHA -} - -// GetSize returns the Size field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetSize() int { - if r == nil || r.Size == nil { - return 0 - } - return *r.Size + return *r.TargetCommitish } -// GetSubmoduleGitURL returns the SubmoduleGitURL field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetSubmoduleGitURL() string { - if r == nil || r.SubmoduleGitURL == nil { +// GetUploadURL returns the UploadURL field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetUploadURL() string { + if r == nil || r.UploadURL == nil { return "" } - return *r.SubmoduleGitURL + return *r.UploadURL } -// GetTarget returns the Target field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetTarget() string { - if r == nil || r.Target == nil { +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetURL() string { + if r == nil || r.URL == nil { return "" } - return *r.Target + return *r.URL } -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetType() string { - if r == nil || r.Type == nil { +// GetZipballURL returns the ZipballURL field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetZipballURL() string { + if r == nil || r.ZipballURL == nil { return "" } - return *r.Type + return *r.ZipballURL } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetURL() string { - if r == nil || r.URL == nil { - return "" +// GetParameters returns the Parameters field if it's non-nil, zero value otherwise. +func (r *RepositoryRule) GetParameters() json.RawMessage { + if r == nil || r.Parameters == nil { + return json.RawMessage{} } - return *r.URL + return *r.Parameters } -// GetAuthor returns the Author field. -func (r *RepositoryContentFileOptions) GetAuthor() *CommitAuthor { - if r == nil { - return nil +// 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.Author + return *r.CreatedAt } -// GetBranch returns the Branch field if it's non-nil, zero value otherwise. -func (r *RepositoryContentFileOptions) GetBranch() string { - if r == nil || r.Branch == nil { +// 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.Branch + return *r.CurrentUserCanBypass } -// GetCommitter returns the Committer field. -func (r *RepositoryContentFileOptions) GetCommitter() *CommitAuthor { +// GetLinks returns the Links field. +func (r *RepositoryRuleset) GetLinks() *RepositoryRulesetLink { if r == nil { return nil } - return r.Committer + return r.Links } -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (r *RepositoryContentFileOptions) GetMessage() string { - if r == nil || r.Message == nil { +// 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.Message + return *r.NodeID } -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (r *RepositoryContentFileOptions) GetSHA() string { - if r == nil || r.SHA == nil { +// 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.SHA -} - -// GetContent returns the Content field. -func (r *RepositoryContentResponse) GetContent() *RepositoryContent { - if r == nil { - return nil - } - return r.Content + return *r.SourceType } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (r *RepositoryDispatchEvent) GetAction() string { - if r == nil || r.Action == nil { +// 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.Action + return *r.Target } -// GetBranch returns the Branch field if it's non-nil, zero value otherwise. -func (r *RepositoryDispatchEvent) GetBranch() string { - if r == nil || r.Branch == nil { - return "" +// 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.Branch + return *r.UpdatedAt } -// GetInstallation returns the Installation field. -func (r *RepositoryDispatchEvent) GetInstallation() *Installation { +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetCodeScanningRule) GetParameters() *RuleCodeScanningParameters { if r == nil { return nil } - return r.Installation + return r.Parameters } -// GetOrg returns the Org field. -func (r *RepositoryDispatchEvent) GetOrg() *Organization { +// GetConditions returns the Conditions field. +func (r *RepositoryRulesetEditedChanges) GetConditions() *RepositoryRulesetEditedConditions { if r == nil { return nil } - return r.Org + return r.Conditions } -// GetRepo returns the Repo field. -func (r *RepositoryDispatchEvent) GetRepo() *Repository { +// GetEnforcement returns the Enforcement field. +func (r *RepositoryRulesetEditedChanges) GetEnforcement() *RepositoryRulesetEditedSource { if r == nil { return nil } - return r.Repo + return r.Enforcement } -// GetSender returns the Sender field. -func (r *RepositoryDispatchEvent) GetSender() *User { +// GetName returns the Name field. +func (r *RepositoryRulesetEditedChanges) GetName() *RepositoryRulesetEditedSource { if r == nil { return nil } - return r.Sender -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (r *RepositoryEvent) GetAction() string { - if r == nil || r.Action == nil { - return "" - } - return *r.Action + return r.Name } -// GetChanges returns the Changes field. -func (r *RepositoryEvent) GetChanges() *EditChange { +// GetRules returns the Rules field. +func (r *RepositoryRulesetEditedChanges) GetRules() *RepositoryRulesetEditedRules { if r == nil { return nil } - return r.Changes + return r.Rules } -// GetInstallation returns the Installation field. -func (r *RepositoryEvent) GetInstallation() *Installation { +// GetConfiguration returns the Configuration field. +func (r *RepositoryRulesetEditedRuleChanges) GetConfiguration() *RepositoryRulesetEditedSources { if r == nil { return nil } - return r.Installation + return r.Configuration } -// GetOrg returns the Org field. -func (r *RepositoryEvent) GetOrg() *Organization { +// GetPattern returns the Pattern field. +func (r *RepositoryRulesetEditedRuleChanges) GetPattern() *RepositoryRulesetEditedSources { if r == nil { return nil } - return r.Org + return r.Pattern } -// GetRepo returns the Repo field. -func (r *RepositoryEvent) GetRepo() *Repository { +// GetRuleType returns the RuleType field. +func (r *RepositoryRulesetEditedRuleChanges) GetRuleType() *RepositoryRulesetEditedSources { if r == nil { return nil } - return r.Repo + return r.RuleType } -// GetSender returns the Sender field. -func (r *RepositoryEvent) GetSender() *User { - if r == nil { - return nil +// 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.Sender + return *r.From } -// GetOrg returns the Org field. -func (r *RepositoryImportEvent) GetOrg() *Organization { +// GetChanges returns the Changes field. +func (r *RepositoryRulesetEditedUpdatedConditions) GetChanges() *RepositoryRulesetUpdatedConditionsEdited { if r == nil { return nil } - return r.Org + return r.Changes } -// GetRepo returns the Repo field. -func (r *RepositoryImportEvent) GetRepo() *Repository { +// GetCondition returns the Condition field. +func (r *RepositoryRulesetEditedUpdatedConditions) GetCondition() *RepositoryRulesetRefCondition { if r == nil { return nil } - return r.Repo + return r.Condition } -// GetSender returns the Sender field. -func (r *RepositoryImportEvent) GetSender() *User { - if r == nil { - return nil +// 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.Sender + return *r.Action } -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (r *RepositoryImportEvent) GetStatus() string { - if r == nil || r.Status == nil { - return "" +// GetChanges returns the Changes field. +func (r *RepositoryRulesetEvent) GetChanges() *RepositoryRulesetEditedChanges { + if r == nil { + return nil } - return *r.Status + return r.Changes } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (r *RepositoryInvitation) GetCreatedAt() Timestamp { - if r == nil || r.CreatedAt == nil { - return Timestamp{} +// GetEnterprise returns the Enterprise field. +func (r *RepositoryRulesetEvent) GetEnterprise() *Enterprise { + if r == nil { + return nil } - return *r.CreatedAt + return r.Enterprise } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (r *RepositoryInvitation) GetHTMLURL() string { - if r == nil || r.HTMLURL == nil { - return "" +// GetInstallation returns the Installation field. +func (r *RepositoryRulesetEvent) GetInstallation() *Installation { + if r == nil { + return nil } - return *r.HTMLURL + return r.Installation } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *RepositoryInvitation) GetID() int64 { - if r == nil || r.ID == nil { - return 0 +// GetOrganization returns the Organization field. +func (r *RepositoryRulesetEvent) GetOrganization() *Organization { + if r == nil { + return nil } - return *r.ID + return r.Organization } -// GetInvitee returns the Invitee field. -func (r *RepositoryInvitation) GetInvitee() *User { +// GetRepository returns the Repository field. +func (r *RepositoryRulesetEvent) GetRepository() *Repository { if r == nil { return nil } - return r.Invitee + return r.Repository } -// GetInviter returns the Inviter field. -func (r *RepositoryInvitation) GetInviter() *User { +// GetRepositoryRuleset returns the RepositoryRuleset field. +func (r *RepositoryRulesetEvent) GetRepositoryRuleset() *RepositoryRuleset { if r == nil { return nil } - return r.Inviter + return r.RepositoryRuleset } -// GetPermissions returns the Permissions field if it's non-nil, zero value otherwise. -func (r *RepositoryInvitation) GetPermissions() string { - if r == nil || r.Permissions == nil { - return "" +// GetSender returns the Sender field. +func (r *RepositoryRulesetEvent) GetSender() *User { + if r == nil { + return nil } - return *r.Permissions + return r.Sender } -// GetRepo returns the Repo field. -func (r *RepositoryInvitation) GetRepo() *Repository { +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetFileExtensionRestrictionRule) GetParameters() *RuleFileExtensionRestrictionParameters { if r == nil { return nil } - return r.Repo + return r.Parameters } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *RepositoryInvitation) GetURL() string { - if r == nil || r.URL == nil { - return "" +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetFilePathRestrictionRule) GetParameters() *RuleFileParameters { + if r == nil { + return nil } - return *r.URL + return r.Parameters } -// GetContent returns the Content field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetContent() string { - if r == nil || r.Content == nil { - return "" +// GetHTML returns the HTML field. +func (r *RepositoryRulesetLink) GetHTML() *RulesetLink { + if r == nil { + return nil } - return *r.Content + return r.HTML } -// GetDownloadURL returns the DownloadURL field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetDownloadURL() string { - if r == nil || r.DownloadURL == nil { - return "" +// GetSelf returns the Self field. +func (r *RepositoryRulesetLink) GetSelf() *RulesetLink { + if r == nil { + return nil } - return *r.DownloadURL + return r.Self } -// GetEncoding returns the Encoding field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetEncoding() string { - if r == nil || r.Encoding == nil { - return "" +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetMaxFilePathLengthRule) GetParameters() *RuleMaxFilePathLengthParameters { + if r == nil { + return nil } - return *r.Encoding + return r.Parameters } -// GetGitURL returns the GitURL field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetGitURL() string { - if r == nil || r.GitURL == nil { - return "" +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetMaxFileSizeRule) GetParameters() *RuleMaxFileSizeParameters { + if r == nil { + return nil } - return *r.GitURL + return r.Parameters } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetHTMLURL() string { - if r == nil || r.HTMLURL == nil { - return "" +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetMergeQueueRule) GetParameters() *MergeQueueRuleParameters { + if r == nil { + return nil } - return *r.HTMLURL + return r.Parameters } -// GetLicense returns the License field. -func (r *RepositoryLicense) GetLicense() *License { +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetPatternRule) GetParameters() *RulePatternParameters { if r == nil { return nil } - return r.License + return r.Parameters } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetName() string { - if r == nil || r.Name == nil { - return "" +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetPullRequestRule) GetParameters() *PullRequestRuleParameters { + if r == nil { + return nil } - return *r.Name + return r.Parameters } -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetPath() string { - if r == nil || r.Path == nil { - return "" +// GetRefName returns the RefName field. +func (r *RepositoryRulesetRefCondition) GetRefName() *RulesetRefConditionParameters { + if r == nil { + return nil } - return *r.Path + return r.RefName } -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetSHA() string { - if r == nil || r.SHA == nil { - return "" +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetRequiredDeploymentsRule) GetParameters() *RequiredDeploymentEnvironmentsRuleParameters { + if r == nil { + return nil } - return *r.SHA + return r.Parameters } -// GetSize returns the Size field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetSize() int { - if r == nil || r.Size == nil { - return 0 +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetRequiredStatusChecksRule) GetParameters() *RequiredStatusChecksRuleParameters { + if r == nil { + return nil } - return *r.Size + return r.Parameters } -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetType() string { - if r == nil || r.Type == nil { - return "" +// GetBranchNamePattern returns the BranchNamePattern field. +func (r *RepositoryRulesetRule) GetBranchNamePattern() *RepositoryRulesetPatternRule { + if r == nil { + return nil } - return *r.Type + return r.BranchNamePattern } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetURL() string { - if r == nil || r.URL == nil { - return "" +// GetCodeScanning returns the CodeScanning field. +func (r *RepositoryRulesetRule) GetCodeScanning() *RepositoryRulesetCodeScanningRule { + if r == nil { + return nil } - return *r.URL + return r.CodeScanning } -// GetBase returns the Base field if it's non-nil, zero value otherwise. -func (r *RepositoryMergeRequest) GetBase() string { - if r == nil || r.Base == nil { - return "" +// GetCommitAuthorEmailPattern returns the CommitAuthorEmailPattern field. +func (r *RepositoryRulesetRule) GetCommitAuthorEmailPattern() *RepositoryRulesetPatternRule { + if r == nil { + return nil } - return *r.Base + return r.CommitAuthorEmailPattern } -// GetCommitMessage returns the CommitMessage field if it's non-nil, zero value otherwise. -func (r *RepositoryMergeRequest) GetCommitMessage() string { - if r == nil || r.CommitMessage == nil { - return "" +// GetCommitMessagePattern returns the CommitMessagePattern field. +func (r *RepositoryRulesetRule) GetCommitMessagePattern() *RepositoryRulesetPatternRule { + if r == nil { + return nil } - return *r.CommitMessage + return r.CommitMessagePattern } -// GetHead returns the Head field if it's non-nil, zero value otherwise. -func (r *RepositoryMergeRequest) GetHead() string { - if r == nil || r.Head == nil { - return "" +// GetCommitterEmailPattern returns the CommitterEmailPattern field. +func (r *RepositoryRulesetRule) GetCommitterEmailPattern() *RepositoryRulesetPatternRule { + if r == nil { + return nil } - return *r.Head + return r.CommitterEmailPattern } -// GetPermission returns the Permission field if it's non-nil, zero value otherwise. -func (r *RepositoryPermissionLevel) GetPermission() string { - if r == nil || r.Permission == nil { - return "" +// GetCreation returns the Creation field. +func (r *RepositoryRulesetRule) GetCreation() *RepositoryRulesetRuleType { + if r == nil { + return nil } - return *r.Permission + return r.Creation } -// GetRoleName returns the RoleName field if it's non-nil, zero value otherwise. -func (r *RepositoryPermissionLevel) GetRoleName() string { - if r == nil || r.RoleName == nil { - return "" +// GetDeletion returns the Deletion field. +func (r *RepositoryRulesetRule) GetDeletion() *RepositoryRulesetRuleType { + if r == nil { + return nil } - return *r.RoleName + return r.Deletion } -// GetUser returns the User field. -func (r *RepositoryPermissionLevel) GetUser() *User { +// GetFileExtensionRestriction returns the FileExtensionRestriction field. +func (r *RepositoryRulesetRule) GetFileExtensionRestriction() *RepositoryRulesetFileExtensionRestrictionRule { if r == nil { return nil } - return r.User + return r.FileExtensionRestriction } -// GetAssetsURL returns the AssetsURL field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetAssetsURL() string { - if r == nil || r.AssetsURL == nil { - return "" +// GetFilePathRestriction returns the FilePathRestriction field. +func (r *RepositoryRulesetRule) GetFilePathRestriction() *RepositoryRulesetFilePathRestrictionRule { + if r == nil { + return nil } - return *r.AssetsURL + return r.FilePathRestriction } -// GetAuthor returns the Author field. -func (r *RepositoryRelease) GetAuthor() *User { +// GetMaxFilePathLength returns the MaxFilePathLength field. +func (r *RepositoryRulesetRule) GetMaxFilePathLength() *RepositoryRulesetMaxFilePathLengthRule { if r == nil { return nil } - return r.Author + return r.MaxFilePathLength } -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetBody() string { - if r == nil || r.Body == nil { - return "" +// GetMaxFileSize returns the MaxFileSize field. +func (r *RepositoryRulesetRule) GetMaxFileSize() *RepositoryRulesetMaxFileSizeRule { + if r == nil { + return nil } - return *r.Body + return r.MaxFileSize } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetCreatedAt() Timestamp { - if r == nil || r.CreatedAt == nil { - return Timestamp{} +// GetMergeQueue returns the MergeQueue field. +func (r *RepositoryRulesetRule) GetMergeQueue() *RepositoryRulesetMergeQueueRule { + if r == nil { + return nil } - return *r.CreatedAt + return r.MergeQueue } -// GetDiscussionCategoryName returns the DiscussionCategoryName field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetDiscussionCategoryName() string { - if r == nil || r.DiscussionCategoryName == nil { - return "" +// GetNonFastForward returns the NonFastForward field. +func (r *RepositoryRulesetRule) GetNonFastForward() *RepositoryRulesetRuleType { + if r == nil { + return nil } - return *r.DiscussionCategoryName + return r.NonFastForward } -// GetDraft returns the Draft field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetDraft() bool { - if r == nil || r.Draft == nil { - return false +// GetPullRequest returns the PullRequest field. +func (r *RepositoryRulesetRule) GetPullRequest() *RepositoryRulesetPullRequestRule { + if r == nil { + return nil } - return *r.Draft + return r.PullRequest } -// GetGenerateReleaseNotes returns the GenerateReleaseNotes field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetGenerateReleaseNotes() bool { - if r == nil || r.GenerateReleaseNotes == nil { - return false +// GetRequiredDeployments returns the RequiredDeployments field. +func (r *RepositoryRulesetRule) GetRequiredDeployments() *RepositoryRulesetRequiredDeploymentsRule { + if r == nil { + return nil } - return *r.GenerateReleaseNotes + return r.RequiredDeployments } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetHTMLURL() string { - if r == nil || r.HTMLURL == nil { - return "" +// GetRequiredLinearHistory returns the RequiredLinearHistory field. +func (r *RepositoryRulesetRule) GetRequiredLinearHistory() *RepositoryRulesetRuleType { + if r == nil { + return nil } - return *r.HTMLURL + return r.RequiredLinearHistory } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetID() int64 { - if r == nil || r.ID == nil { - return 0 +// GetRequiredSignatures returns the RequiredSignatures field. +func (r *RepositoryRulesetRule) GetRequiredSignatures() *RepositoryRulesetRuleType { + if r == nil { + return nil } - return *r.ID + return r.RequiredSignatures } -// GetMakeLatest returns the MakeLatest field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetMakeLatest() string { - if r == nil || r.MakeLatest == nil { - return "" +// GetRequiredStatusChecks returns the RequiredStatusChecks field. +func (r *RepositoryRulesetRule) GetRequiredStatusChecks() *RepositoryRulesetRequiredStatusChecksRule { + if r == nil { + return nil } - return *r.MakeLatest + return r.RequiredStatusChecks } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetName() string { - if r == nil || r.Name == nil { - return "" +// GetTagNamePattern returns the TagNamePattern field. +func (r *RepositoryRulesetRule) GetTagNamePattern() *RepositoryRulesetPatternRule { + if r == nil { + return nil } - return *r.Name + return r.TagNamePattern } -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetNodeID() string { - if r == nil || r.NodeID == nil { - return "" +// GetUpdate returns the Update field. +func (r *RepositoryRulesetRule) GetUpdate() *RepositoryRulesetUpdateRule { + if r == nil { + return nil } - return *r.NodeID + return r.Update } -// GetPrerelease returns the Prerelease field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetPrerelease() bool { - if r == nil || r.Prerelease == nil { - return false +// GetWorkflows returns the Workflows field. +func (r *RepositoryRulesetRule) GetWorkflows() *RepositoryRulesetWorkflowsRule { + if r == nil { + return nil } - return *r.Prerelease + return r.Workflows } -// GetPublishedAt returns the PublishedAt field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetPublishedAt() Timestamp { - if r == nil || r.PublishedAt == nil { - return Timestamp{} +// GetConditionType returns the ConditionType field. +func (r *RepositoryRulesetUpdatedConditionsEdited) GetConditionType() *RepositoryRulesetEditedSource { + if r == nil { + return nil } - return *r.PublishedAt + return r.ConditionType } -// GetTagName returns the TagName field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetTagName() string { - if r == nil || r.TagName == nil { - return "" +// GetExclude returns the Exclude field. +func (r *RepositoryRulesetUpdatedConditionsEdited) GetExclude() *RepositoryRulesetEditedSources { + if r == nil { + return nil } - return *r.TagName + return r.Exclude } -// GetTarballURL returns the TarballURL field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetTarballURL() string { - if r == nil || r.TarballURL == nil { - return "" +// GetInclude returns the Include field. +func (r *RepositoryRulesetUpdatedConditionsEdited) GetInclude() *RepositoryRulesetEditedSources { + if r == nil { + return nil } - return *r.TarballURL + return r.Include } -// GetTargetCommitish returns the TargetCommitish field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetTargetCommitish() string { - if r == nil || r.TargetCommitish == nil { - return "" +// GetTarget returns the Target field. +func (r *RepositoryRulesetUpdatedConditionsEdited) GetTarget() *RepositoryRulesetEditedSource { + if r == nil { + return nil } - return *r.TargetCommitish + return r.Target } -// GetUploadURL returns the UploadURL field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetUploadURL() string { - if r == nil || r.UploadURL == nil { - return "" +// GetChanges returns the Changes field. +func (r *RepositoryRulesetUpdatedRules) GetChanges() *RepositoryRulesetEditedRuleChanges { + if r == nil { + return nil } - return *r.UploadURL + return r.Changes } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetURL() string { - if r == nil || r.URL == nil { - return "" +// GetRule returns the Rule field. +func (r *RepositoryRulesetUpdatedRules) GetRule() *RepositoryRulesetRule { + if r == nil { + return nil } - return *r.URL + return r.Rule } -// GetZipballURL returns the ZipballURL field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetZipballURL() string { - if r == nil || r.ZipballURL == nil { - return "" +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetUpdateRule) GetParameters() *UpdateAllowsFetchAndMergeRuleParameters { + if r == nil { + return nil } - return *r.ZipballURL + return r.Parameters } -// GetParameters returns the Parameters field if it's non-nil, zero value otherwise. -func (r *RepositoryRule) GetParameters() json.RawMessage { - if r == nil || r.Parameters == nil { - return json.RawMessage{} +// GetParameters returns the Parameters field. +func (r *RepositoryRulesetWorkflowsRule) GetParameters() *RequiredWorkflowsRuleParameters { + if r == nil { + return nil } - return *r.Parameters + return r.Parameters } // GetCommit returns the Commit field. @@ -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 22fbb9747..4e5a33c67 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 f0ba0b15f..47998c4ee 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 9c044badd..58fd4f04f 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 bba3b1803..8e234d7e0 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 51e7fe6a5..b97b00f3e 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 0aa589afe..903f5b89c 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 fe3b31128..0fd896c6c 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 30c4fca93..59b214b35 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 5af881705..766c4c38e 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 1f907cd4e..a7bd79499 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 000000000..3d5793c18 --- /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 000000000..b25845a4e --- /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 2295e1b8a..44408db14 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 695c4dade..0954b92d4 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 3387d98d7..f59d9f467 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 b66850269..35ceda446 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 3f0c50b74..9dd60ae68 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 1aa7ac38f..9f9f72fae 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 d928771df..9faed401f 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 000000000..2e5425502 --- /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 97539aeeb..3a0c266b5 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 d8c0b6321..6277ac215 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 ed81e3a1f..d3e34fa8f 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 4922e0b29..98fe01d1c 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 7d85c8736..e97075d02 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 7231db6d9..6023f6327 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 d09bb71d1..b113553a2 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 898693f78..a6ef9c0da 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 93164dd1b..b6dc36e2a 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 71efe87a0..54bc6d5e1 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 9b2ad8cd0..fc0fe0cd8 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 10dbebcbb..579e5b828 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 00c1235e9..dc1045cf7 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 51b2b2193..60f1e06a6 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 2c86af733..c0aa3b649 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 000000000..18f60298d --- /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 189187a74..3d0e1bfaa 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 9053ce105..9bb95b8c8 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 0024ae415..bfdb18ecb 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 591bc641f..119d1d4ad 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -11,7 +11,7 @@ github.com/beorn7/perks/quantile # github.com/bluekeyes/hatpear v0.1.2 ## explicit; go 1.11 github.com/bluekeyes/hatpear -# 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/c2h5oh/datasize v0.0.0-20171227191756-4eba002a5eae @@ -33,12 +33,12 @@ github.com/golang-jwt/jwt/v4 ## explicit; go 1.9 github.com/golang/protobuf/proto github.com/golang/protobuf/ptypes/timestamp -# github.com/google/go-github/v66 v66.0.0 -## explicit; go 1.21 -github.com/google/go-github/v66/github # github.com/google/go-github/v67 v67.0.0 ## explicit; go 1.21 github.com/google/go-github/v67/github +# github.com/google/go-github/v68 v68.0.0 +## explicit; go 1.21 +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