Skip to content

Commit

Permalink
refactor: move language check into exempted repo
Browse files Browse the repository at this point in the history
  • Loading branch information
tjsilver committed Jan 10, 2025
1 parent 83f2b52 commit 8bbb810
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,12 @@ export function repoIsExempted(
exemptedCustomProperties: github_repository_custom_properties[],
language: DepGraphLanguage,
): boolean {
const exemptedRepo = exemptedCustomProperties.find(
(property) => repo.id === property.repository_id,
);
if (exemptedRepo && exemptedRepo.value === language) {
const exemptedRepo: github_repository_custom_properties | undefined =
exemptedCustomProperties.find(
(property) =>
repo.id === property.repository_id && language === property.value,
);
if (exemptedRepo) {
logger.log({
message: `${repo.name} is exempted from dependency graph integration for ${language}`,
numexemptedCustomProperties: exemptedCustomProperties.length,
Expand Down

0 comments on commit 8bbb810

Please sign in to comment.