Skip to content

Comments

Rename auth token env var#44

Open
carole-lavillonniere wants to merge 1 commit intomainfrom
rename-auth-token
Open

Rename auth token env var#44
carole-lavillonniere wants to merge 1 commit intomainfrom
rename-auth-token

Conversation

@carole-lavillonniere
Copy link
Collaborator

Rename LSTK_AUTH_TOKEN -> LOCALSTACK_AUTH_TOKEN

LOCALSTACK_AUTH_TOKEN is not prefixed with LSTK_ in order to be shared seamlessly with other LocalStack tools

@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

📝 Walkthrough

Walkthrough

The environment variable name for authentication token is renamed from LSTK_AUTH_TOKEN to LOCALSTACK_AUTH_TOKEN across configuration, authentication code, environment handling, and test files.

Changes

Cohort / File(s) Summary
Configuration & Workflow
.github/workflows/ci.yml, env.example
Updated environment variable name from LSTK_AUTH_TOKEN to LOCALSTACK_AUTH_TOKEN in CI workflow and example configuration.
Authentication Logic
internal/auth/auth.go, internal/auth/auth_test.go
Updated documentation, error messages, and test setup to reference LOCALSTACK_AUTH_TOKEN instead of LSTK_AUTH_TOKEN.
Environment Handling
internal/env/env.go
Changed authentication token retrieval to read from LOCALSTACK_AUTH_TOKEN environment variable instead of Viper configuration; added explanatory comment.
Tests
internal/ui/run_login_test.go, test/integration/env/env.go, test/integration/start_test.go
Updated environment variable name in login flow tests and integration test helpers from LSTK_AUTH_TOKEN to LOCALSTACK_AUTH_TOKEN.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Centralize env vars with Viper #39: Modifies environment variable handling across the same code areas (internal/auth, internal/env, tests), directly related to the refactoring of token environment variable naming.

Suggested reviewers

  • silv-io
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Rename auth token env var' directly summarizes the main change in the changeset: renaming the LSTK_AUTH_TOKEN environment variable to LOCALSTACK_AUTH_TOKEN across all affected files.
Description check ✅ Passed The description clearly explains the purpose of the rename (LOCALSTACK_AUTH_TOKEN to enable sharing with other LocalStack tools) and is directly related to the changeset modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rename-auth-token

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

101-106: Confirm the new secret name exists in repo settings. Otherwise the integration job will run without a token and likely fail.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 101 - 106, The workflow step "Run
integration tests" sets env LOCALSTACK_AUTH_TOKEN from a repository secret that
may not exist; ensure a secret named LOCALSTACK_AUTH_TOKEN is created in the
repository (Settings → Secrets & variables → Actions) or update the workflow to
reference the correct existing secret name so the integration job receives a
valid token.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 101-106: The workflow step "Run integration tests" sets env
LOCALSTACK_AUTH_TOKEN from a repository secret that may not exist; ensure a
secret named LOCALSTACK_AUTH_TOKEN is created in the repository (Settings →
Secrets & variables → Actions) or update the workflow to reference the correct
existing secret name so the integration job receives a valid token.

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.

1 participant