QuestionNotifierをnewspaperからActiveSupport::Notificationsに移行#8982
QuestionNotifierをnewspaperからActiveSupport::Notificationsに移行#8982smallmonkeykey wants to merge 710 commits intomainfrom
Conversation
WalkthroughQuestionsController が Newspaper.publish から ActiveSupport::Notifications.instrument へ切り替わり、QuestionNotifier のサブスクライブ先を初期化ファイルへ移動し、Notifier#call のシグネチャが ActiveSupport::Notifications のコールバック形式(5引数)に変更されました。 Changes
Sequence Diagram(s)sequenceDiagram
participant Controller as QuestionsController
participant ASNotif as ActiveSupport::Notifications
participant Notifier as QuestionNotifier
Controller->>ASNotif: instrument('question.create'|'question.update', question)
ASNotif->>Notifier: call(_name, _started, _finished, _unique_id, payload)
Note right of Notifier: payload[:question] を取得し wip チェック
Notifier->>Notifier: 通知メッセージ生成・送信
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 RuboCop (1.76.1)app/controllers/questions_controller.rbrubocop-minitest extension supports plugin, specify app/models/question_notifier.rbrubocop-minitest extension supports plugin, specify config/initializers/active_support_notifications.rbrubocop-minitest extension supports plugin, specify Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
CIでprettierのlintエラー発生のため、prettier --write...コマンドで再試行、修正された2ファイルをcommitに含める
controllerの`render:json: @watches`を削除
コメントのMarkdown元テキストを表示するRawボタンの実装
…otifications-in-product-notifier Product系3クラス分newspaperをActiveSupport::Notificationsに移行
…nilla_js 質問一覧・詳細表示機能の非Vue化
243cac4 to
81e5021
Compare
…n-placeholder 未使用のloading-user-icon-placeholder.vueを削除
- DraftではないPRが作成されたときに自動実行 - komagataとokuramasafumiを3:2の確率で選択 - PR作成者自身は除外
PR作成時に自動でレビュワーを設定するGitHub Actionsを追加
81e5021 to
9df44bc
Compare
|
@Miya096jp |
|
お疲れ様です!はじめまして! |
他の箇所と同様にh3タグでパイプを使わない書き方に修正
…-text モーダルのメンターモード使用時の注意文言を更新
user が1箇所でしか出てこず、可読性向上のため
ヘッドレスだと失敗するテストを修正
…heck-test ローカル環境で通らなかったテストnotify comment and checkを通るように修正
9df44bc to
47eb351
Compare
|
@smallmonkeykey conflictの修正をお願いします。大変であれば新規にPRを作るのもいいと思います。 |
|
@komagata |
|
@smallmonkeykey もし不要でしたらこのブランチの削除をお願いします。(上にあるDelete branchボタンで削除できます) |
|
@komagata |
QuestionNotifierをnewspaperからActiveSupport::Notificationsに移行しました。
Issue
概要
log/development.logへMessage to Discord.が出力される仕組みになってます。変更確認方法
chore/replace-question_notifierブランチをローカルに取り込むforeman start -f Procfile.devでローカルで立ち上げますtail -f log/development.log | grep "Message to Discord"通知が飛んだ場合、Message to Discord. という出力があるかを確認できます
hajimeまたはkimuraでログインを行いますhttp://localhost:3000/questions/newで質問を作成します以下の3パターンを検証してください
1:WIP保存のみ
質問をWIPで保存してください
期待結果:Message to Discord. のログが出力されないことを確認してください
2:WIP → 公開に変更
上記で作成したWIPの質問を
質問を公開ボタンをクリックし公開してください期待結果:ログに Message to Discord. が出力されることを確認してください
3:質問を作成し、
登録するをクリックしてください期待結果:ログに Message to Discord. が出力されることを確認してください
例
このような表示がされます。
Screenshot
見た目に変更はないためスクリーンショットはありません。
Summary by CodeRabbit
新機能
リファクタ