Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit274c82f

Browse files
authored
use.problemSiteData instead of removed.problemList, fixes workflow
1 parenta59cf38 commit274c82f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

‎.github/workflows/updateCompletionTable.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,18 @@ const PREPEND_PATH = process.argv[2] || './';
2323
constTEMPLATE_PATH=process.argv[3]||'./README_template.md';
2424
constWRITE_PATH=process.argv[3]||'./README.md';
2525

26-
constPROBLEMS_OBJ=JSON.parse(fs.readFileSync('./.problemList.json','utf8'));
26+
constPROBLEM_SITE_DATA=JSON.parse(fs.readFileSync('./.problemSiteData.json','utf8'));
27+
28+
functioncreateProblemsObj(PROBLEM_SITE_DATA){
29+
letPROBLEMS_OBJ={}
30+
for(const{problem, pattern, link, code}ofPROBLEM_SITE_DATA){
31+
if(!(patterninPROBLEMS_OBJ))PROBLEMS_OBJ[pattern]=[]
32+
PROBLEMS_OBJ[pattern].push([problem,"https://leetcode.com/problems/"+link,code.slice(0,4)])
33+
}
34+
returnPROBLEMS_OBJ
35+
}
36+
37+
constPROBLEMS_OBJ=createProblemsObj(PROBLEM_SITE_DATA)
2738

2839
constgetDirectories=(source)=>
2940
readdirSync(source,{withFileTypes:true})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp