MCPcopy Index your code
hub / github.com/github/docs / getContentsForBlob

Function getContentsForBlob

script/helpers/git-utils.js:73–81  ·  view source on GitHub ↗
(owner, repo, sha)

Source from the content-addressed store, hash-verified

71
72// https://docs.github.com/rest/reference/git#get-a-blob
73export async function getContentsForBlob(owner, repo, sha) {
74 const { data } = await github.git.getBlob({
75 owner,
76 repo,
77 file_sha: sha,
78 })
79 // decode blob contents
80 return Buffer.from(data.content, 'base64')
81}
82
83// https://docs.github.com/rest/reference/repos#get-repository-content
84export async function getContents(owner, repo, ref, path) {

Callers 1

getContentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected