feat: Add structured multi-server Maven credentials input#1037
Open
brunoborges wants to merge 4 commits into
Open
feat: Add structured multi-server Maven credentials input#1037brunoborges wants to merge 4 commits into
brunoborges wants to merge 4 commits into
Conversation
Introduce mvn-server-credentials to support multiple Maven server entries in settings.xml while keeping existing single-server inputs as fallback. Update auth generation/parsing logic, tests, action metadata, and docs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for configuring multiple Maven <server> credentials in a single run via a new structured multiline input, while preserving the existing single-server inputs as a fallback.
Changes:
- Introduces
mvn-server-credentialsmultiline input (server-id:USERNAME_ENV:PASSWORD_ENV) and parsing/validation (malformed entries, duplicate server IDs). - Updates Maven
settings.xmlgeneration to emit multiple<server>entries. - Updates action metadata + documentation and extends unit tests for the new behavior.
Show a summary per file
| File | Description |
|---|---|
src/mvn.setting.definition.ts |
Adds a shared type for Maven server settings entries. |
src/constants.ts |
Adds a constant for the new mvn-server-credentials input name. |
src/auth.ts |
Implements multiline input parsing + multi-server settings.xml generation with legacy fallback. |
README.md |
Documents the new input and its override behavior. |
docs/advanced-usage.md |
Adds an “Multiple repositories” example and expected generated settings.xml. |
action.yml |
Registers the new multiline input for the action. |
__tests__/auth.test.ts |
Updates tests for new function signatures + adds coverage for multi-server generation and parsing. |
dist/setup/index.js |
Bundled output updated to include the new parsing/generation behavior. |
dist/cleanup/index.js |
Bundled constants updated to include the new input constant. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 7/9 changed files
- Comments generated: 2
| import * as constants from './constants'; | ||
| import * as gpg from './gpg'; | ||
| import {getBooleanInput} from './util'; | ||
| import {MvnSettingDefinition} from './mvn.setting.definition'; |
Comment on lines
+2
to
+6
| id: string; | ||
| username?: string; | ||
| password?: string; | ||
| gpgPassphrase?: string; | ||
| } |
This was referenced Jun 23, 2026
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.
Summary
Why
This keeps the feature surface focused while supporting the core multi-repository use case without introducing indexed input tuples.
Compatibility
Existing workflows using server-id, server-username, and server-password continue to work unchanged.
Closes #85