File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 77
77
env :
78
78
VERSION : ${{ github.event.inputs.version }}
79
79
LANGUAGE : ${{ github.event.inputs.language }}
80
+ # We don't want or need the changelog entries in this context.
81
+ # Pages that display the content from these isn't included
82
+ # in search index bodies anyway.
83
+ CHANGELOG_DISABLED : true
80
84
# If a reusable, or anything in the `data/*` directory is deleted
81
85
# you might get a
82
86
#
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import path from 'path'
5
5
import Parser from 'rss-parser'
6
6
7
7
const CHANGELOG_CACHE_FILE_PATH = process . env . CHANGELOG_CACHE_FILE_PATH
8
+ // This is useful to set when doing things like sync search.
9
+ const CHANGELOG_DISABLED = Boolean ( JSON . parse ( process . env . CHANGELOG_DISABLED || 'false' ) )
8
10
9
11
async function getRssFeed ( url ) {
10
12
const parser = new Parser ( { timeout : 5000 } )
@@ -22,6 +24,12 @@ async function getRssFeed(url) {
22
24
}
23
25
24
26
export async function getChangelogItems ( prefix , feedUrl , ignoreCache = false ) {
27
+ if ( CHANGELOG_DISABLED ) {
28
+ if ( process . env . NODE_ENV === 'development' ) {
29
+ console . warn ( `Downloading changelog (${ feedUrl } ) items is disabled.` )
30
+ }
31
+ return
32
+ }
25
33
if ( ! ignoreCache ) {
26
34
const fromCache = getChangelogItemsFromCache ( prefix , feedUrl )
27
35
if ( fromCache ) return fromCache
You can’t perform that action at this time.
0 commit comments