This repository was archived by the owner on Jun 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathIPullRequestReviewCommentThreadViewModel.cs
More file actions
89 lines (78 loc) · 3.07 KB
/
IPullRequestReviewCommentThreadViewModel.cs
File metadata and controls
89 lines (78 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
using System.Collections.Generic;
using System.Threading.Tasks;
using GitHub.Models;
using GitHub.Services;
using ReactiveUI;
namespace GitHub.ViewModels
{
/// <summary>
/// A thread of pull request review comments.
/// </summary>
public interface IPullRequestReviewCommentThreadViewModel : ICommentThreadViewModel
{
/// <summary>
/// Gets the comments in the thread.
/// </summary>
IReadOnlyReactiveList<ICommentViewModel> Comments { get; }
/// <summary>
/// Gets the current pull request review session.
/// </summary>
IPullRequestSession Session { get; }
/// <summary>
/// Gets the file that the comment is on.
/// </summary>
IPullRequestSessionFile File { get; }
/// <summary>
/// Gets the 0-based line number that the comment in on.
/// </summary>
int LineNumber { get; }
/// <summary>
/// Gets the side of the diff that the comment is on.
/// </summary>
DiffSide Side { get; }
/// <summary>
/// Gets a value indicating whether the thread is outdated.
/// </summary>
bool IsOutdated { get; }
/// <summary>
/// Gets a value indicating whether comment thread has been marked as resolved by a user.
/// </summary>
bool IsResolved { get; }
/// <summary>
/// Gets a value indicating whether the thread is a new thread being authored, that is not
/// yet present on the server.
/// </summary>
bool IsNewThread { get; }
/// <summary>
/// Gets a value indicating whether the user must commit and push their changes before
/// leaving a comment on the requested line.
/// </summary>
bool NeedsPush { get; }
/// <summary>
/// Initializes the view model with data.
/// </summary>
/// <param name="session">The pull request session.</param>
/// <param name="file">The file that the comment is on.</param>
/// <param name="thread">The thread.</param>
/// <param name="addPlaceholder">
/// Whether to add a placeholder comment at the end of the thread.
/// </param>
Task InitializeAsync(IPullRequestSession session,
IPullRequestSessionFile file,
IInlineCommentThreadModel thread,
bool addPlaceholder);
/// <summary>
/// Initializes the view model as a new thread being authored.
/// </summary>
/// <param name="session">The pull request session.</param>
/// <param name="file">The file that the comment is on.</param>
/// <param name="lineNumber">The 0-based line number of the thread.</param>
/// <param name="side">The side of the diff.</param>
/// <param name="isEditing">Whether to start the placeholder in edit state.</param>
Task InitializeNewAsync(IPullRequestSession session,
IPullRequestSessionFile file,
int lineNumber,
DiffSide side,
bool isEditing);
}
}