Skip to content

Commit

Permalink
fix: remove secrets_ prefix from github token envvar key (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
caroljung-cg authored Feb 21, 2025
1 parent 9132f13 commit f59804c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/codegen/cli/auth/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def _validate(self) -> None:
if git_token is None:
rich.print("\n[bold yellow]Warning:[/bold yellow] GitHub token not found")
rich.print("To enable full functionality, please set your GitHub token:")
rich.print(format_command("export SECRETS_GITHUB_TOKEN=<your-token>"))
rich.print(format_command("export GITHUB_TOKEN=<your-token>"))
rich.print("Or pass in as a parameter:")
rich.print(format_command("codegen init --token <your-token>"))

Expand Down
2 changes: 1 addition & 1 deletion src/codegen/configs/models/secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class SecretsConfig(BaseConfig):
"""Configuration for various API secrets and tokens.
Loads from environment variables with the SECRETS_ prefix.
Loads from environment variables.
Falls back to .env file for missing values.
"""

Expand Down
2 changes: 1 addition & 1 deletion src/codegen/runner/clients/codebase_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _get_envs(self) -> dict:
"REPOSITORY_PATH": str(self.repo_config.repo_path),
}
if self.git_access_token is not None:
codebase_envs["SECRETS_GITHUB_TOKEN"] = self.git_access_token
codebase_envs["GITHUB_TOKEN"] = self.git_access_token

envs.update(codebase_envs)
return envs
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/extension/test_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
@pytest.fixture
def client() -> LinearClient:
"""Create a Linear client for testing."""
token = os.getenv("SECRETS_GITHUB_TOKEN")
token = os.getenv("GITHUB_TOKEN")
if not token:
pytest.skip("SECRETS_GITHUB_TOKEN environment variable not set")
pytest.skip("GITHUB_TOKEN environment variable not set")
codebase = Codebase.from_repo("codegen-sh/Kevin-s-Adventure-Game")
return codebase

Expand Down

0 comments on commit f59804c

Please sign in to comment.