From 3fd62b5378cc5b879c1a7f351c4ebd02e5013141 Mon Sep 17 00:00:00 2001 From: AlexandreGaubert <40125772+AlexandreGaubert@users.noreply.github.com> Date: Mon, 25 Sep 2023 15:32:36 +0200 Subject: [PATCH] fix: Move json-schema to static folder to be served correctly (#2251) Moving the json-schema to a `static` folder at the root of the project. The content of `static` is automatically put in the `public` folder at build time. Which makes it available on the server in production. --- src/components/ActionOptionsTable.tsx | 2 +- src/components/ConfigOptions.tsx | 2 +- src/components/OptionsTable.tsx | 2 +- src/components/PullRequestAttributesTable.jsx | 2 +- {src/content => static}/mergify-configuration-openapi.json | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename {src/content => static}/mergify-configuration-openapi.json (100%) diff --git a/src/components/ActionOptionsTable.tsx b/src/components/ActionOptionsTable.tsx index 5d0798591e..0847a2b068 100644 --- a/src/components/ActionOptionsTable.tsx +++ b/src/components/ActionOptionsTable.tsx @@ -1,4 +1,4 @@ -import configSchema from '../content/mergify-configuration-openapi.json'; +import configSchema from '../../static/mergify-configuration-openapi.json'; import { OptionDefinition } from './ConfigOptions'; import { OptionsTableBase } from './OptionsTable'; diff --git a/src/components/ConfigOptions.tsx b/src/components/ConfigOptions.tsx index bd7d8137e0..d874702c40 100644 --- a/src/components/ConfigOptions.tsx +++ b/src/components/ConfigOptions.tsx @@ -5,7 +5,7 @@ import React from 'react'; import ReactMarkdown from 'react-markdown'; -import configSchema from '../content/mergify-configuration-openapi.json'; +import configSchema from '../../static/mergify-configuration-openapi.json'; import InlineCode from './InlineCode'; import { mdxComponents } from './Page'; diff --git a/src/components/OptionsTable.tsx b/src/components/OptionsTable.tsx index e70174c75f..88f8ddb657 100644 --- a/src/components/OptionsTable.tsx +++ b/src/components/OptionsTable.tsx @@ -5,7 +5,7 @@ import * as yaml from 'js-yaml'; import React from 'react'; import ReactMarkdown from 'react-markdown'; -import configSchema from '../content/mergify-configuration-openapi.json'; +import configSchema from '../../static/mergify-configuration-openapi.json'; import { getValueType, OptionDefinition } from './ConfigOptions'; diff --git a/src/components/PullRequestAttributesTable.jsx b/src/components/PullRequestAttributesTable.jsx index f9c40e7d26..fcbad343e6 100644 --- a/src/components/PullRequestAttributesTable.jsx +++ b/src/components/PullRequestAttributesTable.jsx @@ -5,7 +5,7 @@ import React from 'react'; import ReactMarkdown from 'react-markdown'; -import configSchema from '../content/mergify-configuration-openapi.json'; +import configSchema from '../../static/mergify-configuration-openapi.json'; import { getValueType } from './ConfigOptions'; diff --git a/src/content/mergify-configuration-openapi.json b/static/mergify-configuration-openapi.json similarity index 100% rename from src/content/mergify-configuration-openapi.json rename to static/mergify-configuration-openapi.json