Skip to content

Commit f62ed6c

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 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,7 @@ 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([], `refs/heads/${githubTargetBranch}:${TEMP_PR_HEAD_BRANCH}`);
161162

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

0 commit comments

Comments
 (0)