MCPcopy Create free account
hub / github.com/decaporg/decap-cms / persistFiles

Method persistFiles

packages/decap-cms-backend-bitbucket/src/API.ts:524–537  ·  view source on GitHub ↗
(dataFiles: DataFile[], mediaFiles: AssetProxy[], options: PersistOptions)

Source from the content-addressed store, hash-verified

522 }
523
524 async persistFiles(dataFiles: DataFile[], mediaFiles: AssetProxy[], options: PersistOptions) {
525 const files = [...dataFiles, ...mediaFiles];
526 const hasSubfolders = options.hasSubfolders !== false; // default to true
527 if (options.useWorkflow) {
528 const slug = dataFiles[0].slug;
529 return this.editorialWorkflowGit(files, slug, options);
530 } else {
531 return this.uploadFiles(files, {
532 commitMessage: options.commitMessage,
533 branch: this.branch,
534 hasSubfolders,
535 });
536 }
537 }
538
539 async addPullRequestComment(pullRequest: BitBucketPullRequest, comment: string) {
540 await this.requestJSON({

Callers 2

persistEntryMethod · 0.45
_persistMediaMethod · 0.45

Calls 2

editorialWorkflowGitMethod · 0.95
uploadFilesMethod · 0.95

Tested by

no test coverage detected