From 9343df2e8e85a836708dfbd6ee305b71cbceac0b Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Thu, 23 Oct 2025 12:21:16 +0000 Subject: [PATCH] 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. --- .ng-dev/commit-message.mjs | 1 - .ng-dev/pull-request.mjs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.ng-dev/commit-message.mjs b/.ng-dev/commit-message.mjs index 94fe91d8f727..4a3b270ce0a7 100644 --- a/.ng-dev/commit-message.mjs +++ b/.ng-dev/commit-message.mjs @@ -9,7 +9,6 @@ export const commitMessage = { maxLineLength: Infinity, minBodyLength: 0, minBodyLengthTypeExcludes: ['docs'], - disallowFixup: true, // Note: When changing this logic, also change the `contributing.ejs` file. scopes: packages.map(({ name }) => name), }; diff --git a/.ng-dev/pull-request.mjs b/.ng-dev/pull-request.mjs index 8beefa10c5fd..1f2d84d7ccba 100644 --- a/.ng-dev/pull-request.mjs +++ b/.ng-dev/pull-request.mjs @@ -1,12 +1,12 @@ /** * Configuration for the merge tool in `ng-dev`. This sets up the labels which * are respected by the merge script (e.g. the target labels). - * + * * @type { import("@angular/ng-dev").PullRequestConfig } */ export const pullRequest = { githubApiMerge: { - default: 'rebase', + default: 'auto', labels: [{ pattern: 'merge: squash commits', method: 'squash' }], }, };