Skip to content

Commit

Permalink
fix: update root node branch name on changing base branch [IDE-841] (#…
Browse files Browse the repository at this point in the history
…641)

* fix: update root node branch name on changing base branch

* chore: update changelog
  • Loading branch information
DariusZdroba authored Dec 19, 2024
1 parent 19581bc commit 72b9df7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<FolderConfigSettings>().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?,
Expand Down

0 comments on commit 72b9df7

Please sign in to comment.