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

Method diffFromFile

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

Source from the content-addressed store, hash-verified

992
993 // async since it is overridden in a child class
994 async diffFromFile(diff: GitHubCompareFile): Promise<Diff> {
995 return {
996 path: diff.filename,
997 newFile: diff.status === 'added',
998 sha: diff.sha || '',
999 // media files diffs don't have a patch attribute, except svg files
1000 // renamed files don't have a patch attribute too
1001 binary: (diff.status !== 'renamed' && !diff.patch) || diff.filename.endsWith('.svg'),
1002 };
1003 }
1004
1005 async editorialWorkflowGit(
1006 files: TreeFile[],

Callers 2

editorialWorkflowGitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected