upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/ngit/sub_commands/list.rs35
1 files changed, 28 insertions, 7 deletions
diff --git a/src/bin/ngit/sub_commands/list.rs b/src/bin/ngit/sub_commands/list.rs
index c3c8c71..0083c91 100644
--- a/src/bin/ngit/sub_commands/list.rs
+++ b/src/bin/ngit/sub_commands/list.rs
@@ -206,13 +206,32 @@ pub async fn launch() -> Result<()> {
206 { 206 {
207 match Interactor::default().choice( 207 match Interactor::default().choice(
208 PromptChoiceParms::default() 208 PromptChoiceParms::default()
209 .with_prompt("this is new PR event kind which ngit doesnt yet support") 209 .with_prompt(
210 "this is new PR event kind which isn't supported in `ngit list` yet",
211 )
210 .with_default(0) 212 .with_default(0)
211 .with_choices(vec![ 213 .with_choices(
212 // TODO enable checkout by fetching oids, creating / updating branch and 214 if [Kind::GitStatusOpen, Kind::GitStatusDraft].contains(&selected_status)
213 // checking out 215 && git_repo
214 "back to proposals".to_string(), 216 .get_first_nostr_remote_when_in_ngit_binary()
215 ]), 217 .await
218 .is_ok_and(|r| r.is_some())
219 {
220 vec![
221 format!(
222 "I'll manually checkout the proposal at remote branch '{}'",
223 cover_letter
224 .get_branch_name_with_pr_prefix_and_shorthand_id()
225 .unwrap()
226 ),
227 // TODO fetch oids and follow similar logic for dealing with
228 // conflcts as with patches below
229 "back to proposals".to_string(),
230 ]
231 } else {
232 vec!["back to proposals".to_string()]
233 },
234 ),
216 )? { 235 )? {
217 0 => continue, 236 0 => continue,
218 _ => { 237 _ => {
@@ -251,7 +270,9 @@ pub async fn launch() -> Result<()> {
251 ]), 270 ]),
252 )? { 271 )? {
253 0 => { 272 0 => {
254 println!("Some proposals are posted as patch without listing a parent commit\n"); 273 println!(
274 "Some proposals are posted as patch without listing a parent commit\n"
275 );
255 println!( 276 println!(
256 "they are not anchored against a particular state of the code base like a standard patch or a pull request can be\n" 277 "they are not anchored against a particular state of the code base like a standard patch or a pull request can be\n"
257 ); 278 );