Create convenience function for getting latest repo commit sha
This commit is contained in:
parent
9a01a877a8
commit
8f7b973323
8
src/utility/git.ts
Normal file
8
src/utility/git.ts
Normal 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);
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user