From 06be0bc44011411b78217459f505ed12281b32c4 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 1 Dec 2023 00:00:00 +0000 Subject: feat(prs-list) list and pull selected as branch - fetch prs and present as a selectable list - create and / or checkout branch for selected pr - apply latest patches as commits --- src/cli_interactor.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/cli_interactor.rs') diff --git a/src/cli_interactor.rs b/src/cli_interactor.rs index e52cefb..c6cd4e5 100644 --- a/src/cli_interactor.rs +++ b/src/cli_interactor.rs @@ -40,6 +40,8 @@ impl InteractorPrompt for Interactor { } fn choice(&self, parms: PromptChoiceParms) -> Result { dialoguer::Select::with_theme(&self.theme) + .with_prompt(parms.prompt) + .report(parms.report) .items(&parms.choices) .interact() .context("failed to get choice") @@ -96,13 +98,20 @@ impl PromptConfirmParms { pub struct PromptChoiceParms { pub prompt: String, pub choices: Vec, + pub report: bool, } impl PromptChoiceParms { pub fn with_prompt>(mut self, prompt: S) -> Self { self.prompt = prompt.into(); + self.report = true; self } + + // pub fn dont_report(mut self) -> Self { + // self.report = false; + // self + // } pub fn with_choices(mut self, choices: Vec) -> Self { self.choices = choices; self -- cgit v1.2.3