MCPcopy Create free account
hub / github.com/alt-art/commit / scope_choice

Method scope_choice

src/commit_message/mod.rs:55–69  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

53 }
54
55 fn scope_choice(&mut self) -> Result<()> {
56 let scope_choice = self.prompt.select(
57 &self.pattern.msg.commit_scope,
58 self.pattern.commit_scopes.clone(),
59 )?;
60 if scope_choice == "custom" {
61 let custom_scope = self
62 .prompt
63 .required_input("Enter custom scope:", "Custom scope")?;
64 self.commit_builder.set_scope(&custom_scope);
65 } else if scope_choice != "none" {
66 self.commit_builder.set_scope(&scope_choice);
67 }
68 Ok(())
69 }
70
71 fn description(&mut self) -> Result<()> {
72 let description = self

Callers 1

make_message_commitFunction · 0.80

Calls 3

selectMethod · 0.80
required_inputMethod · 0.80
set_scopeMethod · 0.80

Tested by

no test coverage detected