From 6c376167c33b3d5184a3f28f3855f80f44c0df53 Mon Sep 17 00:00:00 2001 From: DariusZdroba Date: Tue, 17 Dec 2024 14:03:17 +0200 Subject: [PATCH 1/2] fix: update root node branch name on changing base branch --- .../plugin/ui/toolwindow/SnykToolWindowPanel.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt b/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt index a861f1507..53742cae4 100644 --- a/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt +++ b/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt @@ -552,8 +552,21 @@ class SnykToolWindowPanel( val newContainerTreeNodeText = getNewContainerTreeNodeText(settings, containerResultsCount, addHMLPostfix) newContainerTreeNodeText?.let { rootContainerIssuesTreeNode.userObject = it } + + val newRootTreeNodeText = getNewRootTreeNodeText() + newRootTreeNodeText.let { rootTreeNode.info = it } } + private fun getNewRootTreeNodeText() : String { + val folderConfig = service().getFolderConfig(project.basePath.toString()) + if (folderConfig?.let { + getRootNodeText( + it.folderPath, + it.baseBranch + ) + } != null) return folderConfig.let { getRootNodeText(it.folderPath, it.baseBranch) } + return "Choose branch on ${project.basePath}" + } private fun getNewContainerTreeNodeText( settings: SnykApplicationSettingsStateService, containerResultsCount: Int?, From 89037904ed0d4f5192db64e7296d17899dcc4f95 Mon Sep 17 00:00:00 2001 From: DariusZdroba Date: Wed, 18 Dec 2024 17:15:33 +0200 Subject: [PATCH 2/2] chore: update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15c4f5838..f17f1fd54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Fixed - folder-specific configs are availabe on opening projects, not only on restart of the IDE - display open source issues in Rider. Previously, as the project.assets.json is in a derived folder, it was filtered. +- correctly display and update base branch name for Net New Issues ## [2.10.0] ### Changed - save git folder config in settings