From 47de0bc89d21249b0aeb8e4d7cc8188ba7a3cc1f Mon Sep 17 00:00:00 2001 From: Thomas Sibley Date: Fri, 18 Aug 2023 14:02:19 -0700 Subject: [PATCH] Use symbolic ref "HEAD" instead of "master" in the GitHub URLs for our schema redirects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is robust to changes of default branch name, which is helpful if we ever make a blanket switch from "master" → "main" (as we really should). --- src/app.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/app.js b/src/app.js index eb80d1e8e..f6cb4aa5d 100644 --- a/src/app.js +++ b/src/app.js @@ -418,15 +418,15 @@ app.route("/cli") * to programmatic clients, though we're not this fancy yet. */ const schemaRoutes = [ - ["/schemas/augur/annotations", "https://raw.githubusercontent.com/nextstrain/augur/master/augur/data/schema-annotations.json"], - ["/schemas/augur/frequencies", "https://raw.githubusercontent.com/nextstrain/augur/master/augur/data/schema-frequencies.json"], - ["/schemas/auspice/config/v2", "https://raw.githubusercontent.com/nextstrain/augur/master/augur/data/schema-auspice-config-v2.json"], - ["/schemas/dataset/v1/meta", "https://raw.githubusercontent.com/nextstrain/augur/master/augur/data/schema-export-v1-meta.json"], - ["/schemas/dataset/v1/tree", "https://raw.githubusercontent.com/nextstrain/augur/master/augur/data/schema-export-v1-tree.json"], - ["/schemas/dataset/v2", "https://raw.githubusercontent.com/nextstrain/augur/master/augur/data/schema-export-v2.json"], - ["/schemas/dataset/root-sequence", "https://raw.githubusercontent.com/nextstrain/augur/master/augur/data/schema-export-root-sequence.json"], - ["/schemas/dataset/tip-frequencies", "https://raw.githubusercontent.com/nextstrain/augur/master/augur/data/schema-tip-frequencies.json"], - ["/schemas/dataset/measurements", "https://raw.githubusercontent.com/nextstrain/augur/master/augur/data/schema-measurements.json"], + ["/schemas/augur/annotations", "https://raw.githubusercontent.com/nextstrain/augur/HEAD/augur/data/schema-annotations.json"], + ["/schemas/augur/frequencies", "https://raw.githubusercontent.com/nextstrain/augur/HEAD/augur/data/schema-frequencies.json"], + ["/schemas/auspice/config/v2", "https://raw.githubusercontent.com/nextstrain/augur/HEAD/augur/data/schema-auspice-config-v2.json"], + ["/schemas/dataset/v1/meta", "https://raw.githubusercontent.com/nextstrain/augur/HEAD/augur/data/schema-export-v1-meta.json"], + ["/schemas/dataset/v1/tree", "https://raw.githubusercontent.com/nextstrain/augur/HEAD/augur/data/schema-export-v1-tree.json"], + ["/schemas/dataset/v2", "https://raw.githubusercontent.com/nextstrain/augur/HEAD/augur/data/schema-export-v2.json"], + ["/schemas/dataset/root-sequence", "https://raw.githubusercontent.com/nextstrain/augur/HEAD/augur/data/schema-export-root-sequence.json"], + ["/schemas/dataset/tip-frequencies", "https://raw.githubusercontent.com/nextstrain/augur/HEAD/augur/data/schema-tip-frequencies.json"], + ["/schemas/dataset/measurements", "https://raw.githubusercontent.com/nextstrain/augur/HEAD/augur/data/schema-measurements.json"], ]; for (const [schemaRoute, url] of schemaRoutes) {