Create convenience function for getting latest repo commit sha

This commit is contained in:
Sam Becker 2025-01-29 23:49:20 -06:00
parent 9a01a877a8
commit 8f7b973323

8
src/utility/git.ts Normal file
View File

@ -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);
};