-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: github
driver
#61
Conversation
src/drivers/github.ts
Outdated
const prefix = withTrailingSlash(dir) | ||
const files = {} | ||
try { | ||
const tree = await $fetch(`https://api.github.com/repos/${org}/${repo}/git/trees/${branch}?recursive=1`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a global const (GITHUB_URL) + an option to customize.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Later improvement: We can expose storage instance to the driver and support cachePath so that github driver can permanently cache this.
@farnabaz Adding to the docs would be nice also mentioning driver usage and behavior. You can use |
github
driver
Create Github driver using Github API and raw CDN
ttl
)dir
to load contents from specific directory