fix(backend-github): prepend collection name (#2878)
* fix(backend-github): prepend collection name * chore: prefer migrating entries * chore: cleanup * chore: move migration to listUnpublishedBranches * chore: prefer flowAsync * chore: feedback updates * refactor: extract current metadata version to a const * refactor: don't send pulls request on open authoring * test: update recorded data * fix: hardcode migration key/branch logic * test(backend-github): add unit tests for migration code * fix(github-graphql): add ref property to result of createBranch * test(cypress): update recorded data * fix: load unpublished entries once * fix: run migration for published draft entry * fix: failing test * chore: use hardcoded version number * fix: use hardcoded version number * test(cypress): update recorded data
This commit is contained in:
@ -14,6 +14,7 @@ import {
|
||||
filterPromisesWith,
|
||||
onlySuccessfulPromises,
|
||||
resolvePromiseProperties,
|
||||
flowAsync,
|
||||
then,
|
||||
} from './promise';
|
||||
import unsentRequest from './unsentRequest';
|
||||
@ -44,6 +45,7 @@ export const NetlifyCmsLibUtil = {
|
||||
filterPromisesWith,
|
||||
onlySuccessfulPromises,
|
||||
resolvePromiseProperties,
|
||||
flowAsync,
|
||||
then,
|
||||
unsentRequest,
|
||||
filterByPropExtension,
|
||||
@ -69,6 +71,7 @@ export {
|
||||
filterPromisesWith,
|
||||
onlySuccessfulPromises,
|
||||
resolvePromiseProperties,
|
||||
flowAsync,
|
||||
then,
|
||||
unsentRequest,
|
||||
filterByPropExtension,
|
||||
|
@ -33,3 +33,6 @@ export const onlySuccessfulPromises = flow([
|
||||
then(Promise.all.bind(Promise)),
|
||||
then(filter(maybeValue => maybeValue !== filterPromiseSymbol)),
|
||||
]);
|
||||
|
||||
const wrapFlowAsync = fn => async arg => fn(await arg);
|
||||
export const flowAsync = fns => flow(fns.map(fn => wrapFlowAsync(fn)));
|
||||
|
Reference in New Issue
Block a user