Skip to content

fix: missing primary key; build failure #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default function command(ctx: Context, github: GitHub) {
return session.text('.add-failed', [name])
}
}
await ctx.database.create('github', { name, id: data.id, secret })
await ctx.database.create('github', { name, id: data.data.id, secret })
if (!options.subscribe) return session.text('.add-succeeded', [name])
return session.execute({
name: 'github',
Expand Down Expand Up @@ -264,8 +264,8 @@ export default function command(ctx: Context, github: GitHub) {
// 202:服务器已接受请求,但尚未处理
// 在 github.repos -a 时确保获得一个 2xx 的状态码
if (!data) return _ctx.status = 202
if (signature !== `sha256=${createHmac('sha256', data.secret).update(_ctx.request.rawBody).digest('hex')}`) {
return _ctx.status = 403
if (signature !== `sha256=${createHmac('sha256', data.secret).update((_ctx.request as any).rawBody).digest('hex')}`) {
return _ctx.status = 403
}
const fullName = payload.repository.full_name.toLowerCase()

Expand Down
Loading