From 199ef7ea1efde1841dba372a2caf2ddab358d7fa Mon Sep 17 00:00:00 2001 From: Oleg Shevchenko Date: Mon, 29 Jan 2024 12:07:02 +0300 Subject: [PATCH 1/2] Add 'State' property to UserRole class This property will represent a PR review status. --- SharpBucket/V2/Pocos/UserRole.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/SharpBucket/V2/Pocos/UserRole.cs b/SharpBucket/V2/Pocos/UserRole.cs index 398f2cd2..5f6ccd7f 100644 --- a/SharpBucket/V2/Pocos/UserRole.cs +++ b/SharpBucket/V2/Pocos/UserRole.cs @@ -5,5 +5,6 @@ public class UserRole public User User { get; set; } public string Role { get; set; } public bool Approved { get; set; } + public string State { get; set; } } } \ No newline at end of file From f34d7a09bff8a1a8015ee8d0e1d70d2e5b59bcab Mon Sep 17 00:00:00 2001 From: Oleg Shevchenko Date: Tue, 18 Feb 2025 16:46:12 +0300 Subject: [PATCH 2/2] Add method to retrieve build status information for a specific commit --- SharpBucket/V2/EndPoints/RepositoryResource.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/SharpBucket/V2/EndPoints/RepositoryResource.cs b/SharpBucket/V2/EndPoints/RepositoryResource.cs index f22ffc24..4fffcc21 100644 --- a/SharpBucket/V2/EndPoints/RepositoryResource.cs +++ b/SharpBucket/V2/EndPoints/RepositoryResource.cs @@ -679,6 +679,18 @@ public BuildInfo GetBuildStatusInfo(string revision, string key) return SharpBucketV2.Get(overrideUrl); } + /// + /// Returns the build status information for a specific commit. + /// + /// The SHA1 of the commit. + /// An enumerable collection of build status information. + public IEnumerable GetBuildStatusInfo(string revision) + { + var overrideUrl = BaseUrl + $"/commit/{revision}/statuses"; + + return SharpBucketV2.EnumeratePaginatedValues(overrideUrl); + } + /// /// Returns the specified build status for a commit. ///