File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
rust/stackable-cockpit/src Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -95,22 +95,25 @@ pub async fn get_oci_index<'a>() -> Result<HashMap<&'a str, ChartSourceMetadata>
95
95
let mut page = 1 ;
96
96
let page_size = 20 ;
97
97
98
- while let Ok ( artifacts_page ) = client
99
- . get ( format ! (
98
+ loop {
99
+ let url = format ! (
100
100
"{}/projects/{}/repositories/{}/artifacts?page_size={}&page={}" ,
101
101
base_url,
102
102
encode( project_name) ,
103
103
encode( repository_name) ,
104
104
page_size,
105
105
page
106
- ) )
107
- . send ( )
108
- . await
109
- . context ( GetArtifactsSnafu ) ?
110
- . json :: < Vec < Artifact > > ( )
111
- . await
112
- . context ( ParseArtifactsSnafu )
113
- {
106
+ ) ;
107
+
108
+ let artifact_page = client
109
+ . get ( url)
110
+ . send ( )
111
+ . await
112
+ . context ( GetArtifactsSnafu ) ?
113
+ . json :: < Vec < Artifact > > ( )
114
+ . await
115
+ . context ( ParseArtifactsSnafu ) ?;
116
+
114
117
let count = artifacts_page. len ( ) ;
115
118
artifacts. extend ( artifacts_page) ;
116
119
if count < page_size {
You can’t perform that action at this time.
0 commit comments