@@ -21222,6 +21222,14 @@ const getSchemaEntries = (schema) => {
2122221222 return [category_schema_entry, color_schema_entry];
2122321223};
2122421224
21225+ ;// CONCATENATED MODULE: ./src/utils/modifyRows.ts
21226+ const modifyRows = (recordMap, databaseId) => {
21227+ return Object.values(recordMap.block)
21228+ .filter((block) => block.value.id !== databaseId)
21229+ .map((block) => block.value)
21230+ .sort((rowA, rowB) => rowA.properties.title[0][0] > rowB.properties.title[0][0] ? 1 : -1);
21231+ };
21232+
2122521233;// CONCATENATED MODULE: ./src/index.ts
2122621234var src_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
2122721235 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -21240,6 +21248,7 @@ var src_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argu
2124021248
2124121249
2124221250
21251+
2124321252function main() {
2124421253 return src_awaiter(this, void 0, void 0, function* () {
2124521254 try {
@@ -21296,10 +21305,7 @@ function main() {
2129621305 .value;
2129721306 const { schema } = collection;
2129821307 const [category_schema_entry, color_schema_entry] = getSchemaEntries(schema);
21299- const rows = Object.values(recordMap.block)
21300- .filter((block) => block.value.id !== databaseId)
21301- .map((block) => block.value)
21302- .sort((rowA, rowB) => rowA.properties.title[0][0] > rowB.properties.title[0][0] ? 1 : -1);
21308+ const rows = modifyRows(recordMap, databaseId);
2130321309 if (rows.length === 0)
2130421310 return core.error('No database rows detected');
2130521311 else {
@@ -21322,6 +21328,7 @@ function main() {
2132221328 ...readmeLines.slice(endIdx)
2132321329 ];
2132421330 core.info(`Writing to ${README_PATH}`);
21331+ console.log(finalLines);
2132521332 external_fs_default().writeFileSync(README_PATH, finalLines.join('\n'));
2132621333 try {
2132721334 yield commitFile();
0 commit comments