public interface PullRequestParticipant extends Comparable<PullRequestParticipant>
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(PullRequestParticipant other)
Sorts participants first by status, then by name
|
String |
getLastReviewedCommit()
The commit hash at which this participant last reviewed the pull request.
|
PullRequest |
getPullRequest() |
PullRequestRole |
getRole() |
PullRequestParticipantStatus |
getStatus() |
ApplicationUser |
getUser() |
boolean |
isApproved() |
@Nullable @OptionalString(minimumSize=40, size=40) String getLastReviewedCommit()
A participant is considered to have reviewed a pull request when their status is changed to
PullRequestParticipantStatus.NEEDS_WORK or PullRequestParticipantStatus.APPROVED. A pull request
being rescoped does not trigger updating of participant's last reviewed commits so it is possible for the commit
hash returned to no longer be part of the pull request.
This method will return null if the participant has not yet reviewed the pull request. The last
reviewed commit for a participant may also be reset back to null if changes to the pull request mean the
commit hash may no longer be suitable for the application to use internally.
@Nonnull PullRequest getPullRequest()
@Nonnull PullRequestRole getRole()
@Nonnull PullRequestParticipantStatus getStatus()
@Nonnull ApplicationUser getUser()
boolean isApproved()
true if the status of this participant is APPROVED
false otherwiseint compareTo(@Nonnull PullRequestParticipant other)
compareTo in interface Comparable<PullRequestParticipant>other - the participant to compare to0 if other has same status and same name< 0 if other has approved the pull request and this has not, or if other has
same status but comes first when alphabetically ordered by name> 0 otherwiseNullPointerException - if other is nullCopyright © 2023 Atlassian. All rights reserved.