diff --git a/.github/local-actions/branch-manager/lib/main.ts b/.github/local-actions/branch-manager/lib/main.ts index 9c493a4c1..b12b10dff 100644 --- a/.github/local-actions/branch-manager/lib/main.ts +++ b/.github/local-actions/branch-manager/lib/main.ts @@ -81,7 +81,7 @@ async function main() { pr, createPullRequestValidationConfig({ assertSignedCla: true, - assertMergeReady: true, + assertMergeReady: false, assertPending: false, assertChangesAllowForTargetLabel: false, assertPassingCi: false, diff --git a/.github/local-actions/branch-manager/main.js b/.github/local-actions/branch-manager/main.js index b43f7ca65..4c33db29e 100644 --- a/.github/local-actions/branch-manager/main.js +++ b/.github/local-actions/branch-manager/main.js @@ -59873,6 +59873,9 @@ async function pullRequestHasValidTestedComment(comments, gitClient) { var mergeReadyValidation = createPullRequestValidation({ name: "assertMergeReady", canBeForceIgnored: false }, () => Validation7); var Validation7 = class extends PullRequestValidation { assert(pullRequest) { + if (pullRequest.isDraft) { + throw this._createError("Pull request is still a draft."); + } if (!pullRequest.labels.nodes.some(({ name }) => name === actionLabels.ACTION_MERGE.name)) { throw this._createError("Pull request is not marked as merge ready."); } @@ -59911,9 +59914,6 @@ var Validation9 = class extends PullRequestValidation { var pendingStateValidation = createPullRequestValidation({ name: "assertPending", canBeForceIgnored: false }, () => Validation10); var Validation10 = class extends PullRequestValidation { assert(pullRequest) { - if (pullRequest.isDraft) { - throw this._createError("Pull request is still a draft."); - } switch (pullRequest.state) { case "CLOSED": throw this._createError("Pull request is already closed."); @@ -64515,7 +64515,7 @@ async function main() { await cloneRepoIntoTmpLocation({ owner, repo }); const pullRequest = await loadAndValidatePullRequest({ git, config }, pr, createPullRequestValidationConfig({ assertSignedCla: true, - assertMergeReady: true, + assertMergeReady: false, assertPending: false, assertChangesAllowForTargetLabel: false, assertPassingCi: false, diff --git a/ng-dev/pr/common/validation/assert-merge-ready.ts b/ng-dev/pr/common/validation/assert-merge-ready.ts index 96df71a99..a5377dca9 100644 --- a/ng-dev/pr/common/validation/assert-merge-ready.ts +++ b/ng-dev/pr/common/validation/assert-merge-ready.ts @@ -19,6 +19,9 @@ export const mergeReadyValidation = createPullRequestValidation( class Validation extends PullRequestValidation { assert(pullRequest: PullRequestFromGithub) { + if (pullRequest.isDraft) { + throw this._createError('Pull request is still a draft.'); + } if (!pullRequest.labels.nodes.some(({name}) => name === actionLabels.ACTION_MERGE.name)) { throw this._createError('Pull request is not marked as merge ready.'); } diff --git a/ng-dev/pr/common/validation/assert-pending.ts b/ng-dev/pr/common/validation/assert-pending.ts index 2ec8f2e55..99be05fb6 100644 --- a/ng-dev/pr/common/validation/assert-pending.ts +++ b/ng-dev/pr/common/validation/assert-pending.ts @@ -18,9 +18,6 @@ export const pendingStateValidation = createPullRequestValidation( class Validation extends PullRequestValidation { assert(pullRequest: PullRequestFromGithub) { - if (pullRequest.isDraft) { - throw this._createError('Pull request is still a draft.'); - } switch (pullRequest.state) { case 'CLOSED': throw this._createError('Pull request is already closed.');