Fetch github repo content
MIT License
Fetch github repo content
Please consider starring the project to show your ❤️ and support.
yarn add fetch-gh-content
const fetch = require('fetch-gh-content')
;(async () => {
const content = await fetch({
owner: 'evillt',
repo: 'fetch-gh-content',
filepath: '__test__/plaintext'
})
console.log(content) // oh my fetch-gh-content
// Use it do something you want, e.g. `fs.writeFile`
})()
fetchGhContent(options): Promise<string | Array<object>>
options: object
options.owner: string
GitHub repo owner
options.repo: string
GitHub repo name
options.filepath: PathLike
GitHub repo file path
options.token?: string
process.env.GITHUB_TOKEN
GitHub access token
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
fetch-gh-content © evillt, Released under the MIT License.
Authored and maintained by EVILLT with help from contributors (list).