From 6f6d7f0e9d9bfc2c75831331903f340e244bf78a Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Wed, 15 Jun 2016 17:03:44 +0100 Subject: [PATCH] chore: updated callbacks to be Requestable.callback --- lib/Repository.js | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/lib/Repository.js b/lib/Repository.js index d77a0006..63596cfd 100644 --- a/lib/Repository.js +++ b/lib/Repository.js @@ -313,7 +313,7 @@ class Repository extends Requestable { * @param {string} parent - the SHA of the parent commit * @param {string} tree - the SHA of the tree for this commit * @param {string} message - the commit message - * @param {Function} cb - will receive the commit that is created + * @param {Requestable.callback} cb - will receive the commit that is created * @return {Promise} - the promise for the http request */ commit(parent, tree, message, cb) { @@ -336,7 +336,7 @@ class Repository extends Requestable { * @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 - * @param {Function} cb - will receive the updated ref back + * @param {Requestable.callback} cb - will receive the updated ref back * @return {Promise} - the promise for the http request */ updateHead(ref, commitSHA, force, cb) { @@ -349,7 +349,7 @@ class Repository extends Requestable { /** * Get information about the repository * @see https://developer.github.com/v3/repos/#get - * @param {Function} cb - will receive the information about the repository + * @param {Requestable.callback} cb - will receive the information about the repository * @return {Promise} - the promise for the http request */ getDetails(cb) { @@ -359,7 +359,7 @@ class Repository extends Requestable { /** * List the contributors to the repository * @see https://developer.github.com/v3/repos/#list-contributors - * @param {Function} cb - will receive the list of contributors + * @param {Requestable.callback} cb - will receive the list of contributors * @return {Promise} - the promise for the http request */ getContributors(cb) { @@ -370,7 +370,7 @@ class Repository extends Requestable { * List the users who are collaborators on the repository. The currently authenticated user must have * push access to use this method * @see https://developer.github.com/v3/repos/collaborators/#list-collaborators - * @param {Function} cb - will receive the list of collaborators + * @param {Requestable.callback} cb - will receive the list of collaborators * @return {Promise} - the promise for the http request */ getCollaborators(cb) { @@ -381,7 +381,7 @@ class Repository extends Requestable { * Check if a user is a collaborator on the repository * @see https://developer.github.com/v3/repos/collaborators/#check-if-a-user-is-a-collaborator * @param {string} username - the user to check - * @param {Function} cb - will receive true if the user is a collaborator and false if they are not + * @param {Requestable.callback} cb - will receive true if the user is a collaborator and false if they are not * @return {Promise} - the promise for the http request {Boolean} [description] */ isCollaborator(username, cb) { @@ -394,7 +394,7 @@ class Repository extends Requestable { * @param {string} ref - the ref to check * @param {string} path - the path containing the content to fetch * @param {boolean} raw - `true` if the results should be returned raw instead of GitHub's normalized format - * @param {Function} cb - will receive the fetched data + * @param {Requestable.callback} cb - will receive the fetched data * @return {Promise} - the promise for the http request */ getContents(ref, path, raw, cb) { @@ -409,7 +409,7 @@ class Repository extends Requestable { * @see https://developer.github.com/v3/repos/contents/#get-the-readme * @param {string} ref - the ref to check * @param {boolean} raw - `true` if the results should be returned raw instead of GitHub's normalized format - * @param {Function} cb - will receive the fetched data + * @param {Requestable.callback} cb - will receive the fetched data * @return {Promise} - the promise for the http request */ getReadme(ref, raw, cb) { @@ -421,7 +421,7 @@ class Repository extends Requestable { /** * Fork a repository * @see https://developer.github.com/v3/repos/forks/#create-a-fork - * @param {Function} cb - will receive the information about the newly created fork + * @param {Requestable.callback} cb - will receive the information about the newly created fork * @return {Promise} - the promise for the http request */ fork(cb) { @@ -431,7 +431,7 @@ class Repository extends Requestable { /** * List a repository's forks * @see https://developer.github.com/v3/repos/forks/#list-forks - * @param {Function} cb - will receive the list of repositories forked from this one + * @param {Requestable.callback} cb - will receive the list of repositories forked from this one * @return {Promise} - the promise for the http request */ listForks(cb) { @@ -442,7 +442,7 @@ class Repository extends Requestable { * Create a new branch from an existing branch. * @param {string} [oldBranch=master] - the name of the existing branch * @param {string} newBranch - the name of the new branch - * @param {Function} cb - will receive the commit data for the head of the new branch + * @param {Requestable.callback} cb - will receive the commit data for the head of the new branch * @return {Promise} - the promise for the http request */ createBranch(oldBranch, newBranch, cb) { @@ -466,7 +466,7 @@ class Repository extends Requestable { * Create a new pull request * @see https://developer.github.com/v3/pulls/#create-a-pull-request * @param {Object} options - the pull request description - * @param {Function} cb - will receive the new pull request + * @param {Requestable.callback} cb - will receive the new pull request * @return {Promise} - the promise for the http request */ createPullRequest(options, cb) { @@ -476,7 +476,7 @@ class Repository extends Requestable { /** * List the hooks for the repository * @see https://developer.github.com/v3/repos/hooks/#list-hooks - * @param {Function} cb - will receive the list of hooks + * @param {Requestable.callback} cb - will receive the list of hooks * @return {Promise} - the promise for the http request */ listHooks(cb) { @@ -487,7 +487,7 @@ class Repository extends Requestable { * Get a hook for the repository * @see https://developer.github.com/v3/repos/hooks/#get-single-hook * @param {number} id - the id of the webook - * @param {Function} cb - will receive the details of the webook + * @param {Requestable.callback} cb - will receive the details of the webook * @return {Promise} - the promise for the http request */ getHook(id, cb) { @@ -498,7 +498,7 @@ class Repository extends Requestable { * Add a new hook to the repository * @see https://developer.github.com/v3/repos/hooks/#create-a-hook * @param {Object} options - the configuration describing the new hook - * @param {Function} cb - will receive the new webhook + * @param {Requestable.callback} cb - will receive the new webhook * @return {Promise} - the promise for the http request */ createHook(options, cb) { @@ -510,7 +510,7 @@ class Repository extends Requestable { * @see https://developer.github.com/v3/repos/hooks/#edit-a-hook * @param {number} id - the id of the webhook * @param {Object} options - the new description of the webhook - * @param {Function} cb - will receive the updated webhook + * @param {Requestable.callback} cb - will receive the updated webhook * @return {Promise} - the promise for the http request */ updateHook(id, options, cb) { @@ -521,7 +521,7 @@ class Repository extends Requestable { * Delete a webhook * @see https://developer.github.com/v3/repos/hooks/#delete-a-hook * @param {number} id - the id of the webhook to be deleted - * @param {Function} cb - will receive true if the call is successful + * @param {Requestable.callback} cb - will receive true if the call is successful * @return {Promise} - the promise for the http request */ deleteHook(id, cb) { @@ -533,7 +533,7 @@ class Repository extends Requestable { * @see https://developer.github.com/v3/repos/contents/#delete-a-file * @param {string} branch - the branch to delete from, or the default branch if not specified * @param {string} path - the path of the file to remove - * @param {Function} cb - will receive the commit in which the delete occurred + * @param {Requestable.callback} cb - will receive the commit in which the delete occurred * @return {Promise} - the promise for the http request */ deleteFile(branch, path, cb) { @@ -553,7 +553,7 @@ class Repository extends Requestable { * @param {string} branch - the branch to carry out the reference change, or the default branch if not specified * @param {string} oldPath - original path * @param {string} newPath - new reference path - * @param {Function} cb - will receive the commit in which the move occurred + * @param {Requestable.callback} cb - will receive the commit in which the move occurred * @return {Promise} - the promise for the http request */ move(branch, oldPath, newPath, cb) { @@ -588,7 +588,7 @@ class Repository extends Requestable { * @param {Object} [options.author] - the author of the commit * @param {Object} [options.commiter] - the committer * @param {boolean} [options.encode] - true if the content should be base64 encoded - * @param {Function} cb - will receive the new commit + * @param {Requestable.callback} cb - will receive the new commit * @return {Promise} - the promise for the http request */ writeFile(branch, path, content, message, options, cb) { @@ -682,7 +682,7 @@ class Repository extends Requestable { /** * Get information about a release * @see https://developer.github.com/v3/repos/releases/#get-a-single-release - * @param {strign} id - the id of the release + * @param {string} id - the id of the release * @param {Requestable.callback} cb - will receive the release information * @return {Promise} - the promise for the http request */ pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy