Skip to content

feat(envVariables): add branchName and repoName as general template variables#129

Merged
vigneshrajsb merged 1 commit intomainfrom
feat/general-branch-repo-template-vars
Mar 11, 2026
Merged

feat(envVariables): add branchName and repoName as general template variables#129
vigneshrajsb merged 1 commit intomainfrom
feat/general-branch-repo-template-vars

Conversation

@vigneshrajsb
Copy link
Contributor

Summary

  • Adds branchName and repoName as general (build-level) template variables for environment variable rendering
  • Previously, branchName was only available as a service-scoped variable (e.g. {{{web_frontend_branchName}}}), and repoName did not exist at all
  • Users can now use {{{branchName}}} and {{{repoName}}} directly in any env var template without a service prefix

Changes

  • src/server/lib/envVariables.ts — adds branchName (from build.pullRequest?.branchName) and repoName (from build.pullRequest?.fullName) to additionalVariables
  • src/server/lib/tests/buildEnvVariables.test.ts — updates mock data and assertions to include the new variables
  • src/server/lib/__tests__/envVariables.test.ts — adds rendering tests verifying correct substitution of {{{branchName}}} and {{{repoName}}}

Test plan

  • pnpm test — all 954 tests pass
  • pnpm lint — no lint errors introduced

🤖 Generated with Claude Code

…ariables

Previously, branchName was only available as a service-scoped variable
(e.g. {{{web_frontend_branchName}}}), and repoName was not available at all.
This adds both as top-level additionalVariables so users can reference
{{{branchName}}} and {{{repoName}}} directly in any env var template.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vigneshrajsb vigneshrajsb requested a review from a team as a code owner March 11, 2026 23:17
@vigneshrajsb vigneshrajsb merged commit ad4a3ea into main Mar 11, 2026
1 check passed
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