Open Authoring bugfixes and pagination improvements (#2523)

* Fix handling of displayURLs which are strings

* Add fromFetchArguments to unsentRequest

* Add parseLinkHeader to backendUtil

* Handle paginated endpoints in GitHub API

* Rename fork workflow to Open Authoring across the whole repo

* Fixes for bugs in GitHub API introduced by Open Authoring changes

* Fix getDeployPreview

* Fix incorrect auth header formatting GitHub implementation

cf. https://github.com/netlify/netlify-cms/pull/2456#discussion_r309633387

* Remove unused and broken method from GitHub API

cf. https://github.com/netlify/netlify-cms/pull/2456#discussion_r308687145

* Fix editorialWorkflowGit method in GitHub API

* Request published entry content from origin repo

* Better error when deleting a published post in Open Authoring

* Rename to Open Authoring in fork request message

Also adds a note to the fork request message that an existing fork of
the same repo will be used automatically.

* fix linting
This commit is contained in:
Benaiah Mischenko
2019-08-24 10:54:59 -07:00
committed by Shawn Erquhart
parent 66da66affd
commit 34e1f09105
16 changed files with 223 additions and 151 deletions

View File

@ -17,17 +17,17 @@ At the same time, any contributors who _do_ have write access to the repository
- Your repo on GitHub must be public.
## Enabling the Open Authoring
## Enabling Open Authoring
1. [Enable the editorial workflow](/docs/configuration-options/#publish-mode) by setting `publish_mode` to `editorial_workflow` in your `config.yml`.
2. Set `fork_workflow` to `true` in the `backend` section of your `config.yml`, as follows:
2. Set `open_authoring` to `true` in the `backend` section of your `config.yml`, as follows:
```yaml
backend:
name: github
repo: owner-name/repo-name # Path to your GitHub repository
fork_workflow: true
open_authoring: true
```
## Usage