Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improvement/GitHub registry authentication #610

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

mshojaei-txfusion
Copy link
Collaborator

@mshojaei-txfusion mshojaei-txfusion commented Feb 20, 2025

Description

Add authentication support for GitHub registry access. This enhancement allows the registry to make authenticated requests to GitHub's API using a personal access token, which helps avoid rate limiting issues and enables access to private repositories. The implementation includes:

  • Added authToken option to GithubRegistry configuration
  • Updated API request headers to include authentication when token is provided
  • Added test environment configuration
  • Enhanced test coverage for authenticated scenarios
  • Added proper error handling for API rate limits

Related Issues

hyperlane-xyz/hyperlane-monorepo#5501

Backward compatibility

Yes. This change is fully backward compatible as:

  1. The authToken parameter is optional
  2. The existing functionality remains unchanged when no authentication is provided
  3. All existing methods maintain their current signatures and behavior

Testing

  • Added new unit tests to verify authenticated API calls
  • Tested rate limit handling with and without authentication
  • Verified existing registry functionality remains intact
  • All tests passing in the test environment with both authenticated and unauthenticated scenarios

Copy link

changeset-bot bot commented Feb 20, 2025

🦋 Changeset detected

Latest commit: 7e4837e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hyperlane-xyz/registry Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants