File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,15 @@ async def __get_repourl_from_scan_config(self):
5353 return entry ['value' ]
5454
5555 return None
56+
57+ async def __get_primary_branch_from_scan_config (self ):
58+ # The project config API does not always return the repoUrl. The scan configuration
59+ # API used by the UI has it if it is not in the project config.
60+ for entry in await self .get_project_scan_config ():
61+ if entry ['key' ] == "scan.handler.git.branch" :
62+ return entry ['value' ]
63+
64+ return ""
5665
5766 async def __get_repomgr_config (self ):
5867 # Projects imported from the SCM have their repo credentials stored in the repo-manager
@@ -105,6 +114,8 @@ async def __get_logical_primary_branch(self):
105114 return self .__project_data ['mainBranch' ]
106115 elif len (await self .__get_primary_branch_from_repomgr_config ()) > 0 :
107116 return await self .__get_primary_branch_from_repomgr_config ()
117+ elif len (await self .__get_primary_branch_from_scan_config ()):
118+ return await self .__get_primary_branch_from_scan_config ()
108119
109120 return None
110121
You can’t perform that action at this time.
0 commit comments