Skip to content

feat: in non-ci environment don't add username to url, checkout shallow#2329

Open
r0b1n wants to merge 1 commit into
mainfrom
feat/improve-local-module-build
Open

feat: in non-ci environment don't add username to url, checkout shallow#2329
r0b1n wants to merge 1 commit into
mainfrom
feat/improve-local-module-build

Conversation

@r0b1n

@r0b1n r0b1n commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@r0b1n r0b1n requested a review from a team as a code owner July 15, 2026 13:08
@github-actions

Copy link
Copy Markdown
Contributor

AI Code Review

✅ Approved — no issues found


What was reviewed

File Change
automation/utils/src/git.ts Added early return in getGHRepoAuthUrl when not in CI — skips embedding credentials in the URL
automation/utils/src/steps.ts cloneTestProject now always calls cloneRepoShallow instead of switching between cloneRepo and cloneRepoShallow based on CI

Skipped (out of scope): dist/, pnpm-lock.yaml


Positives

  • The getGHRepoAuthUrl early-return is the correct place to guard against credential injection — centralises the CI check rather than scattering it across callers.
  • cloneRepoShallow already contains its own if (process.env.CI) guard around setLocalGitUserInfo, so removing the cloneRepo/cloneRepoShallow branch in cloneTestProject is safe and simplifies the call site without changing behaviour.
  • Both changes together make local development safer by never embedding GH_USERNAME/GH_PAT in clone URLs when running outside CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants