Skip to content

feat: add configurable git identity inputs to vscode-publish-extensions - #168

Merged
madhur310 merged 2 commits into
mainfrom
feat/configurable-git-identity
Aug 6, 2026
Merged

feat: add configurable git identity inputs to vscode-publish-extensions#168
madhur310 merged 2 commits into
mainfrom
feat/configurable-git-identity

Conversation

@madhur310

@madhur310 madhur310 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Adds configurable git user identity to the vscode-publish-extensions reusable workflow, allowing callers to specify the commit author for version bump commits.

What does this PR do?

Adds two optional workflow inputs to .github/workflows/vscode-publish-extensions.yml:

  • git-user-name: Git user name for version bump commits (default: 'GitHub Action')
  • git-user-email: Git user email for version bump commits (default: 'action@github.com')

Changes:

  • Add git-user-name and git-user-email optional inputs with backward-compatible defaults
  • Replace hardcoded git config with configurable identity using environment variables
  • Add validation to prevent empty string inputs from causing "empty ident name not allowed" errors
  • Use GIT_AUTHOR_* and GIT_COMMITTER_* environment variables for safer parameter passing

Why?

Previously, the workflow hardcoded the git identity as 'GitHub Action action@github.com'. This change allows callers to specify a different identity (e.g., 'Release Bot' via getGithubUserInfo action) while maintaining backward compatibility with existing callers through sensible defaults.

Backward Compatibility

✅ Fully backward compatible - inputs are optional with defaults matching the previous hardcoded values. Existing workflows calling this reusable workflow will continue to work without modifications.

madhur310 and others added 2 commits August 3, 2026 09:16
TypeScript 6 upgrade added scripts/tsconfig.json that now type-checks
scripts/. Convert JS files to TS to resolve TS7016 (missing declarations)
and TS7006 (implicit any) errors.

Changes:
- scripts/change-log-constants.js → .ts (ES modules)
- scripts/change-log-generator-utils.js → .ts (typed interfaces)
- scripts/create-release-notes.ts: add type to validateReleaseBranch param
- Remove unused RELEASE_BRANCH_PREFexport (knip)
- Update skill docs to reference .ts files

Functionality preserved - only adds type safety.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Addresses code review findings:
- Add validation to prevent empty string inputs from overriding defaults
- Use git environment variables instead of git config for safer parameter passing
- Prevents "empty ident name not allowed" errors when inputs are empty
- Eliminates potential shell injection via GIT_AUTHOR_* environment variables

Changes:
- Validate git-user-name and git-user-email inputs before use
- Fall back to workflow defaults if inputs are empty strings
- Replace git config commands with GIT_AUTHOR_* and GIT_COMMITTER_* env vars
- Add warning messages when falling back to defaults

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@madhur310 madhur310 changed the title fix: convert changelog scripts to TypeScript for TS6 compatibility feat: add configurable git identity inputs to vscode-publish-extensions Aug 5, 2026
madhur310 added a commit to forcedotcom/salesforcedx-vscode that referenced this pull request Aug 5, 2026
Temporarily reference feat/configurable-git-identity branch to test the new
git-user-name/git-user-email inputs before the upstream PR merges to main.

This commit should be reverted once salesforcecli/github-workflows#168 merges.
madhur310 added a commit to forcedotcom/salesforcedx-vscode that referenced this pull request Aug 5, 2026
Change back to using @main branch instead of feature branch now that
salesforcecli/github-workflows#168 has the necessary changes.
@madhur310
madhur310 merged commit affdfcb into main Aug 6, 2026
3 checks 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