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

Method updateHead

lib/Repository.js:404–409  ·  view source on GitHub ↗

* Update a ref * @see https://developer.github.com/v3/git/refs/#update-a-reference * @param {string} ref - the ref to update * @param {string} commitSHA - the SHA to point the reference to * @param {boolean} force - indicates whether to force or ensure a fast-forward update * @pa

(ref, commitSHA, force, cb)

Source from the content-addressed store, hash-verified

402 * @return {Promise} - the promise for the http request
403 */
404 updateHead(ref, commitSHA, force, cb) {
405 return this._request('PATCH', `/repos/${this.__fullname}/git/refs/${ref}`, {
406 sha: commitSHA,
407 force: force,
408 }, cb);
409 }
410
411 /**
412 * Update commit status

Callers 1

moveMethod · 0.95

Calls 1

_requestMethod · 0.80

Tested by

no test coverage detected