File tree 3 files changed +9
-7
lines changed
3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 7
7
![ ] ( https://img.shields.io/github/license/puiiyuen/leetcode-box )
8
8
![ ] ( https://img.shields.io/github/workflow/status/puiiyuen/leetcode-box/Update%20LeetCode%20gist )
9
9
---
10
- > 📌✨ For more pinned-gist projects like this one, check out: < https://github.com/matchai/awesome-pinned-gists >
10
+ > 📌✨ For more pinned-gist projects like this one, check out:
11
+ > https://github.com/matchai/awesome-pinned-gists
11
12
12
13
## Prep Work
13
14
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ async function updateLeetCodeGist(leetcode) {
32
32
const lines = [ ]
33
33
34
34
const title = [
35
- "Difficulty" . padEnd ( 12 ) ,
36
- "Solved" . padEnd ( 10 ) ,
35
+ "Difficulty" . padEnd ( 10 ) ,
36
+ "Solved" . padEnd ( 9 ) ,
37
37
"Accepted Rate" . padEnd ( 8 )
38
38
]
39
39
lines . push ( title . join ( " " ) )
@@ -44,14 +44,15 @@ async function updateLeetCodeGist(leetcode) {
44
44
const solvedRadio = leetcode . solved [ i ] . solvedRadio
45
45
46
46
const line = [
47
- difficulty . padEnd ( 12 ) ,
48
- solvedRadio . padEnd ( 10 ) ,
49
- generateBarChart ( acceptedRate , 21 ) ,
47
+ difficulty . padEnd ( 10 ) ,
48
+ solvedRadio . padEnd ( 9 ) ,
49
+ generateBarChart ( acceptedRate , 20 ) ,
50
50
String ( acceptedRate . toFixed ( 1 ) ) . padStart ( 5 ) + "%"
51
51
]
52
52
lines . push ( line . join ( " " ) )
53
53
}
54
54
55
+
55
56
try {
56
57
const filename = Object . keys ( gist . data . files ) [ 0 ]
57
58
await octokit . gists . update ( {
Original file line number Diff line number Diff line change 13
13
"axios" : " ^0.24.0" ,
14
14
"dotenv" : " ^10.0.0"
15
15
}
16
- }
16
+ }
You can’t perform that action at this time.
0 commit comments