@@ -62782,13 +62782,13 @@ function handleSetResult(result, final) {
62782
62782
}
62783
62783
final.value.add(result.value);
62784
62784
}
62785
- const $ZodEnum = /*@__PURE__*/ $constructor("$ZodEnum", (inst, def) => {
62785
+ const $ZodEnum = /*@__PURE__*/ (/* unused pure expression or super */ null && (core. $constructor("$ZodEnum", (inst, def) => {
62786
62786
$ZodType.init(inst, def);
62787
- const values = getEnumValues(def.entries);
62787
+ const values = util. getEnumValues(def.entries);
62788
62788
inst._zod.values = new Set(values);
62789
62789
inst._zod.pattern = new RegExp(`^(${values
62790
- .filter((k) => propertyKeyTypes.has(typeof k))
62791
- .map((o) => (typeof o === "string" ? escapeRegex(o) : o.toString()))
62790
+ .filter((k) => util. propertyKeyTypes.has(typeof k))
62791
+ .map((o) => (typeof o === "string" ? util. escapeRegex(o) : o.toString()))
62792
62792
.join("|")})$`);
62793
62793
inst._zod.parse = (payload, _ctx) => {
62794
62794
const input = payload.value;
@@ -62803,12 +62803,12 @@ const $ZodEnum = /*@__PURE__*/ $constructor("$ZodEnum", (inst, def) => {
62803
62803
});
62804
62804
return payload;
62805
62805
};
62806
- });
62807
- const $ZodLiteral = /*@__PURE__*/ (/* unused pure expression or super */ null && (core. $constructor("$ZodLiteral", (inst, def) => {
62806
+ }))) ;
62807
+ const $ZodLiteral = /*@__PURE__*/ $constructor("$ZodLiteral", (inst, def) => {
62808
62808
$ZodType.init(inst, def);
62809
62809
inst._zod.values = new Set(def.values);
62810
62810
inst._zod.pattern = new RegExp(`^(${def.values
62811
- .map((o) => (typeof o === "string" ? util. escapeRegex(o) : o ? o.toString() : String(o)))
62811
+ .map((o) => (typeof o === "string" ? escapeRegex(o) : o ? o.toString() : String(o)))
62812
62812
.join("|")})$`);
62813
62813
inst._zod.parse = (payload, _ctx) => {
62814
62814
const input = payload.value;
@@ -62823,7 +62823,7 @@ const $ZodLiteral = /*@__PURE__*/ (/* unused pure expression or super */ null &&
62823
62823
});
62824
62824
return payload;
62825
62825
};
62826
- }))) ;
62826
+ });
62827
62827
const $ZodFile = /*@__PURE__*/ (/* unused pure expression or super */ null && (core.$constructor("$ZodFile", (inst, def) => {
62828
62828
$ZodType.init(inst, def);
62829
62829
inst._zod.parse = (payload, _ctx) => {
@@ -64847,8 +64847,8 @@ function set(valueType, params) {
64847
64847
...util.normalizeParams(params),
64848
64848
});
64849
64849
}
64850
- const ZodEnum = /*@__PURE__*/ $constructor("ZodEnum", (inst, def) => {
64851
- $ZodEnum.init(inst, def);
64850
+ const ZodEnum = /*@__PURE__*/ (/* unused pure expression or super */ null && (core. $constructor("ZodEnum", (inst, def) => {
64851
+ core. $ZodEnum.init(inst, def);
64852
64852
ZodType.init(inst, def);
64853
64853
inst.enum = def.entries;
64854
64854
inst.options = Object.values(def.entries);
@@ -64865,7 +64865,7 @@ const ZodEnum = /*@__PURE__*/ $constructor("ZodEnum", (inst, def) => {
64865
64865
return new ZodEnum({
64866
64866
...def,
64867
64867
checks: [],
64868
- ...normalizeParams(params),
64868
+ ...util. normalizeParams(params),
64869
64869
entries: newEntries,
64870
64870
});
64871
64871
};
@@ -64881,17 +64881,17 @@ const ZodEnum = /*@__PURE__*/ $constructor("ZodEnum", (inst, def) => {
64881
64881
return new ZodEnum({
64882
64882
...def,
64883
64883
checks: [],
64884
- ...normalizeParams(params),
64884
+ ...util. normalizeParams(params),
64885
64885
entries: newEntries,
64886
64886
});
64887
64887
};
64888
- });
64888
+ }))) ;
64889
64889
function schemas_enum(values, params) {
64890
64890
const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
64891
64891
return new ZodEnum({
64892
64892
type: "enum",
64893
64893
entries,
64894
- ...normalizeParams(params),
64894
+ ...util. normalizeParams(params),
64895
64895
});
64896
64896
}
64897
64897
@@ -64909,8 +64909,8 @@ function nativeEnum(entries, params) {
64909
64909
...util.normalizeParams(params),
64910
64910
});
64911
64911
}
64912
- const ZodLiteral = /*@__PURE__*/ (/* unused pure expression or super */ null && (core. $constructor("ZodLiteral", (inst, def) => {
64913
- core. $ZodLiteral.init(inst, def);
64912
+ const ZodLiteral = /*@__PURE__*/ $constructor("ZodLiteral", (inst, def) => {
64913
+ $ZodLiteral.init(inst, def);
64914
64914
ZodType.init(inst, def);
64915
64915
inst.values = new Set(def.values);
64916
64916
Object.defineProperty(inst, "value", {
@@ -64921,12 +64921,12 @@ const ZodLiteral = /*@__PURE__*/ (/* unused pure expression or super */ null &&
64921
64921
return def.values[0];
64922
64922
},
64923
64923
});
64924
- }))) ;
64924
+ });
64925
64925
function literal(value, params) {
64926
64926
return new ZodLiteral({
64927
64927
type: "literal",
64928
64928
values: Array.isArray(value) ? value : [value],
64929
- ...util. normalizeParams(params),
64929
+ ...normalizeParams(params),
64930
64930
});
64931
64931
}
64932
64932
const ZodFile = /*@__PURE__*/ (/* unused pure expression or super */ null && (core.$constructor("ZodFile", (inst, def) => {
@@ -65318,23 +65318,35 @@ if (appServerInput) {
65318
65318
// --- Main ------------------------------------------------------------------------------------------------------------
65319
65319
runAction(async () => {
65320
65320
const input = {
65321
- scope: schemas_enum(['repos', 'owner'])
65322
- .parse(getInput('scope')),
65323
65321
permissions: record(schemas_string(), schemas_string())
65324
65322
.parse(getYamlInput('permissions', { required: true })),
65325
65323
repository: getInput('repository'),
65326
- repositories: array(schemas_string()).default([])
65324
+ repositories: union([
65325
+ array(schemas_string()),
65326
+ literal('ALL'),
65327
+ ])
65328
+ .default(() => [])
65327
65329
.parse(getYamlInput('repositories')),
65328
65330
owner: getInput('owner'),
65331
+ // --- legacy support
65332
+ scope: getInput('scope'),
65329
65333
};
65330
- // Legacy support for snake_case permissions
65331
- input.permissions = mapObjectEntries(input.permissions, ([key, value]) => [key.replace('_', '-'), value]);
65332
- if (input.repository) {
65334
+ // --- legacy support
65335
+ {
65336
+ // legacy support for owner input
65337
+ if (input.scope === 'owner') {
65338
+ if (Array.isArray(input.repositories) && input.repositories.length === 0) {
65339
+ input.repositories = 'ALL';
65340
+ }
65341
+ }
65342
+ // Legacy support for snake_case permissions
65343
+ input.permissions = mapObjectEntries(input.permissions, ([key, value]) => [key.replace('_', '-'), value]);
65344
+ }
65345
+ if (Array.isArray(input.repositories) && input.repository) {
65333
65346
input.repositories.unshift(input.repository);
65334
65347
}
65335
65348
lib_core.info('Get access token...');
65336
65349
const accessToken = await getAccessToken({
65337
- scope: input.scope,
65338
65350
permissions: input.permissions,
65339
65351
repositories: input.repositories,
65340
65352
owner: input.owner,
0 commit comments