Skip to content

Commit b93ab70

Browse files
committed
[fix] problem link
1 parent 9c470df commit b93ab70

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

.github/workflows/today.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "leetcode-question-today"
22

33
on:
44
schedule:
5-
- cron: "0 12 * * *"
5+
- cron: "0 2 * * *" # 2 + 8 = 10 北京时间上午 10 点
66
workflow_dispatch:
77

88
jobs:

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
<!-- START doctoc generated TOC please keep comment here to allow auto update -->-- START doctoc generated TOC please keep comment here to allow auto update -->
1+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
22
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
33
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
44

5-
- [go-template](#go-template)
6-
- [feature](#feature)
7-
- [TODO](#todo)
5+
- [leetcode-question-today](#leetcode-question-today)
6+
- [效果图](#%E6%95%88%E6%9E%9C%E5%9B%BE)
7+
- [acknowledgement](#acknowledgement)
88

99
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
1010

1111
## leetcode-question-today
1212

1313
leetcode 每日一题推送
1414

15+
### 效果图
16+
17+
![slack](./img/slack.png)
18+
1519
### acknowledgement
1620

1721
- graphql

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module leetcode-question-today
33
go 1.16
44

55
require (
6-
github.com/cloud-org/msgpush v0.0.3 // indirect
6+
github.com/cloud-org/msgpush v0.0.3
77
github.com/machinebox/graphql v0.2.2
88
github.com/matryer/is v1.4.0 // indirect
99
github.com/pkg/errors v0.9.1 // indirect

img/slack.png

76.3 KB
Loading

main.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ import (
2828
"context"
2929
"flag"
3030
"fmt"
31-
"github.com/cloud-org/msgpush"
3231
"leetcode-question-today/api"
3332
"log"
3433
"os"
3534
"strings"
35+
36+
"github.com/cloud-org/msgpush"
3637
)
3738

3839
var (
@@ -89,8 +90,8 @@ LinkCN: %s`
8990
tags = append(tags, fmt.Sprintf("%s(%s)", tag.NameTranslated, tag.Name))
9091
}
9192
tagsValue := strings.Join(tags, "、")
92-
link := fmt.Sprintf("%s/%s", api.Leetcode, today.Question.TitleSlug)
93-
linkCn := fmt.Sprintf("%s/%s", api.LeetcodeCn, today.Question.TitleSlug)
93+
link := fmt.Sprintf("%s/problems/%s", api.Leetcode, today.Question.TitleSlug)
94+
linkCn := fmt.Sprintf("%s/problems/%s", api.LeetcodeCn, today.Question.TitleSlug)
9495

9596
content := fmt.Sprintf(msgTemplate, date, title, tagsValue, link, linkCn)
9697

0 commit comments

Comments
 (0)