/// <summary> /// Deletes a label. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/issues/labels/#delete-a-label">API documentation</a> for more information. /// </remarks> /// <param name="owner">The owner of the repository</param> /// <param name="name">The name of the repository</param> /// <param name="labelName">The name of the label</param> public IObservable <Unit> Delete(string owner, string name, string labelName) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNullOrEmptyString(labelName, nameof(labelName)); return(_client.Delete(owner, name, labelName).ToObservable()); }
public async Task CanDeleteIssueLabelByName() { var newLabel = new NewLabel("test label 1b", "FFFFFF"); var label = await _issuesLabelsClient.Create(_context.RepositoryOwner, _context.RepositoryName, newLabel); Assert.NotNull(label); var issueLabelLookupByName = await _issuesLabelsClient.Get(_context.RepositoryOwner, _context.RepositoryName, label.Name); Assert.Equal(label.Name, issueLabelLookupByName.Name); Assert.Equal(label.Color, issueLabelLookupByName.Color); await _issuesLabelsClient.Delete(_context.RepositoryOwner, _context.RepositoryName, label.Name); await Assert.ThrowsAsync <NotFoundException>(() => _issuesLabelsClient.Get(_context.RepositoryOwner, _context.RepositoryName, label.Name)); }
/// <summary> /// Deletes a label. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/issues/labels/#delete-a-label">API documentation</a> for more information. /// </remarks> /// <param name="owner">The owner of the repository</param> /// <param name="repo">The name of the repository</param> /// <param name="name">The name of the label</param> /// <returns></returns> public IObservable <Unit> Delete(string owner, string repo, string name) { return(_client.Delete(owner, repo, name).ToObservable()); }