MCPcopy Index your code
hub / github.com/github-tools/github / getSha

Method getSha

lib/Repository.js:238–241  ·  view source on GitHub ↗

* Get tha sha for a particular object in the repository. This is a convenience function * @see https://developer.github.com/v3/repos/contents/#get-contents * @param {string} [branch] - the branch to look in, or the repository's default branch if omitted * @param {string} path - the path

(branch, path, cb)

Source from the content-addressed store, hash-verified

236 * @return {Promise} - the promise for the http request
237 */
238 getSha(branch, path, cb) {
239 branch = branch ? `?ref=${branch}` : '';
240 return this._request('GET', `/repos/${this.__fullname}/contents/${path}${branch}`, null, cb);
241 }
242
243 /**
244 * List the commit statuses for a particular sha, branch, or tag

Callers 3

deleteFileMethod · 0.95
writeFileMethod · 0.95
repository.spec.jsFile · 0.80

Calls 1

_requestMethod · 0.80

Tested by

no test coverage detected