migrate GitLab backend

This commit is contained in:
Shawn Erquhart
2018-07-23 12:14:53 -04:00
parent 33f490055d
commit faab1e38ba
18 changed files with 149 additions and 73 deletions

View File

@ -43,10 +43,11 @@ const getFolderEntries = (folder, extension) => {
};
export default class TestRepo {
constructor(config) {
constructor(config, options = {}) {
this.config = config;
this.assets = [];
this.initialStatus = config.initialStatus;
this.options = options;
}
authComponent() {
@ -135,7 +136,7 @@ export default class TestRepo {
}
persistEntry({ path, raw, slug }, mediaFiles = [], options = {}) {
if (options.useWorkflow) {
if (this.options.useWorkflow) {
const unpubStore = window.repoFilesUnpublished;
const existingEntryIndex = unpubStore.findIndex(e => e.file.path === path);
if (existingEntryIndex >= 0) {