diff --git a/packages/keystatic/src/reader/github.ts b/packages/keystatic/src/reader/github.ts index 38ae187da..ad7a396a2 100644 --- a/packages/keystatic/src/reader/github.ts +++ b/packages/keystatic/src/reader/github.ts @@ -46,7 +46,10 @@ export function createGitHubReader< const res = await fetch( `https://api.github.com/repos/${opts.repo}/git/trees/${ref}?recursive=1`, { - headers: opts.token ? { Authorization: `Bearer ${opts.token}` } : {}, + headers: { + 'User-Agent': opts.repo, + ...(opts.token && { Authorization: `Bearer ${opts.token}` }), + }, cache: 'no-store', } );