mirror of
https://github.com/peakoss/anti-slop
synced 2026-12-01 13:39:13 +08:00
refactor(inputs): reorder failure and success inputs
This commit is contained in:
4 files changed
+28
-36
No files matched your search
+16
-18
@@ -235,20 +235,6 @@ inputs:
|
|||||||
# required: false
|
# required: false
|
||||||
# default: ""
|
# default: ""
|
||||||
|
|
||||||
# PR Close Actions
|
|
||||||
close-pr:
|
|
||||||
description: Close the PR when the maximum number of failures is reached.
|
|
||||||
required: false
|
|
||||||
default: "true"
|
|
||||||
lock-pr:
|
|
||||||
description: Lock the PR conversation after closing.
|
|
||||||
required: false
|
|
||||||
default: "false"
|
|
||||||
delete-branch:
|
|
||||||
description: Delete the source branch after closing the PR.
|
|
||||||
required: false
|
|
||||||
default: "false"
|
|
||||||
|
|
||||||
# PR Success Actions
|
# PR Success Actions
|
||||||
success-add-pr-labels:
|
success-add-pr-labels:
|
||||||
description: Comma-separated list of labels to add to the PR on success.
|
description: Comma-separated list of labels to add to the PR on success.
|
||||||
@@ -256,10 +242,6 @@ inputs:
|
|||||||
default: ""
|
default: ""
|
||||||
|
|
||||||
# PR Failure Actions
|
# PR Failure Actions
|
||||||
failure-pr-message:
|
|
||||||
description: Comment posted on the PR when the maximum number of failures is reached. Empty posts no comment.
|
|
||||||
required: false
|
|
||||||
default: ""
|
|
||||||
failure-remove-pr-labels:
|
failure-remove-pr-labels:
|
||||||
description: Comma-separated list of labels to remove from the PR on failure.
|
description: Comma-separated list of labels to remove from the PR on failure.
|
||||||
required: false
|
required: false
|
||||||
@@ -272,6 +254,22 @@ inputs:
|
|||||||
description: Comma-separated list of labels to add to the PR on failure.
|
description: Comma-separated list of labels to add to the PR on failure.
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
|
failure-pr-message:
|
||||||
|
description: Comment posted on the PR when the maximum number of failures is reached. Empty posts no comment.
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
close-pr:
|
||||||
|
description: Close the PR when the maximum number of failures is reached.
|
||||||
|
required: false
|
||||||
|
default: "true"
|
||||||
|
lock-pr:
|
||||||
|
description: Lock the PR conversation after closing.
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
delete-branch:
|
||||||
|
description: Delete the source branch after closing the PR.
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
|
||||||
# Issue Close Actions
|
# Issue Close Actions
|
||||||
# close-issue:
|
# close-issue:
|
||||||
|
|||||||
+4
-6
@@ -71,19 +71,17 @@ export enum Input {
|
|||||||
ExemptPrMilestones = "exempt-pr-milestones",
|
ExemptPrMilestones = "exempt-pr-milestones",
|
||||||
// ExemptIssueMilestones = "exempt-issue-milestones",
|
// ExemptIssueMilestones = "exempt-issue-milestones",
|
||||||
|
|
||||||
// PR Close Actions
|
|
||||||
ClosePr = "close-pr",
|
|
||||||
LockPr = "lock-pr",
|
|
||||||
DeleteBranch = "delete-branch",
|
|
||||||
|
|
||||||
// PR Success Actions
|
// PR Success Actions
|
||||||
SuccessAddPrLabels = "success-add-pr-labels",
|
SuccessAddPrLabels = "success-add-pr-labels",
|
||||||
|
|
||||||
// PR Failure Actions
|
// PR Failure Actions
|
||||||
FailurePrMessage = "failure-pr-message",
|
|
||||||
FailureRemovePrLabels = "failure-remove-pr-labels",
|
FailureRemovePrLabels = "failure-remove-pr-labels",
|
||||||
FailureRemoveAllPrLabels = "failure-remove-all-pr-labels",
|
FailureRemoveAllPrLabels = "failure-remove-all-pr-labels",
|
||||||
FailureAddPrLabels = "failure-add-pr-labels",
|
FailureAddPrLabels = "failure-add-pr-labels",
|
||||||
|
FailurePrMessage = "failure-pr-message",
|
||||||
|
ClosePr = "close-pr",
|
||||||
|
LockPr = "lock-pr",
|
||||||
|
DeleteBranch = "delete-branch",
|
||||||
|
|
||||||
// Issue Close Actions
|
// Issue Close Actions
|
||||||
// CloseIssue = "close-issue",
|
// CloseIssue = "close-issue",
|
||||||
|
|||||||
+4
-6
@@ -93,19 +93,17 @@ export function getSettings(): Settings {
|
|||||||
exemptPrMilestones: parseList(core.getInput(Input.ExemptPrMilestones)),
|
exemptPrMilestones: parseList(core.getInput(Input.ExemptPrMilestones)),
|
||||||
// exemptIssueMilestones: parseList(core.getInput(Input.ExemptIssueMilestones)),
|
// exemptIssueMilestones: parseList(core.getInput(Input.ExemptIssueMilestones)),
|
||||||
|
|
||||||
// PR Close Actions
|
|
||||||
closePr: core.getBooleanInput(Input.ClosePr),
|
|
||||||
lockPr: core.getBooleanInput(Input.LockPr),
|
|
||||||
deleteBranch: core.getBooleanInput(Input.DeleteBranch),
|
|
||||||
|
|
||||||
// PR Success Actions
|
// PR Success Actions
|
||||||
successAddPrLabels: parseList(core.getInput(Input.SuccessAddPrLabels)),
|
successAddPrLabels: parseList(core.getInput(Input.SuccessAddPrLabels)),
|
||||||
|
|
||||||
// PR Failure Actions
|
// PR Failure Actions
|
||||||
failurePrMessage: core.getInput(Input.FailurePrMessage),
|
|
||||||
failureRemovePrLabels: parseList(core.getInput(Input.FailureRemovePrLabels)),
|
failureRemovePrLabels: parseList(core.getInput(Input.FailureRemovePrLabels)),
|
||||||
failureRemoveAllPrLabels: core.getBooleanInput(Input.FailureRemoveAllPrLabels),
|
failureRemoveAllPrLabels: core.getBooleanInput(Input.FailureRemoveAllPrLabels),
|
||||||
failureAddPrLabels: parseList(core.getInput(Input.FailureAddPrLabels)),
|
failureAddPrLabels: parseList(core.getInput(Input.FailureAddPrLabels)),
|
||||||
|
failurePrMessage: core.getInput(Input.FailurePrMessage),
|
||||||
|
closePr: core.getBooleanInput(Input.ClosePr),
|
||||||
|
lockPr: core.getBooleanInput(Input.LockPr),
|
||||||
|
deleteBranch: core.getBooleanInput(Input.DeleteBranch),
|
||||||
|
|
||||||
// Issue Close Actions
|
// Issue Close Actions
|
||||||
// closeIssue: core.getBooleanInput(Input.CloseIssue),
|
// closeIssue: core.getBooleanInput(Input.CloseIssue),
|
||||||
|
|||||||
@@ -70,19 +70,17 @@ export interface Settings {
|
|||||||
exemptPrMilestones: string[];
|
exemptPrMilestones: string[];
|
||||||
// exemptIssueMilestones: string[];
|
// exemptIssueMilestones: string[];
|
||||||
|
|
||||||
// PR Close Actions
|
|
||||||
closePr: boolean;
|
|
||||||
lockPr: boolean;
|
|
||||||
deleteBranch: boolean;
|
|
||||||
|
|
||||||
// PR Success Actions
|
// PR Success Actions
|
||||||
successAddPrLabels: string[];
|
successAddPrLabels: string[];
|
||||||
|
|
||||||
// PR Failure Actions
|
// PR Failure Actions
|
||||||
failurePrMessage: string;
|
|
||||||
failureRemovePrLabels: string[];
|
failureRemovePrLabels: string[];
|
||||||
failureRemoveAllPrLabels: boolean;
|
failureRemoveAllPrLabels: boolean;
|
||||||
failureAddPrLabels: string[];
|
failureAddPrLabels: string[];
|
||||||
|
failurePrMessage: string;
|
||||||
|
closePr: boolean;
|
||||||
|
lockPr: boolean;
|
||||||
|
deleteBranch: boolean;
|
||||||
|
|
||||||
// Issue Close Actions
|
// Issue Close Actions
|
||||||
// closeIssue: boolean;
|
// closeIssue: boolean;
|
||||||
|
|||||||
Reference in new issue
Block a user