refactor: News rake タスクの統合と一貫性向上#1759
Merged
Merged
Conversation
Issue #1757 の一部として、分離されていた news:fetch と news:import_from_yaml を 単一の news:upsert タスクに統合。他の rake タスクとの設計一貫性を保つ。 変更内容: - lib/tasks/fetch_news.rake と lib/tasks/import_news.rake を削除 - lib/tasks/news.rake を新規作成(統合版) - RSS フィードからデータベースまでを一貫処理 - 後方互換性のためエイリアスタスクを提供 他のタスクとの一貫性: - podcasts:upsert (RSS → DB 直接) - dojo_event_services:upsert (YAML → DB 直接) - 同様の統合パターンを採用
RSS取得・インポートタスクなので、後方互換性は不要。 よりシンプルな実装に変更。 - news:fetch エイリアスを削除 - news:import_from_yaml エイリアスを削除 - news:upsert のみ提供
- news:fetch: RSS → YAML(フィード取得) - news:upsert: YAML → DB(データベース投入) dojos タスクと同様の明確な役割分離を実現: - dojos:update_db_by_yaml (YAML → DB) - dojos:migrate_adding_id_to_yaml (DB → YAML) upsert の命名規則に従い、YAML からの DB 投入を upsert とする。
script/release.sh でタスク名を更新し、統合された news.rake の 正しいタスク名を使用する。
This was referenced Nov 1, 2025
Closed
7 tasks
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.
概要
分離されていた news rake タスクをリファクタリングし、他のタスクとの設計一貫性を向上させました。
変更内容
🔄 Rake タスクのリファクタリング
lib/tasks/fetch_news.rakeとlib/tasks/import_news.rakeを削除lib/tasks/news.rakeを新規作成(統合版)📋 明確な役割分離(dojos タスクと同様)
news:fetchnews:upsert参考:既存の dojos タスクも同様の分離
dojos:update_db_by_yaml(YAML → DB)dojos:migrate_adding_id_to_yaml(DB → YAML)🎯 命名規則の一貫性
upsert= YAML からデータベースへの投入fetch= 外部ソースからの取得🔄 運用フローの更新
script/release.sh:news:import_from_yaml→news:upsertに変更.github/workflows/daily.yml: 既にnews:fetchを使用(変更不要)📅 処理フローの分離
名前重要の原則fetch(外部→ファイル),upsert(ファイル→DB)関連 Issue
Closes part of #1757 - News タスクの統合とコード整理