@@ -21013,6 +21013,14 @@ module.exports = require("path");;
2101321013
2101421014/***/ }),
2101521015
21016+ /***/ 1191:
21017+ /***/ ((module) => {
21018+
21019+ "use strict";
21020+ module.exports = require("querystring");;
21021+
21022+ /***/ }),
21023+
2101621024/***/ 2413:
2101721025/***/ ((module) => {
2101821026
@@ -21104,6 +21112,7 @@ const core = __nccwpck_require__(2186);
2110421112const { NotionEndpoints } = __nccwpck_require__(1109);
2110521113const fs = __nccwpck_require__(5747);
2110621114const { commitFile } = __nccwpck_require__(1608);
21115+ const qs = __nccwpck_require__(1191);
2110721116
2110821117const ColorMap = {
2110921118 default: '505558',
@@ -21198,12 +21207,21 @@ async function main() {
2119821207 ([, schema_entry_value]) =>
2119921208 schema_entry_value.type === 'multi_select' &&
2120021209 schema_entry_value.name === 'Category'
21210+ ),
21211+ color_schema_entry = schema_entries.find(
21212+ ([, schema_entry_value]) =>
21213+ schema_entry_value.type === 'text' &&
21214+ schema_entry_value.name === 'Color'
2120121215 );
2120221216
2120321217 if (!category_schema_entry)
2120421218 return core.setFailed(
2120521219 "Couldn't find Category named multi_select type column in the database"
2120621220 );
21221+ if (!category_schema_entry)
21222+ return core.setFailed(
21223+ "Couldn't find Color named text type column in the database"
21224+ );
2120721225
2120821226 const rows = Object.values(recordMap.block)
2120921227 .filter((block) => block.value.id !== databaseId)
@@ -21240,13 +21258,15 @@ async function main() {
2124021258
2124121259 for (const [category, category_info] of categories_map) {
2124221260 const content = [
21243- `<div ><img height="20px" src="https://img.shields.io/badge/${category}-${
21261+ `<h3 ><img height="20px" src="https://img.shields.io/badge/${category}-${
2124421262 ColorMap[category_info.color]
21245- }"/></div >`
21263+ }"/></h3 >`
2124621264 ];
2124721265 category_info.items.forEach((item) =>
2124821266 content.push(
21249- `<img src="https://img.shields.io/badge/-${item}-black?style=flat-square&logo=${item}" alt="${item}">`
21267+ `<img src="https://img.shields.io/badge/-${qs.stringify(item)}-${
21268+ item.properties[color_schema_entry[0]][0][0]
21269+ }?style=flat-square&logo=${qs.stringify(item)}" alt="${item}"/>`
2125021270 )
2125121271 );
2125221272 newLines.push(...content, '<hr>');
0 commit comments