Skip to content

Commit ea70c12

Browse files
committed
enable nullable + remove newlines
1 parent 248eb26 commit ea70c12

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/Microsoft.DotNet.Darc/DarcLib/Helpers/GithubResourceConverters.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using Microsoft.DotNet.DarcLib.Models.GitHub;
99
using Octokit;
1010

11+
#nullable enable
1112
namespace Microsoft.DotNet.DarcLib.Helpers;
1213

1314
internal class GithubResourceConverters
@@ -17,7 +18,6 @@ internal static Models.PullRequest ConvertPullRequest(Octokit.PullRequest pr)
1718
var status = pr.State == ItemState.Closed ?
1819
pr.Merged == true ? PrStatus.Merged : PrStatus.Closed :
1920
PrStatus.Open;
20-
2121
return new()
2222
{
2323
Title = pr.Title,
@@ -46,7 +46,6 @@ internal static GithubPullRequestReviews ConvertPullRequestReviews(IEnumerable<P
4646
};
4747
}
4848

49-
5049
private static ReviewState TranslateReviewState(PullRequestReviewState state)
5150
{
5251
return state switch
@@ -61,5 +60,4 @@ private static ReviewState TranslateReviewState(PullRequestReviewState state)
6160
_ => throw new NotImplementedException($"Unexpected pull request review state {state}"),
6261
};
6362
}
64-
6563
}

test/Microsoft.DotNet.DarcLib.Tests/GitHubClientTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ internal class TestGitHubClient : GitHubClient
139139
private IGitHubClient _client;
140140
private Dictionary<Tuple<string, string, int>, List<PullRequestReview>> _reviewData = [];
141141
private static readonly Regex ReviewsUriPattern =
142-
new(@"^/?repos/(?<owner>[^/]+)/(?<repo>[^/]+)/pulls/(?<id>\d+)/reviews/?$");
142+
new(@"^/?repos/(?<owner>[^/]+)/(?<repo>[^/]+)/pulls/(?<id>\d+)/reviews/?$");
143143

144144
public void SetReviewData(Dictionary<Tuple<string, string, int>, List<PullRequestReview>> data)
145145
{

0 commit comments

Comments
 (0)