let me cook
Some checks are pending
CI / test (push) Waiting to run

This commit is contained in:
Corey Johnson 2025-11-12 09:55:23 -08:00
parent c85c61ed95
commit 726961ca99

View File

@ -5,6 +5,11 @@ import { ChannelType } from "discord.js"
import { assertNever } from "@workshop/shared/utils"
export const handleGiteaWebhook = async (payload: GiteaWebhook) => {
const isDev = process.env.NODE_ENV !== "production"
if (!isDev && payload.repository.name === "🧪") {
return
}
if ("pull_request" in payload) {
if (payload.action === "opened") {
await handlePullRequestOpened(payload)
@ -143,7 +148,6 @@ ${pullRequest.html_url}
const formatComment = async (comment: { body: string; user: GiteaUser }): Promise<string> => {
const authorName = mapGiteaUserToDiscord(comment.user.login)
console.log(`🌭`, { authorName, comment: comment.user.login })
const messageBody = await convertMentionsToDiscord(comment.body)
return `**${authorName}**: ${messageBody}`