in github-projects/map-labels/mapLabelsToAttributes.js [162:182]
async function getOptionIdForValue(octokit, options) {
var _a;
const { fieldName, value } = options;
const fieldLookup = await getFieldLookupObj(octokit, options);
const field = fieldLookup[fieldName];
if (!field) {
console.error(`Could not find field "${fieldName}" in project fields`);
return null;
}
const optionId = (_a = field.options.find((o) => o.name === value)) === null || _a === void 0 ? void 0 : _a.id;
if (!optionId) {
console.warn(`Could not find option for field "${fieldName}" and value "${value}"`, field.options);
return null;
}
else {
return {
optionId,
fieldId: field.id,
};
}
}