File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
keep/providers/argocd_provider Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ def pull_topology(self):
210210 source_provider_id = self .provider_id ,
211211 service = metadata ["uid" ],
212212 display_name = metadata ["name" ],
213- repository = spec [ "source" ]. get ( "repoURL" ),
213+ repository = self . __get_repository_urls ( spec ),
214214 )
215215 applications = {}
216216 if applicationSets :
@@ -235,3 +235,18 @@ def pull_topology(self):
235235 ] = "unknown"
236236
237237 return list (service_topology .values ()), {}
238+
239+ def __get_repository_urls (self , spec : dict ) -> str :
240+ """
241+ Extract repository URLs from application spec, handling both single and multiple sources.
242+ Returns a comma-separated string of repository URLs.
243+ """
244+ repos = []
245+ if "sources" in spec :
246+ # Handle multiple sources
247+ repos .extend (source .get ("repoURL" ) for source in spec ["sources" ] if source .get ("repoURL" ))
248+ elif "source" in spec and spec ["source" ].get ("repoURL" ):
249+ # Handle single source
250+ repos .append (spec ["source" ]["repoURL" ])
251+
252+ return ", " .join (repos ) if repos else None
You can’t perform that action at this time.
0 commit comments