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

Commit 1e3f839

Browse files
Displaying the check suite name in inline reviews
1 parent 9dcae6e commit 1e3f839

File tree

5 files changed

+15
-1
lines changed

5 files changed

+15
-1
lines changed

src/GitHub.Exports.Reactive/Models/IInlineAnnotationModel.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ public interface IInlineAnnotationModel
4040
/// </summary>
4141
string LineDescription { get; }
4242

43+
/// <summary>
44+
/// Gets the name of the check suite.
45+
/// </summary>
46+
string CheckSuiteName { get; }
47+
4348
/// <summary>
4449
/// Gets the name of the check run.
4550
/// </summary>

src/GitHub.Exports.Reactive/Models/InlineAnnotationModel.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class InlineAnnotationModel: IInlineAnnotationModel
1212
/// <summary>
1313
/// Initializes the <see cref="InlineAnnotationModel"/>.
1414
/// </summary>
15+
/// <param name="checkSuite">The check suite model.</param>
1516
/// <param name="checkRun">The check run model.</param>
1617
/// <param name="annotation">The annotation model.</param>
1718
public InlineAnnotationModel(CheckSuiteModel checkSuite, CheckRunModel checkRun,
@@ -37,6 +38,9 @@ public InlineAnnotationModel(CheckSuiteModel checkSuite, CheckRunModel checkRun,
3738
/// <inheritdoc />
3839
public CheckAnnotationLevel AnnotationLevel => annotation.AnnotationLevel;
3940

41+
/// <inheritdoc />
42+
public string CheckSuiteName => checkSuite.ApplicationName;
43+
4044
/// <inheritdoc />
4145
public string CheckRunName => checkRun.Name;
4246

src/GitHub.InlineReviews/SampleData/CommentThreadViewModelDesigner.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ public CommentThreadViewModelDesigner()
5656
var checkSuiteModel = new CheckSuiteModel()
5757
{
5858
HeadSha = "ed6198c37b13638e902716252b0a17d54bd59e4a",
59-
CheckRuns = new List<CheckRunModel> { checkRunModel }
59+
CheckRuns = new List<CheckRunModel> { checkRunModel },
60+
ApplicationName = "My Awesome Check Suite"
6061
};
6162

6263
Annotations = new[]

src/GitHub.InlineReviews/SampleData/InlineAnnotationViewModelDesigner.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public InlineAnnotationViewModelDesigner()
2727

2828
var checkSuiteModel = new CheckSuiteModel()
2929
{
30+
ApplicationName = "Fake Check Suite",
3031
HeadSha = "ed6198c37b13638e902716252b0a17d54bd59e4a",
3132
CheckRuns = new List<CheckRunModel> { checkRunModel}
3233
};

src/GitHub.InlineReviews/Views/InlineAnnotationView.xaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
<ghfvs:OcticonImage Margin="0 0 0 0" MinWidth="20" Icon="alert" Foreground="#f1c647" Visibility="{Binding Model.AnnotationLevel, Converter={ghfvs:EqualsToVisibilityConverter Warning}}"/>
2020
<ghfvs:OcticonImage Margin="0 0 0 0" MinWidth="20" Icon="x" Foreground="#cb2431" Visibility="{Binding Model.AnnotationLevel, Converter={ghfvs:EqualsToVisibilityConverter Failure}}"/>
2121
</StackPanel>
22+
<TextBlock FontWeight="SemiBold" Margin="2 0">
23+
<Run Text="{Binding Model.CheckSuiteName, Mode=OneWay}"/>
24+
</TextBlock>
2225
<TextBlock FontWeight="SemiBold" Margin="2 0">
2326
<Run Text="{Binding Model.CheckRunName, Mode=OneWay}"/>
2427
</TextBlock>

0 commit comments

Comments
 (0)