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

Method diffFromFile

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

Source from the content-addressed store, hash-verified

1017
1018 // async since it is overridden in a child class
1019 async diffFromFile(diff: GitHubCompareFile): Promise<Diff> {
1020 return {
1021 path: diff.filename,
1022 newFile: diff.status === 'added',
1023 sha: diff.sha || '',
1024 // media files diffs don't have a patch attribute, except svg files
1025 // renamed files don't have a patch attribute too
1026 binary: (diff.status !== 'renamed' && !diff.patch) || diff.filename.endsWith('.svg'),
1027 };
1028 }
1029
1030 async editorialWorkflowGit(
1031 files: TreeFile[],

Callers 2

editorialWorkflowGitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected