diff options
Diffstat (limited to 'src/sub_commands/prs/list.rs')
| -rw-r--r-- | src/sub_commands/prs/list.rs | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/src/sub_commands/prs/list.rs b/src/sub_commands/prs/list.rs index f0b4ad9..96004d4 100644 --- a/src/sub_commands/prs/list.rs +++ b/src/sub_commands/prs/list.rs | |||
| @@ -115,8 +115,7 @@ pub async fn launch( | |||
| 115 | vec![ | 115 | vec![ |
| 116 | nostr::Filter::default() | 116 | nostr::Filter::default() |
| 117 | .kind(nostr::Kind::Custom(PATCH_KIND)) | 117 | .kind(nostr::Kind::Custom(PATCH_KIND)) |
| 118 | .event(pr_events[selected_index].id) | 118 | .event(pr_events[selected_index].id), |
| 119 | .reference(format!("r-{root_commit}")), | ||
| 120 | ], | 119 | ], |
| 121 | ) | 120 | ) |
| 122 | .await? | 121 | .await? |
| @@ -127,9 +126,6 @@ pub async fn launch( | |||
| 127 | t.as_vec().len() > 2 | 126 | t.as_vec().len() > 2 |
| 128 | && t.as_vec()[1].eq(&pr_events[selected_index].id.to_string()) | 127 | && t.as_vec()[1].eq(&pr_events[selected_index].id.to_string()) |
| 129 | }) | 128 | }) |
| 130 | && e.tags | ||
| 131 | .iter() | ||
| 132 | .any(|t| t.as_vec().len() > 1 && t.as_vec()[1].eq(&format!("r-{root_commit}"))) | ||
| 133 | }) | 129 | }) |
| 134 | .map(std::borrow::ToOwned::to_owned) | 130 | .map(std::borrow::ToOwned::to_owned) |
| 135 | .collect(); | 131 | .collect(); |
| @@ -154,41 +150,6 @@ pub async fn launch( | |||
| 154 | ); | 150 | ); |
| 155 | } | 151 | } |
| 156 | 152 | ||
| 157 | // // TODO: look for mapping of existing branch | ||
| 158 | |||
| 159 | // // if latest_commit_id exists locally | ||
| 160 | // if local_branch_base == latest_commit_id { | ||
| 161 | // // TODO: check if its in the main / master branch (already merged) | ||
| 162 | // // TODO: check if it has any decendants and warn. maybe the user has | ||
| 163 | // // been working on a updates to be pushed? Suggest checking | ||
| 164 | // // out that branch. | ||
| 165 | // // we could search nostr for decendants of the commit as well? | ||
| 166 | // // perhaps this is overkill | ||
| 167 | // // TODO: check out the branch which it is the tip of. if the name of the | ||
| 168 | // // branch is different then ask the user if they would like to | ||
| 169 | // // use the existing branch or create one with the name of the PR. | ||
| 170 | // // TODO: if there are no decendants and its not the tip then | ||
| 171 | // // its an ophan commit so just make a branch from this commit. | ||
| 172 | // } | ||
| 173 | // // if commits ahead exist in a branch other than main or master | ||
| 174 | // // TODO: Identify probable existing branches - check remote tracker? | ||
| 175 | // // TODO: beind head | ||
| 176 | // else { | ||
| 177 | // // TODO: look for existing branch with same name | ||
| 178 | // // TODO: create remote tracker | ||
| 179 | // git_repo.create_branch_at_commit(&branch_name, &local_branch_base); | ||
| 180 | // git_repo.checkout(&branch_name)?; | ||
| 181 | // ahead.reverse(); | ||
| 182 | // for event in ahead { | ||
| 183 | // git_repo.apply_patch(event, branch_name)?; | ||
| 184 | // } | ||
| 185 | // println!("applied!") | ||
| 186 | // } | ||
| 187 | // // TODO: check if commits in pr exist, if so look for branches with they are | ||
| 188 | // in // could we suggest pulling updates into that branch? | ||
| 189 | // // | ||
| 190 | |||
| 191 | // TODO: checkout PR branch | ||
| 192 | Ok(()) | 153 | Ok(()) |
| 193 | } | 154 | } |
| 194 | 155 | ||