@@ -106,10 +106,19 @@ async fn run_interactive_launcher(config_path: &str) -> Result<()> {
106106 ui:: note ( "Direct commands still work any time, for example: devopster repo audit" ) ;
107107
108108 let options = vec ! [
109- menu_item( "Set up configuration" , "Create or refresh devopster-config.yaml" ) ,
109+ menu_item(
110+ "Set up configuration" ,
111+ "Create or refresh devopster-config.yaml" ,
112+ ) ,
110113 menu_item( "Sign in" , "Connect GitHub, Azure DevOps, or GitLab" ) ,
111- menu_item( "Manage repositories" , "List, audit, fix, blueprint, or sync" ) ,
112- menu_item( "Generate catalog" , "Export catalog.json for your organization" ) ,
114+ menu_item(
115+ "Manage repositories" ,
116+ "List, audit, fix, blueprint, or sync" ,
117+ ) ,
118+ menu_item(
119+ "Generate catalog" ,
120+ "Export catalog.json for your organization" ,
121+ ) ,
113122 menu_item( "Align topics" , "Apply missing template topics" ) ,
114123 menu_item( "View statistics" , "Check metadata coverage and compliance" ) ,
115124 menu_item( "Show help" , "See the direct CLI command reference" ) ,
@@ -120,20 +129,26 @@ async fn run_interactive_launcher(config_path: &str) -> Result<()> {
120129 0 => launch_init ( config_path) . await ?,
121130 1 => launch_login ( ) . await ?,
122131 2 => launch_repo ( config_path) . await ?,
123- 3 => run_command (
124- Commands :: Catalog ( catalog:: CatalogCommand {
125- action : catalog:: CatalogAction :: Generate ( catalog:: GenerateCatalogCommand { } ) ,
126- } ) ,
127- config_path,
128- )
129- . await ?,
130- 4 => run_command (
131- Commands :: Topics ( topics:: TopicsCommand {
132- action : topics:: TopicsAction :: Align ( topics:: AlignTopicsCommand { } ) ,
133- } ) ,
134- config_path,
135- )
136- . await ?,
132+ 3 => {
133+ run_command (
134+ Commands :: Catalog ( catalog:: CatalogCommand {
135+ action : catalog:: CatalogAction :: Generate (
136+ catalog:: GenerateCatalogCommand { } ,
137+ ) ,
138+ } ) ,
139+ config_path,
140+ )
141+ . await ?
142+ }
143+ 4 => {
144+ run_command (
145+ Commands :: Topics ( topics:: TopicsCommand {
146+ action : topics:: TopicsAction :: Align ( topics:: AlignTopicsCommand { } ) ,
147+ } ) ,
148+ config_path,
149+ )
150+ . await ?
151+ }
137152 5 => launch_stats ( config_path) . await ?,
138153 6 => print_help ( ) ?,
139154 _ => break ,
@@ -156,22 +171,26 @@ async fn launch_init(config_path: &str) -> Result<()> {
156171 menu_item( "Back" , "Return to the main launcher" ) ,
157172 ] ;
158173 match ui:: select ( "Init" , & options, 0 ) ? {
159- 0 => run_command (
160- Commands :: Init ( init:: InitCommand {
161- output : config_path. to_string ( ) ,
162- no_login : false ,
163- } ) ,
164- config_path,
165- )
166- . await ,
167- 1 => run_command (
168- Commands :: Init ( init:: InitCommand {
169- output : config_path. to_string ( ) ,
170- no_login : true ,
171- } ) ,
172- config_path,
173- )
174- . await ,
174+ 0 => {
175+ run_command (
176+ Commands :: Init ( init:: InitCommand {
177+ output : config_path. to_string ( ) ,
178+ no_login : false ,
179+ } ) ,
180+ config_path,
181+ )
182+ . await
183+ }
184+ 1 => {
185+ run_command (
186+ Commands :: Init ( init:: InitCommand {
187+ output : config_path. to_string ( ) ,
188+ no_login : true ,
189+ } ) ,
190+ config_path,
191+ )
192+ . await
193+ }
175194 _ => Ok ( ( ) ) ,
176195 }
177196}
@@ -184,7 +203,10 @@ async fn launch_login() -> Result<()> {
184203 menu_item( "Azure DevOps" , "Sign in with the az CLI" ) ,
185204 menu_item( "GitLab" , "Sign in with the glab CLI" ) ,
186205 menu_item( "All providers" , "Run all sign-in flows one after another" ) ,
187- menu_item( "Login status" , "Check whether providers are already signed in" ) ,
206+ menu_item(
207+ "Login status" ,
208+ "Check whether providers are already signed in" ,
209+ ) ,
188210 menu_item( "Logout" , "Remove saved credentials for one provider" ) ,
189211 menu_item( "Back" , "Return to the main launcher" ) ,
190212 ] ;
@@ -237,11 +259,23 @@ async fn launch_repo(config_path: &str) -> Result<()> {
237259 ui:: section ( "Repository actions" ) ;
238260 ui:: note ( "Pick the task you want to perform across repositories." ) ;
239261 let options = vec ! [
240- menu_item( "List repositories" , "Browse repositories, optionally by topic" ) ,
241- menu_item( "Audit repositories" , "Find missing metadata or branch drift" ) ,
262+ menu_item(
263+ "List repositories" ,
264+ "Browse repositories, optionally by topic" ,
265+ ) ,
266+ menu_item(
267+ "Audit repositories" ,
268+ "Find missing metadata or branch drift" ,
269+ ) ,
242270 menu_item( "Fix repositories" , "Interactively repair missing metadata" ) ,
243- menu_item( "Create from blueprint" , "Provision a new repository from a template" ) ,
244- menu_item( "Sync shared files" , "Push local or blueprint content to repositories" ) ,
271+ menu_item(
272+ "Create from blueprint" ,
273+ "Provision a new repository from a template" ,
274+ ) ,
275+ menu_item(
276+ "Sync shared files" ,
277+ "Push local or blueprint content to repositories" ,
278+ ) ,
245279 menu_item( "Back" , "Return to the main launcher" ) ,
246280 ] ;
247281
@@ -286,7 +320,10 @@ async fn launch_repo(config_path: &str) -> Result<()> {
286320 4 => {
287321 let sync_options = vec ! [
288322 menu_item( "Sync local files" , "Use a local folder such as .github" ) ,
289- menu_item( "Sync from blueprint" , "Compare against the configured blueprint repo" ) ,
323+ menu_item(
324+ "Sync from blueprint" ,
325+ "Compare against the configured blueprint repo" ,
326+ ) ,
290327 ] ;
291328 let sync_choice = ui:: select ( "Sync mode" , & sync_options, 0 ) ?;
292329 let from_blueprint = sync_choice == 1 ;
@@ -329,10 +366,8 @@ async fn launch_repo(config_path: &str) -> Result<()> {
329366async fn launch_stats ( config_path : & str ) -> Result < ( ) > {
330367 ui:: section ( "Statistics" ) ;
331368 ui:: note ( "View overall metadata health for the configured organization." ) ;
332- let scope_missing = ui:: prompt_confirm (
333- "Write non-compliant repositories into scoped_repos?" ,
334- false ,
335- ) ?;
369+ let scope_missing =
370+ ui:: prompt_confirm ( "Write non-compliant repositories into scoped_repos?" , false ) ?;
336371 run_command (
337372 Commands :: Stats ( stats:: StatsCommand { scope_missing } ) ,
338373 config_path,
0 commit comments