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

Method persistFiles

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

Source from the content-addressed store, hash-verified

525 }
526
527 async persistFiles(dataFiles: DataFile[], mediaFiles: AssetProxy[], options: PersistOptions) {
528 const files = [...dataFiles, ...mediaFiles];
529 const hasSubfolders = options.hasSubfolders !== false; // default to true
530 if (options.useWorkflow) {
531 const slug = dataFiles[0].slug;
532 return this.editorialWorkflowGit(files, slug, options);
533 } else {
534 return this.uploadFiles(files, {
535 commitMessage: options.commitMessage,
536 branch: this.branch,
537 hasSubfolders,
538 });
539 }
540 }
541
542 async addPullRequestComment(pullRequest: BitBucketPullRequest, comment: string) {
543 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