Skip to content

Commit f257800

Browse files
committed
do not include required_contexts at all
1 parent 256fba9 commit f257800

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/lib/context.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
getBooleanInput,
44
getOptionalInput,
55
getRequiredInput,
6-
parseOptionalStringArrayInput,
76
} from "./input";
87
import Logger from "./log";
98

src/steps/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,17 @@ export async function run(
3737
if (rawPayload) {
3838
payload = JSON.parse(rawPayload);
3939
}
40-
const stepArgs: StartArgs = {
40+
let start_args = {
4141
deploymentID: getOptionalInput("deployment_id"),
4242
override: getBooleanInput("override", false), // default to false on start
4343
auto_merge: getBooleanInput("auto_merge", false),
44-
required_contexts:
45-
parseOptionalStringArrayInput("required_contexts"),
4644
payload,
4745
};
46+
const required_contexts = parseOptionalStringArrayInput("required_contexts")
47+
if (required_contexts !== undefined) {
48+
start_args["required_contexts"] = required_contexts;
49+
};
50+
const stepArgs: StartArgs = start_args;
4851
log.debug(`'${step}' arguments`, {
4952
stepArgs,
5053
coreArgs,

src/steps/start.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export type StartArgs = {
77
deploymentID?: string;
88
override: boolean;
99
auto_merge: boolean;
10-
required_contexts: string[] | undefined;
10+
required_contexts?: string[];
1111
payload?: { [key: string]: any };
1212
};
1313

0 commit comments

Comments
 (0)