(dataFiles: DataFile[], mediaFiles: AssetProxy[], options: PersistOptions)
| 554 | } |
| 555 | |
| 556 | async persistFiles(dataFiles: DataFile[], mediaFiles: AssetProxy[], options: PersistOptions) { |
| 557 | const files = [...dataFiles, ...mediaFiles]; |
| 558 | const subfolders = options.hasSubfolders !== false; // default to true |
| 559 | if (options.useWorkflow) { |
| 560 | const slug = dataFiles[0].slug; |
| 561 | return this.editorialWorkflowGit(files, slug, options); |
| 562 | } else { |
| 563 | const items = await this.getCommitItems(files, this.branch, subfolders); |
| 564 | |
| 565 | return this.uploadAndCommit(items, options.commitMessage, this.branch, true); |
| 566 | } |
| 567 | } |
| 568 | |
| 569 | async deleteFiles(paths: string[], comment: string) { |
| 570 | const ref = await this.getRef(this.branch); |
no test coverage detected