-
Notifications
You must be signed in to change notification settings - Fork 52
fix: remove secrets_ prefix from github token envvar key #605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
codegen-bot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. Additional details and impacted files |
🎉 This PR is included in version 0.31.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Technical ReviewThis PR makes a consistent change across the codebase to simplify environment variable naming by removing the Changes Overview
Impact Analysis
Suggestions for Improvement
Code QualityThe changes are consistent and well-structured. The commit maintains a single responsibility and makes the same change pattern across all affected files. Testing ConsiderationsWhile the test files have been updated, it would be beneficial to add tests that verify the behavior when:
|
Falls back to .env file for missing values. | ||
""" | ||
|
||
def __init__(self, prefix: str = "", *args, **kwargs) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider implementing a fallback mechanism in the SecretsConfig class to support a graceful transition. Here's a suggested approach:
def __init__(self, prefix: str = "", *args, **kwargs) -> None:
super().__init__(prefix=prefix, *args, **kwargs)
# Check for deprecated token format
if self.github_token is None:
deprecated_token = os.getenv("SECRETS_GITHUB_TOKEN")
if deprecated_token:
warnings.warn(
"Using SECRETS_GITHUB_TOKEN is deprecated and will be removed in a future version. "
"Please use GITHUB_TOKEN instead.",
DeprecationWarning,
stacklevel=2
)
self.github_token = deprecated_token
This would provide backward compatibility while encouraging migration to the new format.
Motivation
Content
Testing
Please check the following before marking your PR as ready for review