Skip to content

Comments

fix(cli): skip auth when vNext is configured#1996

Merged
AndreyHirsa merged 2 commits intomainfrom
fix/ci-vnext-auth
Feb 18, 2026
Merged

fix(cli): skip auth when vNext is configured#1996
AndreyHirsa merged 2 commits intomainfrom
fix/ci-vnext-auth

Conversation

@AndreyHirsa
Copy link
Contributor

@AndreyHirsa AndreyHirsa commented Feb 18, 2026

Summary

Skip legacy auth validation (whoami) in CI when vNext is configured, so vNext projects only need LINGO_API_KEY.

Changes

  • Detect vNext from i18n.json config before auth validation, respecting --working-directory
  • Skip LINGODOTDEV_API_KEY check and whoami() call when vNext is detected
  • Make LINGODOTDEV_API_KEY optional in platform config Zod schema
  • Force parallel mode for vNext (uses run command which supports vNext, bypassing the i18n command which does not)

Testing

Business logic tests added:

  • All tests pass locally

Visuals

N/A — no UI changes

Checklist

  • Changeset added (if version bump needed)
  • Tests cover business logic (not just happy path)
  • No breaking changes (or documented below)

Closes N/A

Summary by CodeRabbit

  • Changes
    • CI simplified for vNext projects—only LINGO_API_KEY is required; legacy endpoint validation removed and legacy key is optional.
    • Parallel execution is automatically enabled for projects configured as vNext.
    • CI/environment mappings expanded to accept optional legacy API key and additional run options (working directory, commit processing, GPG signing).
    • CI action input for api-key is now optional with a default empty value.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Adds a changelog entry and updates CI command behavior to support a new vNext mode: CI can load config from a provided working directory, authenticates using vNext-specific API key (LINGO_API_KEY) while making the legacy key optional, and enables parallel execution automatically for vNext projects.

Changes

Cohort / File(s) Summary
Release Notes
.changeset/pink-heads-tap.md
Adds changelog entry documenting vNext CI behavior changes (vNext API key requirement and automatic parallel mode).
CI Command Logic
packages/cli/src/cli/cmd/ci/index.ts
Load config from optional workingDirectory, detect vNext mode, branch auth logic (require vnext.apiKey for vNext, legacy apiKey otherwise), set env vars (LINGO_API_KEY for vNext, LINGODOTDEV_API_KEY if present), add extra env mappings, and enable parallel when vNext or --parallel is passed.
Platform env validation
packages/cli/src/cli/cmd/ci/platforms/_base.ts
Make LINGODOTDEV_API_KEY optional and default replexicaApiKey to an empty string when absent.
GitHub Action inputs
action.yml
Change api-key input from required to optional with default "".

Sequence Diagram(s)

sequenceDiagram
  autonumber
  rect rgba(0,128,0,0.5)
    participant Dev as Developer / CLI Caller
  end
  rect rgba(0,0,255,0.5)
    participant CLI as CLI Process
  end
  rect rgba(255,165,0,0.5)
    participant CFG as Config Loader
  end
  rect rgba(128,0,128,0.5)
    participant AUTH as Authenticator
  end
  rect rgba(255,0,0,0.5)
    participant CI as CI Runner
  end

  Dev->>CLI: invoke `ci` (opts, maybe --workingDirectory, --parallel)
  CLI->>CFG: change CWD (if provided) and load config
  CFG-->>CLI: return config (incl. vNext flag, keys)
  CLI->>AUTH: create authenticator with selected apiUrl/apiKey
  AUTH-->>CLI: auth result (token or not)
  CLI->>CLI: set env vars (LINGO_API_KEY / LINGODOTDEV_API_KEY, extra mappings)
  CLI->>CI: start integration flow (parallel if vNext or --parallel)
  CI-->>Dev: CI results
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 Hopping through configs with a bright little skip,

LINGO keys snug in my pocket, no legacy trip,
Parallel paws tap the CI floor,
Builds bounce higher than ever before,
A rabbit's cheer for vNext's new zip! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(cli): skip auth when vNext is configured' clearly summarizes the main change: skipping authentication when vNext mode is detected in the CI command.
Description check ✅ Passed The description follows the template structure with Summary, Changes, Testing, Visuals, and Checklist sections. It clearly explains the objectives, though tests cover happy path only.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/ci-vnext-auth

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

@AndreyHirsa AndreyHirsa merged commit b9ae384 into main Feb 18, 2026
9 checks passed
@AndreyHirsa AndreyHirsa deleted the fix/ci-vnext-auth branch February 18, 2026 15:47
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