Skip to content

Commit 9b93e26

Browse files
committed
build: enable auto merge strategy for pull requests
This commit enables the 'auto' merge strategy for pull requests. This strategy automatically determines the best merge method based on the pull request's commits. The auto merge strategy can: - Delegate to the autosquash merge strategy if the PR has fixup/squash commits against multiple normal commits. - Squash commits if the PR has only one normal commit and some fixup/squash commits. - Rebase commits if the PR has no fixup/squash commits. This improves the developer experience by automating the merge process. A key benefit is that PRs that can be cleanly rebased will now appear as 'merged' in GitHub's UI, providing a clearer history than the previous 'unmerged' status that could occur with squashing. (cherry picked from commit ffa7266)
1 parent 9d7cf4f commit 9b93e26

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.ng-dev/commit-message.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export const commitMessage = {
99
maxLineLength: Infinity,
1010
minBodyLength: 0,
1111
minBodyLengthTypeExcludes: ['docs'],
12-
disallowFixup: true,
1312
// Note: When changing this logic, also change the `contributing.ejs` file.
1413
scopes: packages.map(({ name }) => name),
1514
};

.ng-dev/pull-request.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
22
* Configuration for the merge tool in `ng-dev`. This sets up the labels which
33
* are respected by the merge script (e.g. the target labels).
4-
*
4+
*
55
* @type { import("@angular/ng-dev").PullRequestConfig }
66
*/
77
export const pullRequest = {
88
githubApiMerge: {
9-
default: 'rebase',
9+
default: 'auto',
1010
labels: [{ pattern: 'merge: squash commits', method: 'squash' }],
1111
},
1212
};

0 commit comments

Comments
 (0)