From b67b193fdb1ac990d855bd9024a65128826df06a Mon Sep 17 00:00:00 2001 From: Shenglong Li Date: Tue, 5 Mar 2024 15:32:08 -0800 Subject: [PATCH] ci: Exclude archived BRM modules from module index data (#1140) Updated the script for generating module index data to exclude archived BRM modules. --- scripts/github-actions/generate-module-index-data.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/github-actions/generate-module-index-data.js b/scripts/github-actions/generate-module-index-data.js index d32f578e28..0489b525b1 100644 --- a/scripts/github-actions/generate-module-index-data.js +++ b/scripts/github-actions/generate-module-index-data.js @@ -79,6 +79,7 @@ async function getModuleDescription( */ async function generateModuleIndexData({ require, github, context, core }) { const fs = require("fs").promises; + const { existsSync } = require("fs"); const axios = require("axios").default; const moduleIndexData = []; @@ -91,6 +92,12 @@ async function generateModuleIndexData({ require, github, context, core }) { for (const moduleName of moduleNames) { const modulePath = `${moduleGroupPath}/${moduleName}`; + const archivedFilePath = `${modulePath}/ARCHIVED.md`; + + if (existsSync(archivedFilePath)) { + continue; + } + const mainJsonPath = `${modulePath}/main.json`; // BRM module git tags do not include the modules/ prefix. const mcrModulePath = modulePath.slice(8);