Skip to content

feat(provider): add GitHub token support for API authentication#1

Merged
hystking merged 2 commits intomainfrom
feat/github-token-auth
Dec 18, 2025
Merged

feat(provider): add GitHub token support for API authentication#1
hystking merged 2 commits intomainfrom
feat/github-token-auth

Conversation

@hystking
Copy link
Copy Markdown
Owner

Summary

  • Add optional github_token provider attribute for GitHub API authentication
  • Support GITHUB_TOKEN environment variable as an alternative configuration method
  • Use Bearer token authentication when making GitHub API requests to resolve usernames
  • Update documentation (README.md, CLAUDE.md)

Test plan

  • Build provider with make build
  • Configure provider with github_token attribute and verify GitHub API requests include Authorization header
  • Configure GITHUB_TOKEN environment variable and verify it works without explicit provider config
  • Verify provider works without GitHub token (unauthenticated, lower rate limits)

Add optional github_token provider attribute and GITHUB_TOKEN environment
variable support to authenticate GitHub API requests with Bearer token.
This allows higher rate limits when resolving GitHub usernames to user IDs.
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

This PR adds optional GitHub personal access token support to the CodeRabbit Terraform provider to enable authenticated GitHub API requests with higher rate limits.

Key changes:

  • Added github_token provider configuration attribute with support for GITHUB_TOKEN environment variable
  • Modified client to include Authorization header with Bearer token in GitHub API requests
  • Updated documentation in README.md and CLAUDE.md

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

File Description
internal/provider/provider.go Added github_token schema attribute and configuration logic following existing patterns for API key and base URL
internal/client/client.go Extended Client struct and NewClient function to accept and use GitHub token in Authorization header for API requests
README.md Added documentation for new github_token configuration option and GITHUB_TOKEN environment variable
CLAUDE.md Added reminder to update README.md when modifying provider behavior

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

@hystking hystking merged commit 1cee794 into main Dec 18, 2025
3 checks passed
@hystking hystking deleted the feat/github-token-auth branch December 18, 2025 15:41
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.

2 participants