mirror of
https://github.com/desktop/desktop
synced 2024-10-03 23:03:52 +00:00
Merge pull request #13854 from desktop/cherry-pick-source-target-context-menu-issue
Cherry-pick: Show target branch is success banner when cherry-pick through context menu
This commit is contained in:
commit
0437a4aa29
|
@ -2874,7 +2874,7 @@ export class App extends React.Component<IAppProps, IAppState> {
|
|||
branchCreated: false,
|
||||
commits,
|
||||
},
|
||||
tip.branch,
|
||||
null,
|
||||
commits,
|
||||
tip.branch.tip.sha
|
||||
)
|
||||
|
|
|
@ -3192,6 +3192,19 @@ export class Dispatcher {
|
|||
return this.appStore._setMultiCommitOperationStep(repository, step)
|
||||
}
|
||||
|
||||
/** Set the multi commit operation target branch */
|
||||
public setMultiCommitOperationTargetBranch(
|
||||
repository: Repository,
|
||||
targetBranch: Branch
|
||||
): void {
|
||||
this.repositoryStateManager.updateMultiCommitOperationState(
|
||||
repository,
|
||||
() => ({
|
||||
targetBranch,
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
/** Set cherry-pick branch created state */
|
||||
public setCherryPickBranchCreated(
|
||||
repository: Repository,
|
||||
|
|
|
@ -160,7 +160,7 @@ export abstract class CherryPick extends BaseMultiCommitOperation {
|
|||
}
|
||||
|
||||
const { commits, sourceBranch } = operationDetail
|
||||
|
||||
dispatcher.setMultiCommitOperationTargetBranch(repository, targetBranch)
|
||||
dispatcher.setCherryPickBranchCreated(repository, false)
|
||||
dispatcher.cherryPick(repository, targetBranch, commits, sourceBranch)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue