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.
概要
Issue #1757 の作業として、分離されていた 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を使用(変更不要)📅 処理フローの分担
To-Do アクション
🔍 テストとバリデーション
news:fetchでRSSフィードが正しくYAMLに保存されるか確認news:upsertでYAMLからDBに正しく投入されるか確認news:upsert動作確認📅 運用設定の確認
script/release.shのタスク名を更新検証済み事項
✅
rails -T newsで2つのタスクが正しく表示される✅ 役割が明確に分離されている
✅ dojos タスクと同様の設計パターン
✅ 運用フローとの整合性を確保
学んだ設計原則
fetch(外部→ファイル),upsert(ファイル→DB)関連 Issue
Closes part of #1757 - News タスクの統合とコード整理