Asserts that given pull request could be merged into the given target branches.
(
{revisionRange}: PullRequest,
targetBranches: string[],
)
| 189 | cherryPickArgs.push('-x'); |
| 190 | } |
| 191 | |
| 192 | // Cherry-pick the refspec into all determined target branches. |
| 193 | for (const branchName of targetBranches) { |
| 194 | const localTargetBranch = this.getLocalTargetBranchName(branchName); |
| 195 | // Checkout the local target branch. |
| 196 | this.git.run(['checkout', localTargetBranch]); |
| 197 | // Cherry-pick the refspec into the target branch. |
| 198 | const cherryPickResult = this.git.runGraceful(['cherry-pick', ...cherryPickArgs]); |
| 199 | if (cherryPickResult.status !== 0) { |
| 200 | // Abort the failed cherry-pick. We do this because Git persists the failed |
| 201 | // cherry-pick state globally in the repository. This could prevent future |
| 202 | // pull request merges as a Git thinks a cherry-pick is still in progress. |
| 203 | this.git.runGraceful(['cherry-pick', '--abort']); |
| 204 | failedBranches.push(branchName); |
| 205 | } |
nothing calls this directly
no outgoing calls
no test coverage detected