diff --git a/messages/git-error.md b/messages/git-error.md new file mode 100644 index 0000000000..a6729f0d4c --- /dev/null +++ b/messages/git-error.md @@ -0,0 +1,9 @@ +# Git: Error + +An error occurred while syncing models to Prismic from a Git repository. + +### How to fix the issue + +Sync the project again by committing to the repository. + +If the issue is not resolved, please check the [Prismic Help Center](https://prismic.io/docs/help-center). diff --git a/messages/git-invalid-slice-machine-config.md b/messages/git-invalid-slice-machine-config.md new file mode 100644 index 0000000000..33571dc36b --- /dev/null +++ b/messages/git-invalid-slice-machine-config.md @@ -0,0 +1,26 @@ +# Git: Invalid Slice Machine config + +The Git repository's Slice Machine configuration file (`slicemachine.config.json`) was not valid. + +Any of the following issues could cause this error: + +- Missing required properties, such as `repositoryName` and `adapter`. +- Invalid values given to configuration properties. +- Invalid JSON with incorrect syntax. + +## How to fix the issue + +Update the project's Slice Machine configuration file, fixing any syntax errors or incorrect properties. + +A basic Slice Machine configuration file looks like this: + +```json +// slicemachine.config.json + +{ + "repositoryName": "example-prismic-repo", + "adapter": "@slicemachine/adapter-next", + "libraries": ["./src/slices"], + "localSliceSimulatorURL": "http://localhost:3000/slice-simulator" +} +``` diff --git a/messages/git-unauthorized-github.md b/messages/git-unauthorized-github.md new file mode 100644 index 0000000000..e9960be400 --- /dev/null +++ b/messages/git-unauthorized-github.md @@ -0,0 +1,12 @@ +# Git: Unauthorized GitHub access + +The GitHub app tried to make a request to GitHub, but failed due to unauthorized access. + +This error can occur when your GitHub access token expires. Note that GitHub access tokens are managed for you by installing the Prismic GitHub app and is not something you need to manage manually. + +## How to fix the issue + +If the error occurs continuously, try the following steps: + +1. On GitHub, uninstall the Prismic GitHub app. +2. In Slice Machine, navigate to the Settings page and re-install the Prismic GitHub app. diff --git a/messages/git-unauthorized-prismic.md b/messages/git-unauthorized-prismic.md new file mode 100644 index 0000000000..27845573b6 --- /dev/null +++ b/messages/git-unauthorized-prismic.md @@ -0,0 +1,19 @@ +# Git: Unauthorized Prismic access + +The GitHub app tried to make a request to Prismic, but failed due to unauthorized access. + +This error can occur when syncing model changes to Prismic from GitHub with an invalid Prismic Write API token. + +## How to fix the issue + +Re-connect the Prismic and GitHub repositories, ensuring the Write API token is active and correct: + +1. In Slice Machine's Settings page, disconnect the connected GitHub repository. +1. Re-connect the GitHub repository. +1. When asked for a Write API token, provide a valid token. + +Tokens can be created following these steps: + +1. In the Prismic repository, navigate to the Settings page. +1. Select **API & Security** in the sidebar and the **Write APIs** tab at the top of the page. +1. Create and copy a new Write API token or copy an existing token. diff --git a/messages/git-unsupported-adapter.md b/messages/git-unsupported-adapter.md new file mode 100644 index 0000000000..6265103689 --- /dev/null +++ b/messages/git-unsupported-adapter.md @@ -0,0 +1,30 @@ +# Git: Unsupported adapter + +The Slice Machine project uses an adapter that is not supported in the GitHub app. + +The following adapters are supported: + +- [`@slicemachine/adapter-next`](https://github.com/prismicio/slice-machine/tree/main/packages/adapter-next#readme): Next.js projects. +- [`@slicemachine/adapter-nuxt`](https://github.com/prismicio/slice-machine/tree/main/packages/adapter-nuxt#readme): Nuxt projects. +- [`@slicemachine/adapter-sveltekit`](https://github.com/prismicio/slice-machine/tree/main/packages/adapter-sveltekit#readme): SvelteKit projects. + +### How to fix the issue + +Use a supported adapter. + +You can verify which adapter your project uses by checking the `adapter` property in your project's `slicemachine.config.json`. + +A basic Slice Machine configuration file looks like this: + +```jsonc +// slicemachine.config.json + +{ + "repositoryName": "example-prismic-repo", + "adapter": "@slicemachine/adapter-next", + "libraries": ["./src/slices"], + "localSliceSimulatorURL": "http://localhost:3000/slice-simulator" +} +``` + +If you would like us to support your adapter, please [open a feature request](https://github.com/prismicio/slice-machine/issues/new/choose).