gh-stack 0.1.6

Manage stacked PR workflows on Github
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use dialoguer::Input;

pub fn loop_until_confirm(prompt: &str) {
  let prompt = format!("{} Type 'yes' to continue", prompt);
  loop {
      let result = Input::<String>::new()
          .with_prompt(&prompt)
          .interact()
          .unwrap();
      match &result[..] {
          "yes" => return,
          _ => continue,
      }
  }
}