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:
Bartholomew
2019-11-26 09:40:27 +01:00
committed by Erez Rokah
parent 695b0e0380
commit 465f463959
45 changed files with 16553 additions and 16755 deletions

View File

@ -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,

View File

@ -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)));