Skip to content

Commit

Permalink
fix: hide disabled options
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehurpeau committed Dec 17, 2023
1 parent 7f652a3 commit 5960e7b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/events/pr-handlers/actions/utils/body/updateBody.ts
Expand Up @@ -30,12 +30,17 @@ const toMarkdownOptions = (
) {
return null;
}
const labelDescription = labelKey && labelsConfig[labelKey];

if (labelKey && !labelDescription) {
// this option is not enabled
return null;
}

const checkboxWithId = `[${
options[key] ? 'x' : ' '
}] <!-- reviewflow-${key} -->`;

const labelDescription = labelKey && labelsConfig[labelKey];
const labelLink = labelDescription
? `[${labelDescription.name}](${repoLink}/labels/${encodeURIComponent(
labelDescription.name,
Expand Down

0 comments on commit 5960e7b

Please sign in to comment.