diff --git a/src/utility/git.ts b/src/utility/git.ts new file mode 100644 index 00000000..97c32e71 --- /dev/null +++ b/src/utility/git.ts @@ -0,0 +1,8 @@ +const GITHUB_API_URL = + 'https://api.github.com/repos/sambecker/exif-photo-blog/commits/main'; + +export const fetchLatestRepoCommit = async () => { + const response = await fetch(GITHUB_API_URL); + const data = await response.json(); + return data.sha.slice(0, 7); +};