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
@ -1,16 +1,16 @@
|
||||
import { Map } from 'immutable';
|
||||
import { USE_FORK_WORKFLOW } from 'Actions/auth';
|
||||
import { USE_OPEN_AUTHORING } from 'Actions/auth';
|
||||
/*
|
||||
* Reducer for some global UI state that we want to share between components
|
||||
* */
|
||||
const globalUI = (state = Map({ isFetching: false, useForkWorkflow: false }), action) => {
|
||||
const globalUI = (state = Map({ isFetching: false, useOpenAuthoring: false }), action) => {
|
||||
// Generic, global loading indicator
|
||||
if (action.type.indexOf('REQUEST') > -1) {
|
||||
return state.set('isFetching', true);
|
||||
} else if (action.type.indexOf('SUCCESS') > -1 || action.type.indexOf('FAILURE') > -1) {
|
||||
return state.set('isFetching', false);
|
||||
} else if (action.type === USE_FORK_WORKFLOW) {
|
||||
return state.set('useForkWorkflow', true);
|
||||
} else if (action.type === USE_OPEN_AUTHORING) {
|
||||
return state.set('useOpenAuthoring', true);
|
||||
}
|
||||
return state;
|
||||
};
|
||||
|
Reference in New Issue
Block a user