Skip to content

Commit 8f36d91

Browse files
fix branded_preview to avoid listing v2.json/v2.yaml files
1 parent 2a761db commit 8f36d91

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/scripts/branded_preview.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@ while IFS= read -r version; do
1616
versions+=("$version")
1717
done < <(jq -r '.[]' versions.json)
1818

19-
all_urls=(
20-
"https://raw.githubusercontent.com/mongodb/openapi/${branch_name:?}/openapi/v2.json"
21-
"https://raw.githubusercontent.com/mongodb/openapi/${branch_name:?}/openapi/v2.yaml"
22-
)
19+
all_urls=()
2320

2421
# Fetch and append file URLs from each version
2522
for version in "${versions[@]}"; do
23+
if [[ "${version}" == *"private"* ]]; then
24+
all_urls+=("https://raw.githubusercontent.com/mongodb/openapi/${branch_name:?}/openapi/v2/private/openapi-${version}.json")
25+
all_urls+=("https://raw.githubusercontent.com/mongodb/openapi/${branch_name:?}/openapi/v2/private/openapi-${version}.yaml")
26+
continue
27+
fi
28+
2629
all_urls+=("https://raw.githubusercontent.com/mongodb/openapi/${branch_name:?}/openapi/v2/openapi-${version}.json")
2730
all_urls+=("https://raw.githubusercontent.com/mongodb/openapi/${branch_name:?}/openapi/v2/openapi-${version}.yaml")
2831
done

0 commit comments

Comments
 (0)