Creates a comment on the pull request to indicate that the PR has been merged.
(
pullRequest: PullRequest,
targetBranches: string[],
)
| 203 | protected async _assertMergeableOrThrow( |
| 204 | {revisionRange}: PullRequest, |
| 205 | targetBranches: string[], |
| 206 | ): Promise<void> { |
| 207 | const failedBranches = this.cherryPickIntoTargetBranches(revisionRange, targetBranches, { |
| 208 | dryRun: true, |
| 209 | }); |
| 210 | |
| 211 | if (failedBranches.length) { |
| 212 | throw new MergeConflictsFatalError(failedBranches); |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | /** Creates a comment on the pull request to indicate that the PR has been merged. */ |
| 217 | protected async createMergeComment( |
| 218 | pullRequest: PullRequest, |
| 219 | targetBranches: string[], |
| 220 | ): Promise<void> { |
| 221 | /** The local branch names of the github targeted branches. */ |
| 222 | const banchesAndSha: [branchName: string, commitSha: string][] = targetBranches.map( |
| 223 | (targetBranch) => { |
| 224 | const localBranch = this.getLocalTargetBranchName(targetBranch); |
| 225 | |
| 226 | /** The SHA of the commit pushed to github which represents closing the PR. */ |
| 227 | const sha = this.git.run(['rev-parse', localBranch]).stdout.trim(); |
| 228 | return [targetBranch, sha]; |
| 229 | }, |
| 230 | ); |
| 231 |