fix(workflow): fix status not set on new workflow entries (#1558)
This commit is contained in:
parent
0692ad0e98
commit
0aa085f8d2
@ -14,8 +14,7 @@ export default class API {
|
|||||||
this.repo = config.repo || "";
|
this.repo = config.repo || "";
|
||||||
this.repoURL = `/repos/${ this.repo }`;
|
this.repoURL = `/repos/${ this.repo }`;
|
||||||
this.merge_method = config.squash_merges ? "squash" : "merge";
|
this.merge_method = config.squash_merges ? "squash" : "merge";
|
||||||
this.initialStatus = config.initialStatus;
|
this.initialWorkflowStatus = config.initialWorkflowStatus;
|
||||||
this.useWorkflow = config.useWorkflow;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
user() {
|
user() {
|
||||||
@ -346,7 +345,7 @@ export default class API {
|
|||||||
head: prResponse.head && prResponse.head.sha,
|
head: prResponse.head && prResponse.head.sha,
|
||||||
},
|
},
|
||||||
user: user.name || user.login,
|
user: user.name || user.login,
|
||||||
status: this.initialStatus,
|
status: this.initialWorkflowStatus,
|
||||||
branch: branchName,
|
branch: branchName,
|
||||||
collection: options.collectionName,
|
collection: options.collectionName,
|
||||||
title: options.parsedData && options.parsedData.title,
|
title: options.parsedData && options.parsedData.title,
|
||||||
|
@ -44,6 +44,7 @@ export default class GitHub {
|
|||||||
api_root: this.api_root,
|
api_root: this.api_root,
|
||||||
squash_merges: this.squash_merges,
|
squash_merges: this.squash_merges,
|
||||||
useWorkflow: this.options.useWorkflow,
|
useWorkflow: this.options.useWorkflow,
|
||||||
|
initialWorkflowStatus: this.options.initialWorkflowStatus,
|
||||||
});
|
});
|
||||||
return this.api.user().then(user =>
|
return this.api.user().then(user =>
|
||||||
this.api.hasWriteAccess().then((isCollab) => {
|
this.api.hasWriteAccess().then((isCollab) => {
|
||||||
|
@ -45,7 +45,6 @@ export default class TestRepo {
|
|||||||
constructor(config, options = {}) {
|
constructor(config, options = {}) {
|
||||||
this.config = config;
|
this.config = config;
|
||||||
this.assets = [];
|
this.assets = [];
|
||||||
this.initialStatus = config.initialStatus;
|
|
||||||
this.options = options;
|
this.options = options;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,7 +150,7 @@ export default class TestRepo {
|
|||||||
},
|
},
|
||||||
metaData: {
|
metaData: {
|
||||||
collection: options.collectionName,
|
collection: options.collectionName,
|
||||||
status: this.initialStatus,
|
status: this.options.initialWorkflowStatus,
|
||||||
title: options.parsedData && options.parsedData.title,
|
title: options.parsedData && options.parsedData.title,
|
||||||
description: options.parsedData && options.parsedData.description,
|
description: options.parsedData && options.parsedData.description,
|
||||||
},
|
},
|
||||||
|
@ -116,6 +116,7 @@ class Backend {
|
|||||||
this.implementation = implementation.init(config, {
|
this.implementation = implementation.init(config, {
|
||||||
useWorkflow: config.getIn(["publish_mode"]) === EDITORIAL_WORKFLOW,
|
useWorkflow: config.getIn(["publish_mode"]) === EDITORIAL_WORKFLOW,
|
||||||
updateUserCredentials: this.updateUserCredentials,
|
updateUserCredentials: this.updateUserCredentials,
|
||||||
|
initialWorkflowStatus: status.first(),
|
||||||
});
|
});
|
||||||
this.backendName = backendName;
|
this.backendName = backendName;
|
||||||
this.authStore = authStore;
|
this.authStore = authStore;
|
||||||
@ -396,7 +397,6 @@ class Backend {
|
|||||||
parsedData,
|
parsedData,
|
||||||
commitMessage,
|
commitMessage,
|
||||||
collectionName,
|
collectionName,
|
||||||
initialStatus: status.first(),
|
|
||||||
...updatedOptions
|
...updatedOptions
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user