Fix: prevent default installation of JetBrains pre-releases by priyagupta108 · Pull Request #859 · actions/setup-java (original) (raw)
Pull Request Overview
This PR updates the JetBrains distributions handling to prevent the default installation of pre-release (EA) versions unless explicitly requested. Key changes include updating the raw version interface to include a prerelease flag and changing the build property type, and modifying the installer logic to filter versions based on the stability setting.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/distributions/jetbrains/models.ts | Added the prerelease flag and changed the build property from a number to a string. |
| src/distributions/jetbrains/installer.ts | Adjusted version filtering logic to include the new prerelease field and updated build parsing. |
Comments suppressed due to low confidence (3)
src/distributions/jetbrains/models.ts:12
- Changing the build property type from number to string may affect consumers of this API. Please verify that all dependent logic now correctly treats build as a string.
src/distributions/jetbrains/installer.ts:164
- [nitpick] With the build property now being a string, ensure that all logic relying on the build value (e.g., version comparisons) correctly handles string values instead of numbers.
src/distributions/jetbrains/installer.ts:126
- [nitpick] The filtering logic based on the stable flag now directly uses the prerelease field. Ensure this behavior is well-tested so that only the intended versions are selected based on the stability preference.
this.stable ? !version.prerelease : version.prerelease