Repository navigation
Conversation
- 書いた人をメンションし、タイトル(元記事へのリンク)・説明・サムネイル・媒体・公開日を Embed で出す - 通知は after() でレスポンスのあとに送り、失敗しても登録は成功のままにする - 通知先は BLOG_NOTIFICATION_CHANNEL_ID。本番だけ設定し、未設定の環境では送らない Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Deployed on https://dev-pr-357-birbz3fm6q-an.a.run.app |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #356
概要
外部ブログ記事を新規登録したとき、Discord の専用チャンネルに Bot で通知します。編集・削除では送りません。
通知の中身
<@id>) で表示実装
lib/blog-notification.ts: Embed の組み立て (buildBlogNotification) と送信 (notifyBlogChannel)app/api/blogs/route.ts: 登録成功後に Next.js のafter()で送信。レスポンスを待たせず、通知に失敗しても登録は成功のまま (ログだけ残す)lib/discord-dm.ts:DiscordEmbed型にurl/imageを追加BLOG_NOTIFICATION_CHANNEL_ID。未設定 (空文字・空白のみ) の環境では送らないinfra/variables.tf: prd だけにBLOG_NOTIFICATION_CHANNEL_ID = "1563415197232795718"を追加 (dev / stg は通知しない)マージ後に必要な作業
テスト
🤖 Generated with Claude Code