[MR Widget Eng] Remove License Compliance MR widget references to old approval_status codes
Once #335868 (closed) lands we need to then go back and update work done in !75341 (merged) for the MR widget extensions.
Change:
const APPROVAL_STATUS_TO_ICON = {
allowed: EXTENSION_ICONS.success,
approved: EXTENSION_ICONS.success,
denied: EXTENSION_ICONS.failed,
blacklisted: EXTENSION_ICONS.failed,
unclassified: EXTENSION_ICONS.notice,
};
const licenseSections = [
...(groupedLicenses.denied?.length > 0 || groupedLicenses.blacklisted?.length > 0 ? [{
header: s__('LicenseCompliance|Denied'),
text: s__(
"LicenseCompliance|Out-of-compliance with the project's policies and should be removed",
),
children: groupedLicenses.denied || groupedLicenses.blacklisted,
}] : []),
...(groupedLicenses.unclassified?.length > 0 ? [{
header: s__('LicenseCompliance|Uncategorized'),
text: s__('LicenseCompliance|No policy matches this license'),
children: groupedLicenses.unclassified,
}] : []),
...(groupedLicenses.allowed?.length > 0 || groupedLicenses.approved?.length > 0 ? [{
header: s__('LicenseCompliance|Allowed'),
text: s__('LicenseCompliance|Acceptable for use in this project'),
children: groupedLicenses.allowed || groupedLicenses.approved,
}] : []),
];
to
const licenseSections = [
...(groupedLicenses.denied?.length > 0 ? [{
header: s__('LicenseCompliance|Denied'),
text: s__(
"LicenseCompliance|Out-of-compliance with the project's policies and should be removed",
),
children: groupedLicenses.denied,
}] : []),
...(groupedLicenses.unclassified?.length > 0 ? [{
header: s__('LicenseCompliance|Uncategorized'),
text: s__('LicenseCompliance|No policy matches this license'),
children: groupedLicenses.unclassified,
}] : []),
...(groupedLicenses.allowed?.length > 0 ? [{
header: s__('LicenseCompliance|Allowed'),
text: s__('LicenseCompliance|Acceptable for use in this project'),
children: groupedLicenses.allowed,
}] : []),
];
const APPROVAL_STATUS_TO_ICON = {
allowed: EXTENSION_ICONS.success,
denied: EXTENSION_ICONS.failed,
unclassified: EXTENSION_ICONS.notice,
};
Testing
SET will update E2E/browser tests where needed to support changes to approval status codes.
Edited by Will Meek