MCPcopy Create free account
hub / github.com/github/gh-aw / buildAllowedFieldSet

Function buildAllowedFieldSet

actions/setup/js/allowed_issue_fields.cjs:23–26  ·  view source on GitHub ↗

* Build a lowercased Set from allowedFields. * Returns null when no restriction applies (empty list, non-array, or wildcard "*"). * @param {string[]} allowedFields * @returns {Set |null}

(allowedFields)

Source from the content-addressed store, hash-verified

21 * @returns {Set<string>|null}
22 */
23function buildAllowedFieldSet(allowedFields) {
24 if (!Array.isArray(allowedFields) || allowedFields.length === 0 || allowedFields.includes("*")) return null;
25 return new Set(allowedFields.map(f => f.toLowerCase()));
26}
27
28/**
29 * Validate one issue field name against configured allowed-fields.

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected