snyk-intellij-plugin
snyk-intellij-plugin copied to clipboard
feat(settings): add preferredOrg field to folder configuration
Description
This PR adds support for configuring a preferred organization at the project level through the FolderConfig settings, and deprecates the global organization field in favor of this new project-level setting.
Changes:
- Added
preferredOrgfield toFolderConfigdata class with default empty string value - Added UI input field for preferred organization in SnykSettingsDialog, positioned below "Additional Parameters" in Project settings
- Implemented
getPreferredOrg()method in FolderConfigSettings to retrieve the project's preferred organization - Updated SnykProjectSettingsConfigurable to properly save and load preferredOrg settings
- Deprecated global organization field - Disabled the global organization text field in General settings and updated tooltip to guide users to use the project-level setting instead
- Added comprehensive test coverage with 10 new tests for preferredOrg functionality
- Fixed compilation errors in existing tests due to updated FolderConfig constructor
Jira: IDE-1366
The preferredOrg field allows users to configure a preferred organization at the project level, with the same behavior as Additional Parameters. The global organization setting in General settings is now deprecated in favor of this project-level configuration.
Checklist
- [x] Read and understood the Code of Conduct and Contributing Guidelines.
- [x] Tests added and all succeed
- [x] Linted
- [ ] CHANGELOG.md updated
- [ ] README.md updated, if user-facing
Screenshots / GIFs
UI changes:
- New "Preferred organization" field added in Project settings section, positioned below "Additional Parameters"
- Global "Organization" field in General settings is now disabled with a deprecation notice in the tooltip
:white_check_mark: Snyk checks have passed. No issues have been found so far.
| Status | Scanner | Total (0) | ||||
|---|---|---|---|---|---|---|
| :white_check_mark: | Code Security | 0 | 0 | 0 | 0 | 0 issues |
:computer: Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.
Failing test is due to missing CLI with protocol version 21. This is ok and can be ignored.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 4 committers have signed the CLA.
:x: nick-y-snyk
:x: andrewrobinsonhodges-snyk
:x: acke
:x: bastiandoetsch
You have signed the CLA already but the status is still pending? Let us recheck it.