-
Notifications
You must be signed in to change notification settings - Fork 842
Stack Entry: Carry associated review information #12367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -86,7 +86,7 @@ pub async fn create_review( | |||||||||
| Some(get_branch_names(&ctx.legacy_project, &branch_id)?) | ||||||||||
| } else { | ||||||||||
| // Find branches without PRs | ||||||||||
| let branches_without_prs = get_branches_without_prs(&review_map, &applied_stacks); | ||||||||||
| let branches_without_prs = get_branches_without_prs(&review_map, &applied_stacks)?; | ||||||||||
|
|
||||||||||
| if branches_without_prs.is_empty() { | ||||||||||
| if let Some(out) = out.for_human() { | ||||||||||
|
|
@@ -182,19 +182,25 @@ async fn ensure_forge_authentication(ctx: &mut Context) -> Result<(), anyhow::Er | |||||||||
| fn get_branches_without_prs( | ||||||||||
| review_map: &std::collections::HashMap<String, Vec<but_forge::ForgeReview>>, | ||||||||||
| applied_stacks: &[but_workspace::legacy::ui::StackEntry], | ||||||||||
| ) -> Vec<String> { | ||||||||||
| ) -> anyhow::Result<Vec<String>> { | ||||||||||
| let mut branches_without_prs = Vec::new(); | ||||||||||
estib-vega marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| for stack_entry in applied_stacks { | ||||||||||
| for head in &stack_entry.heads { | ||||||||||
| let branch_name = head.name.to_string(); | ||||||||||
| if !review_map.contains_key(&branch_name) | ||||||||||
| || review_map.get(&branch_name).map(|v| v.is_empty()).unwrap_or(true) | ||||||||||
| let branch_name = &head.name.to_string(); | ||||||||||
estib-vega marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| if !review_map.contains_key(branch_name) | ||||||||||
| || review_map.get(branch_name).map(|v| v.is_empty()).unwrap_or(true) | ||||||||||
| { | ||||||||||
| branches_without_prs.push(branch_name); | ||||||||||
| // This means that there are no associated reviews that are open, but that doesn't mean that there are | ||||||||||
| // no associated reviews. | ||||||||||
| // Check whether there's an associated forge review. | ||||||||||
|
||||||||||
| // Check whether there's an associated forge review. | |
| // Check whether there's an associated PR/MR number. |
estib-vega marked this conversation as resolved.
Show resolved
Hide resolved
estib-vega marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Feb 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in comment: "the append" should be "then append".
| // If there's no associated review, the append the branch | |
| // If there's no associated review, then append the branch |
Copilot
AI
Feb 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a typo in the comment: "the append the branch" should be "then append the branch".
| // If there's no associated review, the append the branch | |
| // If there's no associated review, then append the branch |
Uh oh!
There was an error while loading. Please reload this page.