diff --git a/cargo-shuttle/src/args.rs b/cargo-shuttle/src/args.rs index bae3db8ce..3d945cef9 100644 --- a/cargo-shuttle/src/args.rs +++ b/cargo-shuttle/src/args.rs @@ -89,6 +89,8 @@ pub enum Command { Login(LoginArgs), /// run a shuttle service locally Run(RunArgs), + /// Open an issue on github and provide feedback. + Feedback, /// manage a project on shuttle #[clap(subcommand)] Project(ProjectCommand), diff --git a/cargo-shuttle/src/lib.rs b/cargo-shuttle/src/lib.rs index 4dc9ba980..e2f1e74aa 100644 --- a/cargo-shuttle/src/lib.rs +++ b/cargo-shuttle/src/lib.rs @@ -73,6 +73,7 @@ impl Shuttle { Command::Init(init_args) => self.init(init_args, args.project_args).await, Command::Generate { shell, output } => self.complete(shell, output).await, Command::Login(login_args) => self.login(login_args).await, + Command::Feedback => self.feedback().await, Command::Run(run_args) => self.local_run(run_args).await, need_client => { let mut client = Client::new(self.ctx.api_url()); @@ -225,6 +226,15 @@ impl Shuttle { self.ctx.load_local(project_args) } + /// Provide feedback on GitHub. + async fn feedback(&self) -> Result<()> { + let url = "https://github.com/shuttle-hq/shuttle/issues/new"; + let _ = webbrowser::open(url); + + println!("\nIf your browser did not open automatically, go to {url}"); + Ok(()) + } + /// Log in with the given API key or after prompting the user for one. async fn login(&mut self, login_args: LoginArgs) -> Result<()> { let api_key_str = match login_args.api_key {