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

Method diffFromFile

packages/decap-cms-backend-github/src/API.ts:1032–1041  ·  view source on GitHub ↗
(diff: GitHubCompareFile)

Source from the content-addressed store, hash-verified

1030
1031 // async since it is overridden in a child class
1032 async diffFromFile(diff: GitHubCompareFile): Promise<Diff> {
1033 return {
1034 path: diff.filename,
1035 newFile: diff.status === 'added',
1036 sha: diff.sha || '',
1037 // media files diffs don't have a patch attribute, except svg files
1038 // renamed files don't have a patch attribute too
1039 binary: (diff.status !== 'renamed' && !diff.patch) || diff.filename.endsWith('.svg'),
1040 };
1041 }
1042
1043 async editorialWorkflowGit(
1044 files: TreeFile[],

Callers 2

editorialWorkflowGitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected