Skip to content

Commit d97bf29

Browse files
committed
Add CoderDojo Japan's PR TIMES RSS feed to news fetching
This commit adds the PR TIMES RSS feed (company_id: 38935) to the RSS_FEED_LIST in the news:fetch rake task. This enables automatic fetching and display of CoderDojo Japan's press releases from PR TIMES alongside the existing news feed. The news items from both feeds will be: - Fetched daily via GitHub Actions workflow - Merged and saved to db/news.yml - Displayed on the homepage news section (最近の CoderDojo) PR TIMES RSS feed URL: https://prtimes.jp/companyrdf.php?company_id=38935
1 parent 0bc1c3f commit d97bf29

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/tasks/news.rake

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ namespace :news do
1414
logger.info('==== START news:fetch ====')
1515

1616
# 本番/開発環境では実フィード、それ以外(テスト環境など)ではテスト用フィード
17-
DOJO_NEWS_FEED = 'https://news.coderdojo.jp/feed/'
18-
TEST_NEWS_FEED = Rails.root.join('spec', 'fixtures', 'sample_news.rss')
19-
RSS_FEED_LIST = (Rails.env.test? || Rails.env.staging?) ?
17+
DOJO_NEWS_FEED = 'https://news.coderdojo.jp/feed/'
18+
PRTIMES_NEWS_FEED = 'https://prtimes.jp/companyrdf.php?company_id=38935'
19+
TEST_NEWS_FEED = Rails.root.join('spec', 'fixtures', 'sample_news.rss')
20+
RSS_FEED_LIST = (Rails.env.test? || Rails.env.staging?) ?
2021
[TEST_NEWS_FEED] :
21-
[DOJO_NEWS_FEED]
22+
[DOJO_NEWS_FEED, PRTIMES_NEWS_FEED]
2223

2324
# RSS のデータ構造を、News のデータ構造に変換
2425
fetched_items = RSS_FEED_LIST.flat_map do |feed|

0 commit comments

Comments
 (0)