Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 13ebf08

Browse files
committed
Remove null check after GetPullRequestMergeBase
This method now throws `NotFoundException` rather than returning null.
1 parent c8b1015 commit 13ebf08

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/GitHub.InlineReviews/Services/PullRequestSessionService.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,8 @@ public async Task<string> GetPullRequestMergeBase(ILocalRepositoryModel reposito
127127
var baseRef = pullRequest.Base.Ref;
128128
var headRef = pullRequest.Head.Ref;
129129
mergeBase = await gitClient.GetPullRequestMergeBase(repo, baseUrl, headUrl, baseSha, headSha, baseRef, headRef);
130-
if (mergeBase != null)
131-
{
132-
return mergeBaseCache[key] = mergeBase;
133-
}
134130

135-
throw new FileNotFoundException($"Couldn't find merge base between {baseSha} and {headSha}.");
131+
return mergeBaseCache[key] = mergeBase;
136132
}
137133

138134
/// <inheritdoc/>

0 commit comments

Comments
 (0)