chore: move to bun (#17)

* chore: move to bun

* fix: remind user to change draft status
This commit is contained in:
2024-06-25 23:23:59 +02:00
committed by GitHub
parent 40c6791dd4
commit c291053939
4 changed files with 12 additions and 1331 deletions

BIN
bun.lockb Executable file

Binary file not shown.

View File

@@ -3,21 +3,21 @@
"version": "2.0.0",
"license": "MIT",
"scripts": {
"db:deploy": "yarn db:generate && drizzle-kit migrate",
"db:deploy": "bun db:generate && drizzle-kit migrate",
"db:generate": "drizzle-kit generate:sqlite",
"dev": "yarn studio & tsc-watch -w --onSuccess \"node dist/index.js\"",
"dev": "bun studio & tsc-watch -w --onSuccess \"node dist/index.js\"",
"build": "tsc",
"start": "node dist/index.js",
"studio": "drizzle-kit studio"
},
"dependencies": {
"@hono/node-server": "^1.11.1",
"@libsql/client": "^0.6.0",
"@libsql/client": "^0.7.0",
"@octokit/webhooks-types": "^7.5.1",
"dotenv": "^16.4.5",
"drizzle-orm": "^0.31.2",
"hono": "^4.2.9",
"octokit": "^3.2.0",
"octokit": "^4.0.2",
"zod": "^3.23.8"
},
"devDependencies": {

View File

@@ -92,6 +92,14 @@ app.post('/ev/readyToMerge', async (c) => {
await react(body.repository.owner.login, body.repository.name, body.comment.id, Reaction.MINUS_ONE)
return c.json({ ok: false, message: 'you cannot approve your own PR' }, 418)
}
if (body.issue.draft) {
return octokit.rest.issues.createComment({
body: `Please change the draft status of the PR and re-run the command to merge.`,
issue_number: body.issue.number,
owner: body.repository.owner.login,
repo: body.repository.name,
})
}
await db.update(schema.rtmAuthor).set({ mergerId: body.comment.user.id.toString() }).where(
and(
eq(schema.rtmAuthor.issueNumber, body.issue.number.toString()),

1327
yarn.lock

File diff suppressed because it is too large Load Diff