File tree Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -9847,6 +9847,18 @@ const core_1 = __importDefault(__webpack_require__(470));
98479847const endpoints_1 = __webpack_require__(897);
98489848const fs_1 = __importDefault(__webpack_require__(747));
98499849const utils_1 = __webpack_require__(326);
9850+ const ColorMap = {
9851+ default: '505558',
9852+ gray: '979a9b',
9853+ brown: '695b55',
9854+ orange: '9f7445',
9855+ yellow: '9f9048',
9856+ green: '467870',
9857+ blue: '487088',
9858+ purple: '6c598f',
9859+ pink: '904d74',
9860+ red: '9f5c58'
9861+ };
98509862async function main() {
98519863 try {
98529864 const databaseId = core_1.default.getInput('database_id');
@@ -9934,7 +9946,7 @@ async function main() {
99349946 const newLines = [];
99359947 for (const [category, category_info] of categories_map) {
99369948 const content = [
9937- `<div><img height="20px" src="https://img.shields.io/badge/${category}-${category_info.color}"/></div>`
9949+ `<div><img height="20px" src="https://img.shields.io/badge/${category}-${ColorMap[ category_info.color] }"/></div>`
99389950 ];
99399951 category_info.items.forEach((item) => content.push(`<img src="https://img.shields.io/badge/-${item}-black?style=flat-square&logo=${item}" alt="${item}">`));
99409952 newLines.push(...content, '<hr>');
Original file line number Diff line number Diff line change @@ -10,6 +10,19 @@ import {
1010import fs from 'fs' ;
1111import { commitFile } from './utils' ;
1212
13+ const ColorMap : Record < TTextColor , string > = {
14+ default : '505558' ,
15+ gray : '979a9b' ,
16+ brown : '695b55' ,
17+ orange : '9f7445' ,
18+ yellow : '9f9048' ,
19+ green : '467870' ,
20+ blue : '487088' ,
21+ purple : '6c598f' ,
22+ pink : '904d74' ,
23+ red : '9f5c58'
24+ } as any ;
25+
1326async function main ( ) {
1427 try {
1528 const databaseId = core . getInput ( 'database_id' ) ;
@@ -137,7 +150,9 @@ async function main() {
137150
138151 for ( const [ category , category_info ] of categories_map ) {
139152 const content = [
140- `<div><img height="20px" src="https://img.shields.io/badge/${ category } -${ category_info . color } "/></div>`
153+ `<div><img height="20px" src="https://img.shields.io/badge/${ category } -${
154+ ColorMap [ category_info . color ]
155+ } "/></div>`
141156 ] ;
142157 category_info . items . forEach ( ( item ) =>
143158 content . push (
You can’t perform that action at this time.
0 commit comments