Update github.js

This commit is contained in:
Sam Poder 2023-02-22 10:48:51 +08:00 committed by GitHub
parent a76e1dc705
commit 6f41eaf8e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,7 @@ export default async function github(req, res) {
: null,
message:
x.type === 'PushEvent'
? x.payload.commits[0].message
? x.payload.commits[0]?.message
: x.type === 'PullRequestEvent'
? x.payload.pull_request.title
: x.type === 'WatchEvent'