mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-23 11:45:06 +03:00
Merge pull request #5512 from gitbutlerapp/kv-branch-1
Make pr numbers available for branch listing
This commit is contained in:
commit
aa28ade188
@ -364,6 +364,8 @@ export class VirtualBranchReference {
|
||||
Ordered from newest to oldest (the most recent branch is first in the list)
|
||||
*/
|
||||
stackBranches!: string[];
|
||||
/** Pull Request numbes by branch name associated with the stack */
|
||||
pullRequests!: Map<string, number>;
|
||||
}
|
||||
|
||||
/** Represents a "commit author" or "signature", based on the data from ther git history */
|
||||
|
@ -274,6 +274,11 @@ fn branch_group_to_branch(
|
||||
.rev()
|
||||
.map(|b| b.name.clone())
|
||||
.collect_vec(),
|
||||
pull_requests: stack
|
||||
.branches()
|
||||
.iter()
|
||||
.filter_map(|b| b.pr_number.map(|pr| (b.name.clone(), pr)))
|
||||
.collect(),
|
||||
});
|
||||
|
||||
let mut remotes: Vec<gix::remote::Name<'static>> = Vec::new();
|
||||
@ -502,6 +507,8 @@ pub struct VirtualBranchReference {
|
||||
/// List of branches that are part of the stack
|
||||
/// Ordered from newest to oldest (the most recent branch is first in the list)
|
||||
pub stack_branches: Vec<String>,
|
||||
/// Pull Request numbes by branch name associated with the stack
|
||||
pub pull_requests: HashMap<String, usize>,
|
||||
}
|
||||
|
||||
/// Takes a list of `branch_names` (the given name, as returned by `BranchListing`) and returns
|
||||
|
Loading…
Reference in New Issue
Block a user