镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Rename jdkFile input to jdk-file with deprecated alias support - #1080

Closed
brunoborges with Copilot wants to merge 1 commit into
mainfrom
copilot/rename-jdkfile-property
Closed

brunoborges with Copilot wants to merge 1 commit into
mainfrom
copilot/rename-jdkfile-property

Conversation

Copilot AI commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Description:
This updates setup-java input naming consistency by introducing jdk-file as the canonical input while preserving jdkFile as a backward-compatible alias. The alias now emits a deprecation warning only when it is the value actually used.

  • Input contract

    • action.yml now defines jdk-file as the primary input.
    • jdkFile remains supported as a deprecated alias.
  • Runtime behavior

    • Added centralized input resolution in getJdkFileInput().
    • Resolution order: prefer jdk-file; fall back to jdkFile.
    • Deprecation warning is emitted only when falling back to jdkFile.
  • User-facing text and examples

    • Updated docs/workflow examples to use jdk-file.
    • Updated local installer missing-input error text to jdk-file.
  • Test coverage

    • Added tests for:
      • canonical jdk-file input
      • alias fallback with warning
      • precedence (jdk-file over jdkFile) without warning
export function getJdkFileInput() {
  const jdkFile = core.getInput(INPUT_JDK_FILE);
  const deprecatedJdkFile = core.getInput(INPUT_JDK_FILE_DEPRECATED);

  if (!jdkFile && deprecatedJdkFile) {
    core.warning(
      "Input 'jdkFile' is deprecated and will be removed in a future release. Please use 'jdk-file' instead."
    );
  }

  return jdkFile || deprecatedJdkFile;
}

Related issue:

Check list:

  • Ran npm run check locally (format, lint, build, test) and all checks pass.
  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Copilot AI linked an issue Jul 8, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Rename jdkFile property to jdk-file with deprecation warning Rename jdkFile input to jdk-file with deprecated alias support Jul 8, 2026
Copilot AI requested a review from brunoborges July 8, 2026 14:23
@brunoborges
brunoborges marked this pull request as ready for review July 8, 2026 15:18
Copilot AI review requested due to automatic review settings July 8, 2026 15:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

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.

Rename jdkFile property

3 participants