Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/local-actions/branch-manager/lib/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async function main() {
pr,
createPullRequestValidationConfig({
assertSignedCla: true,
assertMergeReady: true,
assertMergeReady: false,
assertPending: false,
assertChangesAllowForTargetLabel: false,
assertPassingCi: false,
Expand Down
8 changes: 4 additions & 4 deletions .github/local-actions/branch-manager/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}
Expand Down Expand Up @@ -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.");
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions ng-dev/pr/common/validation/assert-merge-ready.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}
Expand Down
3 changes: 0 additions & 3 deletions ng-dev/pr/common/validation/assert-pending.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down
Loading