Skip to content

Commit

Permalink
ci: 增加 TODO issue 的管理
Browse files Browse the repository at this point in the history
  • Loading branch information
CaoMeiYouRen committed Oct 5, 2024
1 parent b3e7b7c commit 8fb2914
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Run TODO to Issue
on:
push:
branches:
- master
# 仅取消针对当前工作流正在进行的作业或运行
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
permissions:
issues: write
contents: read
timeout-minutes: 10
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- name: "TODO to Issue"
uses: "alstr/todo-to-issue-action@v4"
1 change: 1 addition & 0 deletions src/routes/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ app.post('/loginByOAuth', async (c) => {
const userRepository = (await getDataSource()).getRepository(User)
const user = await userRepository.findOneBy({ wechatOpenid })
const token = await getJwtToken({ id: user.id })
// TODO token 不应该直接发给前端
const redirectUrl = `${OAUTH_REDIRECT_URL}?token=${token}`
return c.redirect(redirectUrl, 302)
})
Expand Down

0 comments on commit 8fb2914

Please sign in to comment.