refactor(github-content): expose conflict info and add latest-sha lookup

updateFile/createFile now return { sha, conflict } so 409/422 from GitHub
can drive a UI flow instead of being swallowed as a generic save error.
Also adds fetchLatestSha(path) for cheap freshness checks against HEAD.
This commit is contained in:
Julien Calixte
2026-05-03 23:32:37 +02:00
parent dffee40776
commit d8a59467a0
3 changed files with 34 additions and 8 deletions

View File

@@ -74,7 +74,7 @@ export const useCheckboxCommit = ({
isCommitting.value = true
const newSha = await updateFile({
const { sha: newSha } = await updateFile({
content: pendingContent.value,
path: pathValue,
sha: currentSha.value