Clarify credential environment variable inputs#1134
Merged
Conversation
Rename credential-related inputs to make their environment-variable semantics explicit while preserving deprecated aliases with migration warnings. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 70a3daa8-dbc9-4eb0-a57b-df198a459315
Contributor
There was a problem hiding this comment.
Pull request overview
This PR renames credential-related inputs to make it explicit they accept environment variable names (not actual usernames/passwords/passphrases), while keeping the old names as deprecated aliases with migration warnings.
Changes:
- Introduces
*-env-varinput names and keeps prior names as deprecated aliases, with precedence for the new inputs. - Updates authentication settings generation to consume the renamed inputs and emit warnings when deprecated aliases are used.
- Updates documentation, examples, workflow e2e publishing config, tests, and regenerated
dist/bundles to match the new input names.
Show a summary per file
| File | Description |
|---|---|
src/constants.ts |
Adds new input name constants (and deprecated aliases) plus defaults used by the new inputs. |
src/auth.ts |
Reads inputs via a new helper that supports deprecated aliases + warnings; wires renamed inputs through settings generation. |
README.md |
Updates documented input names and the V6 change notes accordingly. |
docs/advanced-usage.md |
Updates publishing and GPG examples to use the new *-env-var input names. |
action.yml |
Adds the new inputs and keeps deprecated aliases (but currently missing metadata defaults for server inputs). |
.github/workflows/e2e-publishing.yml |
Updates workflow examples to the new input names. |
__tests__/auth.test.ts |
Adds unit tests for deprecated alias behavior and precedence. |
dist/setup/index.js |
Regenerated bundle reflecting the input renames and alias logic. |
dist/cleanup/index.js |
Regenerated bundle reflecting the input renames/constants changes. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 7/9 changed files
- Comments generated: 3
- Review effort level: Low
Comment on lines
+49
to
52
| server-username-env-var: | ||
| description: 'Environment variable name for the username for authentication | ||
| to the Apache Maven repository. Default is $GITHUB_ACTOR' | ||
| required: false |
Resolve documentation conflicts by retaining the latest V6 examples with the explicit environment-variable input names. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 70a3daa8-dbc9-4eb0-a57b-df198a459315
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Credential-related input names could be mistaken for inputs that accept actual usernames, passwords, or passphrases, even though they accept environment variable names. Rename them to
server-username-env-var,server-password-env-var, andgpg-passphrase-env-varso their semantics are explicit.The previous names remain available as deprecated aliases and emit migration warnings. When both forms are supplied, the replacement input takes precedence. Documentation, publishing examples, tests, and generated action bundles are updated consistently.
Related issue:
N/A
Check list:
npm run checklocally (format, lint, build, test) and all checks pass.