Skip to content

Commit 518bbcb

Browse files
committed
fixup! fixup! feat(ng-dev): add auto merge strategy for pull requests
1 parent 069efb2 commit 518bbcb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ng-dev/pr/merge/strategies/api-merge.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {FatalMergeToolError, MergeConflictsFatalError} from '../failures.js';
1717
import {Prompt} from '../../../utils/prompt.js';
1818
import {AutosquashMergeStrategy} from './autosquash-merge.js';
1919
import {Commit, parseCommitMessage} from '../../../commit-message/parse.js';
20+
import {TEMP_PR_HEAD_BRANCH} from './strategy.js';
2021

2122
/** Type describing the parameters for the Octokit `merge` API endpoint. */
2223
type OctokitMergeParams = RestEndpointMethodTypes['pulls']['merge']['parameters'];
@@ -157,7 +158,10 @@ export class GithubApiMergeStrategy extends AutosquashMergeStrategy {
157158
// Refresh the target branch the PR has been merged into through the API. We need
158159
// to re-fetch as otherwise we cannot cherry-pick the new commits into the remaining
159160
// target branches. Also, this is needed fo the merge comment to get the correct commit SHA.
160-
this.fetchTargetBranches([githubTargetBranch]);
161+
this.fetchTargetBranches([
162+
githubTargetBranch,
163+
`pull/${pullRequest.prNumber}/head:${TEMP_PR_HEAD_BRANCH}`,
164+
]);
161165

162166
// If the PR does not need to be merged into any other target branches,
163167
// we exit here as we already completed the merge.

0 commit comments

Comments
 (0)