mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-21 06:35:11 +00:00
Removed legacy URL, minor XML-doc tweaks
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Octokit.Reactive
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public IObservable<CommitStatus> GetAll(string owner, string name, string reference)
|
public IObservable<CommitStatus> GetAll(string owner, string name, string reference)
|
||||||
{
|
{
|
||||||
return _connection.GetAndFlattenAllPages<CommitStatus>(ApiUrls.CommitStatus(owner, name, reference));
|
return _connection.GetAndFlattenAllPages<CommitStatus>(ApiUrls.CommitStatuses(owner, name, reference));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace Octokit.Tests.Clients
|
|||||||
client.GetAll("fake", "repo", "sha");
|
client.GetAll("fake", "repo", "sha");
|
||||||
|
|
||||||
connection.Received()
|
connection.Received()
|
||||||
.GetAll<CommitStatus>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/statuses/sha"), null);
|
.GetAll<CommitStatus>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/commits/sha/statuses"));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ namespace Octokit
|
|||||||
/// Retrieves commit statuses for the specified reference. A reference can be a commit SHA, a branch name, or
|
/// Retrieves commit statuses for the specified reference. A reference can be a commit SHA, a branch name, or
|
||||||
/// a tag name.
|
/// a tag name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Only users with pull access can see this.</remarks>
|
/// <remarks>
|
||||||
|
/// https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref
|
||||||
|
/// </remarks>
|
||||||
/// <param name="owner">The owner of the repository</param>
|
/// <param name="owner">The owner of the repository</param>
|
||||||
/// <param name="name">The name of the repository</param>
|
/// <param name="name">The name of the repository</param>
|
||||||
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
@@ -34,18 +36,16 @@ namespace Octokit
|
|||||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
|
Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
|
||||||
|
|
||||||
// This is currently a preview feature of the API and is subject to change
|
return ApiConnection.GetAll<CommitStatus>(ApiUrls.CommitStatuses(owner, name, reference));
|
||||||
// https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref
|
|
||||||
return ApiConnection.GetAll<CommitStatus>(
|
|
||||||
ApiUrls.CommitStatus(owner, name, reference),
|
|
||||||
null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves a combined view of statuses for the specified reference. A reference can be a commit SHA, a branch name, or
|
/// Retrieves a combined view of statuses for the specified reference. A reference can be a commit SHA, a branch name, or
|
||||||
/// a tag name.
|
/// a tag name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Only users with pull access can see this.</remarks>
|
/// <remarks>
|
||||||
|
/// https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
|
||||||
|
/// </remarks>
|
||||||
/// <param name="owner">The owner of the repository</param>
|
/// <param name="owner">The owner of the repository</param>
|
||||||
/// <param name="name">The name of the repository</param>
|
/// <param name="name">The name of the repository</param>
|
||||||
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
@@ -62,6 +62,9 @@ namespace Octokit
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a commit status for the specified ref.
|
/// Creates a commit status for the specified ref.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// https://developer.github.com/v3/repos/statuses/#create-a-status
|
||||||
|
/// </remarks>
|
||||||
/// <param name="owner">The owner of the repository</param>
|
/// <param name="owner">The owner of the repository</param>
|
||||||
/// <param name="name">The name of the repository</param>
|
/// <param name="name">The name of the repository</param>
|
||||||
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
@@ -74,11 +77,7 @@ namespace Octokit
|
|||||||
Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
|
Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
|
||||||
Ensure.ArgumentNotNull(commitStatus, "commitStatus");
|
Ensure.ArgumentNotNull(commitStatus, "commitStatus");
|
||||||
|
|
||||||
// This is currently a preview feature of the API and is subject to change
|
return ApiConnection.Post<CommitStatus>(ApiUrls.CreateCommitStatus(owner, name, reference), commitStatus);
|
||||||
// https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref
|
|
||||||
return ApiConnection.Post<CommitStatus>(
|
|
||||||
ApiUrls.CommitStatus(owner, name, reference),
|
|
||||||
commitStatus);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ namespace Octokit
|
|||||||
/// Retrieves commit statuses for the specified reference. A reference can be a commit SHA, a branch name, or
|
/// Retrieves commit statuses for the specified reference. A reference can be a commit SHA, a branch name, or
|
||||||
/// a tag name.
|
/// a tag name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Only users with pull access can see this.</remarks>
|
/// <remarks>
|
||||||
|
/// https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref
|
||||||
|
/// </remarks>
|
||||||
/// <param name="owner">The owner of the repository</param>
|
/// <param name="owner">The owner of the repository</param>
|
||||||
/// <param name="name">The name of the repository</param>
|
/// <param name="name">The name of the repository</param>
|
||||||
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
@@ -26,7 +28,9 @@ namespace Octokit
|
|||||||
/// Retrieves a combined view of statuses for the specified reference. A reference can be a commit SHA, a branch name, or
|
/// Retrieves a combined view of statuses for the specified reference. A reference can be a commit SHA, a branch name, or
|
||||||
/// a tag name.
|
/// a tag name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Only users with pull access can see this.</remarks>
|
/// <remarks>
|
||||||
|
/// https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
|
||||||
|
/// </remarks>
|
||||||
/// <param name="owner">The owner of the repository</param>
|
/// <param name="owner">The owner of the repository</param>
|
||||||
/// <param name="name">The name of the repository</param>
|
/// <param name="name">The name of the repository</param>
|
||||||
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
@@ -36,6 +40,9 @@ namespace Octokit
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a commit status for the specified ref.
|
/// Creates a commit status for the specified ref.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// https://developer.github.com/v3/repos/statuses/#create-a-status
|
||||||
|
/// </remarks>
|
||||||
/// <param name="owner">The owner of the repository</param>
|
/// <param name="owner">The owner of the repository</param>
|
||||||
/// <param name="name">The name of the repository</param>
|
/// <param name="name">The name of the repository</param>
|
||||||
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
|
|||||||
@@ -543,6 +543,18 @@ namespace Octokit
|
|||||||
return "repos/{0}/{1}/milestones/{2}/labels".FormatUri(owner, repo, number);
|
return "repos/{0}/{1}/milestones/{2}/labels".FormatUri(owner, repo, number);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the <see cref="Uri"/> to use when creating a commit status for the specified reference.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="owner">The owner of the repository</param>
|
||||||
|
/// <param name="name">The name of the repository</param>
|
||||||
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Uri CreateCommitStatus(string owner, string name, string reference)
|
||||||
|
{
|
||||||
|
return "repos/{0}/{1}/statuses/{2}".FormatUri(owner, name, reference);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the <see cref="Uri"/> that lists the commit statuses for the specified reference.
|
/// Returns the <see cref="Uri"/> that lists the commit statuses for the specified reference.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -550,9 +562,9 @@ namespace Octokit
|
|||||||
/// <param name="name">The name of the repository</param>
|
/// <param name="name">The name of the repository</param>
|
||||||
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static Uri CommitStatus(string owner, string name, string reference)
|
public static Uri CommitStatuses(string owner, string name, string reference)
|
||||||
{
|
{
|
||||||
return "repos/{0}/{1}/statuses/{2}".FormatUri(owner, name, reference);
|
return "repos/{0}/{1}/commits/{2}/statuses".FormatUri(owner, name, reference);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user