public static Deployments ( long repositoryId ) : |
||
repositoryId | long | The Id of the repository |
Результат |
/// <summary> /// Creates a new deployment for the specified repository. /// Users with push access can create a deployment for a given ref. /// </summary> /// <remarks> /// http://developer.github.com/v3/repos/deployments/#create-a-deployment /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="newDeployment">A <see cref="NewDeployment"/> instance describing the new deployment to create</param> public Task <Deployment> Create(int repositoryId, NewDeployment newDeployment) { Ensure.ArgumentNotNull(newDeployment, "newDeployment"); return(ApiConnection.Post <Deployment>(ApiUrls.Deployments(repositoryId), newDeployment)); }
/// <summary> /// Gets all the deployments for the specified repository. Any user with pull access /// to a repository can view deployments. /// </summary> /// <remarks> /// http://developer.github.com/v3/repos/deployments/#list-deployments /// </remarks> /// <param name="owner">The owner of the repository</param> /// <param name="name">The name of the repository</param> /// <returns>All the <see cref="Deployment"/>s for the specified repository.</returns> public Task <IReadOnlyList <Deployment> > GetAll(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, "login"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); return(ApiConnection.GetAll <Deployment>(ApiUrls.Deployments(owner, name))); }
/// <summary> /// Gets all the deployments for the specified repository. Any user with pull access /// to a repository can view deployments. /// </summary> /// <remarks> /// http://developer.github.com/v3/repos/deployments/#list-deployments /// </remarks> /// <param name="owner">The owner of the repository</param> /// <param name="name">The name of the repository</param> /// <param name="options">Options for changing the API response</param> /// <returns>All the <see cref="Deployment"/>s for the specified repository.</returns> public Task <IReadOnlyList <Deployment> > GetAll(string owner, string name, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNull(options, "options"); return(ApiConnection.GetAll <Deployment>(ApiUrls.Deployments(owner, name), options)); }
/// <summary> /// Creates a new deployment for the specified repository. /// Users with push access can create a deployment for a given ref. /// </summary> /// <remarks> /// http://developer.github.com/v3/repos/deployments/#create-a-deployment /// </remarks> /// <param name="owner">The owner of the repository</param> /// <param name="name">The name of the repository</param> /// <param name="newDeployment">A <see cref="NewDeployment"/> instance describing the new deployment to create</param> /// <returns>The created <see cref="Deployment"/></returns> public Task <Deployment> Create(string owner, string name, NewDeployment newDeployment) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNull(newDeployment, "deployment"); return(ApiConnection.Post <Deployment>(ApiUrls.Deployments(owner, name), newDeployment)); }
public Task <Deployment> Create(string owner, string name, NewDeployment newDeployment) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(newDeployment, nameof(newDeployment)); return(ApiConnection.Post <Deployment>(ApiUrls.Deployments(owner, name), newDeployment, AcceptHeaders.DeploymentApiPreview)); }
public Task <IReadOnlyList <Deployment> > GetAll(string owner, string name, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(options, nameof(options)); return(ApiConnection.GetAll <Deployment>(ApiUrls.Deployments(owner, name), null, AcceptHeaders.DeploymentApiPreview, options)); }
/// <summary> /// Gets all the deployments for the specified repository. Any user with pull access /// to a repository can view deployments. /// </summary> /// <remarks> /// http://developer.github.com/v3/repos/deployments/#list-deployments /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="options">Options for changing the API response</param> public Task <IReadOnlyList <Deployment> > GetAll(int repositoryId, ApiOptions options) { Ensure.ArgumentNotNull(options, "options"); return(ApiConnection.GetAll <Deployment>(ApiUrls.Deployments(repositoryId), options)); }