Skip to content

docs: Add apiVersion to GitHub API link#21

Open
alexandear wants to merge 7 commits intomasterfrom
docs/include-api-version
Open

docs: Add apiVersion to GitHub API link#21
alexandear wants to merge 7 commits intomasterfrom
docs/include-api-version

Conversation

@alexandear
Copy link
Copy Markdown
Member

@alexandear alexandear commented Apr 10, 2026

Since there are two API versions, GitHub API links redirect to the latest version by default. However, this library currently supports version 2022-11-28, so we need to add ?apiVersion=2022-11-28 to every link.

Copilot AI review requested due to automatic review settings April 10, 2026 13:46
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

Important

Review skipped

Too many files!

This PR contains 202 files, which is 52 over the limit of 150.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 186133ac-3c59-4b83-8ae8-a37b9ea1d39b

📥 Commits

Reviewing files that changed from the base of the PR and between 9ad687d and 4e816b2.

⛔ Files ignored due to path filters (1)
  • tools/redundantptr/go.sum is excluded by !**/*.sum
📒 Files selected for processing (202)
  • .custom-gcl.yml
  • .golangci.yml
  • CONTRIBUTING.md
  • example/commitpr/main.go
  • github/actions.go
  • github/actions_artifacts.go
  • github/actions_cache.go
  • github/actions_hosted_runners.go
  • github/actions_hosted_runners_test.go
  • github/actions_oidc.go
  • github/actions_permissions_enterprise.go
  • github/actions_permissions_orgs.go
  • github/actions_runner_groups.go
  • github/actions_runner_groups_test.go
  • github/actions_runners.go
  • github/actions_secrets.go
  • github/actions_variables.go
  • github/actions_workflow_jobs.go
  • github/actions_workflow_runs.go
  • github/actions_workflows.go
  • github/activity.go
  • github/activity_events.go
  • github/activity_notifications.go
  • github/activity_star.go
  • github/activity_watching.go
  • github/admin.go
  • github/apps.go
  • github/apps_hooks.go
  • github/apps_hooks_deliveries.go
  • github/apps_installation.go
  • github/apps_manifest.go
  • github/apps_marketplace.go
  • github/authorizations.go
  • github/billing.go
  • github/checks.go
  • github/classroom.go
  • github/code_scanning.go
  • github/codesofconduct.go
  • github/codespaces.go
  • github/codespaces_machines.go
  • github/codespaces_orgs.go
  • github/codespaces_secrets.go
  • github/copilot.go
  • github/credentials.go
  • github/dependabot.go
  • github/dependabot_alerts.go
  • github/dependabot_secrets.go
  • github/dependency_graph.go
  • github/dependency_graph_snapshots.go
  • github/doc.go
  • github/emojis.go
  • github/enterprise.go
  • github/enterprise_actions_hosted_runners.go
  • github/enterprise_actions_hosted_runners_test.go
  • github/enterprise_actions_runner_groups.go
  • github/enterprise_actions_runners.go
  • github/enterprise_app_installation.go
  • github/enterprise_apps.go
  • github/enterprise_audit_log.go
  • github/enterprise_audit_log_stream.go
  • github/enterprise_billing_cost_centers.go
  • github/enterprise_budgets.go
  • github/enterprise_code_security_and_analysis.go
  • github/enterprise_codesecurity_configurations.go
  • github/enterprise_licenses.go
  • github/enterprise_network_configurations.go
  • github/enterprise_organization_properties.go
  • github/enterprise_properties.go
  • github/enterprise_rules.go
  • github/enterprise_scim.go
  • github/enterprise_team.go
  • github/event_types.go
  • github/gists.go
  • github/gists_comments.go
  • github/git.go
  • github/git_blobs.go
  • github/git_commits.go
  • github/git_commits_test.go
  • github/git_refs.go
  • github/git_tags.go
  • github/git_trees.go
  • github/github-accessors.go
  • github/github-accessors_test.go
  • github/github-stringify_test.go
  • github/github.go
  • github/github_test.go
  • github/gitignore.go
  • github/interactions.go
  • github/interactions_orgs.go
  • github/interactions_repos.go
  • github/issues.go
  • github/issues_assignees.go
  • github/issues_comments.go
  • github/issues_events.go
  • github/issues_labels.go
  • github/issues_milestones.go
  • github/issues_timeline.go
  • github/licenses.go
  • github/markdown.go
  • github/meta.go
  • github/migrations.go
  • github/migrations_source_import.go
  • github/migrations_user.go
  • github/orgs.go
  • github/orgs_actions_allowed.go
  • github/orgs_actions_permissions.go
  • github/orgs_artifacts.go
  • github/orgs_attestations.go
  • github/orgs_audit_log.go
  • github/orgs_codesecurity_configurations.go
  • github/orgs_credential_authorizations.go
  • github/orgs_custom_repository_roles.go
  • github/orgs_hooks.go
  • github/orgs_hooks_configuration.go
  • github/orgs_hooks_deliveries.go
  • github/orgs_immutable_releases.go
  • github/orgs_issue_types.go
  • github/orgs_members.go
  • github/orgs_network_configurations.go
  • github/orgs_organization_properties.go
  • github/orgs_organization_roles.go
  • github/orgs_outside_collaborators.go
  • github/orgs_packages.go
  • github/orgs_personal_access_tokens.go
  • github/orgs_properties.go
  • github/orgs_rules.go
  • github/orgs_security_managers.go
  • github/orgs_users_blocking.go
  • github/private_registries.go
  • github/projects.go
  • github/pulls.go
  • github/pulls_comments.go
  • github/pulls_reviewers.go
  • github/pulls_reviews.go
  • github/rate_limit.go
  • github/reactions.go
  • github/repos.go
  • github/repos_actions_access.go
  • github/repos_actions_allowed.go
  • github/repos_actions_permissions.go
  • github/repos_attestations.go
  • github/repos_autolinks.go
  • github/repos_codeowners.go
  • github/repos_collaborators.go
  • github/repos_comments.go
  • github/repos_commits.go
  • github/repos_community_health.go
  • github/repos_contents.go
  • github/repos_deployment_branch_policies.go
  • github/repos_deployment_protection_rules.go
  • github/repos_deployments.go
  • github/repos_environments.go
  • github/repos_forks.go
  • github/repos_hooks.go
  • github/repos_hooks_configuration.go
  • github/repos_hooks_deliveries.go
  • github/repos_hooks_deliveries_test.go
  • github/repos_immutable_releases.go
  • github/repos_invitations.go
  • github/repos_keys.go
  • github/repos_lfs.go
  • github/repos_merging.go
  • github/repos_pages.go
  • github/repos_properties.go
  • github/repos_releases.go
  • github/repos_rules.go
  • github/repos_stats.go
  • github/repos_statuses.go
  • github/repos_tags.go
  • github/repos_test.go
  • github/repos_traffic.go
  • github/scim.go
  • github/search.go
  • github/secret_scanning.go
  • github/secret_scanning_pattern_configs.go
  • github/security_advisories.go
  • github/strings_benchmark_test.go
  • github/sub_issue.go
  • github/teams.go
  • github/teams_members.go
  • github/users.go
  • github/users_attestations.go
  • github/users_blocking.go
  • github/users_emails.go
  • github/users_followers.go
  • github/users_gpg_keys.go
  • github/users_keys.go
  • github/users_packages.go
  • github/users_social_accounts.go
  • github/users_ssh_signing_keys.go
  • github/users_test.go
  • test/integration/authorizations_test.go
  • test/integration/github_test.go
  • test/integration/users_test.go
  • tools/metadata/metadata.go
  • tools/metadata/metadata_test.go
  • tools/metadata/testdata/golden/TestUpdateGo/valid/github/a.go
  • tools/redundantptr/go.mod
  • tools/redundantptr/redundantptr.go
  • tools/redundantptr/redundantptr_test.go
  • tools/redundantptr/testdata/src/has-warnings/github.go
  • tools/redundantptr/testdata/src/no-warnings/github.go

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/include-api-version

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 10, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
example/commitpr/main.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates generated GitHub REST API documentation links across the codebase to include an explicit apiVersion query parameter, and adjusts the metadata tooling to normalize these links consistently.

Changes:

  • Add ?apiVersion=2022-11-28 to GitHub REST docs links in Go doc comments and related documentation.
  • Replace URL cleaning logic in the metadata updater with normalizeDocURL, enforcing the docs API version for docs.github.com/rest and enterprise-cloud@latest/rest links.
  • Add unit tests covering doc URL normalization behavior.

Reviewed changes

Copilot reviewed 180 out of 180 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/metadata/testdata/golden/TestUpdateGo/valid/github/a.go Updates golden testdata doc links to include apiVersion.
tools/metadata/metadata.go Switches doc-link generation to normalizeDocURL and enforces docs apiVersion.
tools/metadata/metadata_test.go Adds test coverage for normalizeDocURL.
github/users_ssh_signing_keys.go Adds apiVersion to REST docs links.
github/users_social_accounts.go Adds apiVersion to REST docs links.
github/users_keys.go Adds apiVersion to REST docs links.
github/users_gpg_keys.go Adds apiVersion to REST docs links.
github/users_followers.go Adds apiVersion to REST docs links.
github/users_emails.go Adds apiVersion to REST docs links.
github/users_blocking.go Adds apiVersion to REST docs links.
github/users_attestations.go Adds apiVersion to REST docs links.
github/sub_issue.go Adds apiVersion to REST docs links.
github/security_advisories.go Adds apiVersion to REST docs links.
github/secret_scanning_pattern_configs.go Adds apiVersion to REST docs links (including enterprise-cloud@latest paths).
github/search.go Adds apiVersion to REST docs links and related inline reference.
github/repos_traffic.go Adds apiVersion to REST docs links.
github/repos_tags.go Updates deprecation guidance link to include apiVersion.
github/repos_statuses.go Adds apiVersion to REST docs links.
github/repos_stats.go Adds apiVersion to REST docs links.
github/repos_rules.go Adds apiVersion to REST docs links.
github/repos_properties.go Adds apiVersion to REST docs links.
github/repos_merging.go Adds apiVersion to REST docs links.
github/repos_lfs.go Adds apiVersion to REST docs links (enterprise-cloud@latest paths).
github/repos_keys.go Adds apiVersion to REST docs links.
github/repos_invitations.go Adds apiVersion to REST docs links.
github/repos_immutable_releases.go Adds apiVersion to REST docs links.
github/repos_hooks.go Adds apiVersion to REST docs links.
github/repos_hooks_deliveries.go Adds apiVersion to REST docs links.
github/repos_hooks_configuration.go Adds apiVersion to REST docs links.
github/repos_forks.go Adds apiVersion to REST docs links.
github/repos_environments.go Adds apiVersion to REST docs links.
github/repos_deployments.go Adds apiVersion to REST docs links.
github/repos_deployment_protection_rules.go Adds apiVersion to REST docs links.
github/repos_deployment_branch_policies.go Adds apiVersion to REST docs links.
github/repos_community_health.go Adds apiVersion to REST docs links.
github/repos_commits.go Adds apiVersion to REST docs links.
github/repos_comments.go Adds apiVersion to REST docs links.
github/repos_collaborators.go Adds apiVersion to REST docs links (includes a changed struct doc link).
github/repos_codeowners.go Adds apiVersion to REST docs links.
github/repos_autolinks.go Adds apiVersion to REST docs links.
github/repos_attestations.go Adds apiVersion to REST docs links.
github/repos_actions_allowed.go Adds apiVersion to REST docs links.
github/repos_actions_access.go Adds apiVersion to REST docs links.
github/rate_limit.go Adds apiVersion to REST docs links in rate limit types and methods.
github/pulls_reviewers.go Adds apiVersion to REST docs links.
github/pulls_comments.go Adds apiVersion to REST docs links referenced in comments.
github/private_registries.go Adds apiVersion to REST docs links.
github/orgs.go Adds apiVersion to REST docs links.
github/orgs_users_blocking.go Adds apiVersion to REST docs links.
github/orgs_security_managers.go Adds apiVersion to REST docs links.
github/orgs_rules.go Adds apiVersion to REST docs links.
github/orgs_properties.go Adds apiVersion to REST docs links.
github/orgs_personal_access_tokens.go Normalizes REST docs links to include apiVersion and consistent base path.
github/orgs_packages.go Adds apiVersion to REST docs links.
github/orgs_outside_collaborators.go Adds apiVersion to REST docs links.
github/orgs_organization_properties.go Adds apiVersion to REST docs links (enterprise-cloud@latest paths).
github/orgs_network_configurations.go Adds apiVersion to REST docs links.
github/orgs_issue_types.go Adds apiVersion to REST docs links.
github/orgs_immutable_releases.go Adds apiVersion to REST docs links.
github/orgs_hooks.go Adds apiVersion to REST docs links.
github/orgs_hooks_deliveries.go Adds apiVersion to REST docs links.
github/orgs_hooks_configuration.go Adds apiVersion to REST docs links.
github/orgs_custom_repository_roles.go Adds apiVersion to REST docs links (enterprise-cloud@latest paths).
github/orgs_credential_authorizations.go Adds apiVersion to REST docs links (enterprise-cloud@latest paths).
github/orgs_audit_log.go Adds apiVersion to REST docs links (enterprise-cloud@latest paths).
github/orgs_attestations.go Adds apiVersion to REST docs links.
github/orgs_artifacts.go Adds apiVersion to REST docs links.
github/orgs_actions_permissions.go Adds apiVersion to REST docs links.
github/orgs_actions_allowed.go Adds apiVersion to REST docs links.
github/migrations.go Adds apiVersion to REST docs links (and normalizes top-level migrations link).
github/migrations_user.go Adds apiVersion to REST docs links.
github/meta.go Adds apiVersion to REST docs links.
github/markdown.go Adds apiVersion to REST docs links.
github/licenses.go Adds apiVersion to REST docs links.
github/issues_timeline.go Adds apiVersion to REST docs links.
github/issues_milestones.go Adds apiVersion to REST docs links.
github/issues_events.go Adds apiVersion to REST docs links.
github/issues_comments.go Adds apiVersion to REST docs links referenced in comments.
github/issues_assignees.go Adds apiVersion to REST docs links.
github/interactions.go Adds apiVersion to REST docs links.
github/interactions_repos.go Adds apiVersion to REST docs links.
github/interactions_orgs.go Adds apiVersion to REST docs links.
github/gitignore.go Adds apiVersion to REST docs links.
github/github_test.go Updates “See:” docs links to include apiVersion.
github/git.go Adds apiVersion to REST docs links.
github/git_trees.go Adds apiVersion to REST docs links.
github/git_tags.go Adds apiVersion to REST docs links.
github/git_refs.go Adds apiVersion to REST docs links.
github/git_commits.go Adds apiVersion to REST docs links.
github/git_blobs.go Adds apiVersion to REST docs links.
github/gists_comments.go Adds apiVersion to REST docs links.
github/event_types.go Adds apiVersion to REST docs links referenced in comments.
github/enterprise.go Adds apiVersion to REST docs links.
github/enterprise_rules.go Adds apiVersion to REST docs links (enterprise-cloud@latest paths).
github/enterprise_properties.go Adds apiVersion to REST docs links (enterprise-cloud@latest paths).
github/enterprise_network_configurations.go Adds apiVersion to REST docs links (enterprise-cloud@latest paths).
github/enterprise_licenses.go Adds apiVersion to REST docs links (enterprise-cloud@latest paths).
github/enterprise_code_security_and_analysis.go Adds apiVersion to REST docs links (enterprise-cloud@latest paths).
github/enterprise_budgets.go Adds apiVersion to REST docs links (enterprise-cloud@latest paths).
github/enterprise_billing_cost_centers.go Adds apiVersion to REST docs links (enterprise-cloud@latest paths).
github/enterprise_audit_log.go Adds apiVersion to REST docs links (enterprise-cloud@latest paths).
github/enterprise_audit_log_stream.go Adds apiVersion to REST docs links (enterprise-cloud@latest paths).
github/enterprise_apps.go Adds apiVersion to REST docs links (enterprise-cloud@latest paths).
github/enterprise_app_installation.go Adds apiVersion to REST docs links (enterprise-cloud@latest paths).
github/enterprise_actions_runners.go Adds apiVersion to REST docs links (enterprise-cloud@latest paths).
github/emojis.go Adds apiVersion to REST docs links.
github/doc.go Updates package documentation links to include apiVersion and consistent base paths.
github/dependency_graph.go Adds apiVersion to REST docs links.
github/dependency_graph_snapshots.go Adds apiVersion to REST docs links.
github/dependabot.go Adds apiVersion to REST docs links.
github/dependabot_alerts.go Adds apiVersion to REST docs links.
github/credentials.go Adds apiVersion to REST docs links.
github/codespaces_orgs.go Adds apiVersion to REST docs links.
github/codespaces_machines.go Adds apiVersion to REST docs links.
github/codesofconduct.go Adds apiVersion to REST docs links.
github/classroom.go Adds apiVersion to REST docs links.
github/billing.go Adds apiVersion to REST docs links (including enterprise-cloud@latest paths).
github/authorizations.go Adds apiVersion to REST docs links.
github/apps_marketplace.go Adds apiVersion to REST docs links.
github/apps_manifest.go Adds apiVersion to REST docs links.
github/apps_installation.go Adds apiVersion to REST docs links.
github/apps_hooks.go Adds apiVersion to REST docs links.
github/apps_hooks_deliveries.go Adds apiVersion to REST docs links.
github/admin.go Adds apiVersion to REST docs links.
github/activity.go Adds apiVersion to REST docs links.
github/activity_watching.go Adds apiVersion to REST docs links.
github/activity_star.go Adds apiVersion to REST docs links.
github/actions.go Adds apiVersion to REST docs links.
github/actions_workflow_jobs.go Adds apiVersion to REST docs links.
github/actions_oidc.go Adds apiVersion to REST docs links.
github/actions_artifacts.go Adds apiVersion to REST docs links.
CONTRIBUTING.md Updates contributor guidance example to include apiVersion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@alexandear alexandear force-pushed the docs/include-api-version branch from 40764da to 16a1a93 Compare April 10, 2026 13:54
@alexandear alexandear force-pushed the docs/include-api-version branch from 16a1a93 to 27fb499 Compare April 10, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants