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:
committed by
Shawn Erquhart
parent
66da66affd
commit
34e1f09105
@ -13,6 +13,12 @@ const fromURL = wholeURL => {
|
||||
return Map({ url, ...(allParamsString ? { params: decodeParams(allParamsString) } : {}) });
|
||||
};
|
||||
|
||||
const fromFetchArguments = (wholeURL, options) => {
|
||||
return fromURL(wholeURL).merge(
|
||||
(options ? fromJS(options) : Map()).remove('url').remove('params'),
|
||||
);
|
||||
};
|
||||
|
||||
const encodeParams = params =>
|
||||
params
|
||||
.entrySeq()
|
||||
@ -25,8 +31,8 @@ const toURL = req =>
|
||||
const toFetchArguments = req => [
|
||||
toURL(req),
|
||||
req
|
||||
.delete('url')
|
||||
.delete('params')
|
||||
.remove('url')
|
||||
.remove('params')
|
||||
.toJS(),
|
||||
];
|
||||
|
||||
@ -85,6 +91,7 @@ const withTimestamp = ensureRequestArg(req => withParams({ ts: new Date().getTim
|
||||
export default {
|
||||
toURL,
|
||||
fromURL,
|
||||
fromFetchArguments,
|
||||
performRequest,
|
||||
withMethod,
|
||||
withDefaultMethod,
|
||||
|
Reference in New Issue
Block a user