Package com.atlassian.bitbucket.pull
Interface PullRequestParticipant
- All Superinterfaces:
Comparable<PullRequestParticipant>
-
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(PullRequestParticipant other) Sorts participants first by status, then by nameThe commit hash at which this participant last reviewed the pull request.getRole()getUser()boolean
-
Method Details
-
getLastReviewedCommit
The commit hash at which this participant last reviewed the pull request.A participant is considered to have reviewed a pull request when their status is changed to
PullRequestParticipantStatus.NEEDS_WORKorPullRequestParticipantStatus.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 thepull request.This method will return
nullif the participant has not yet reviewed the pull request. The last reviewed commit for a participant may also be reset back tonullif changes to the pull request mean the commit hash may no longer be suitable for the application to use internally.- Returns:
- the commit hash at which this participant last reviewed the pull request
- Since:
- 4.9
-
getPullRequest
- Returns:
- the pull request this participant is associated with
-
getRole
- Returns:
- the role of this participant in the pull request.
-
getStatus
- Returns:
- the status of this participant in the pull request.
- Since:
- 4.2
-
getUser
- Returns:
- the user participating in the pull request
-
isApproved
boolean isApproved()- Returns:
trueif the status of this participant isAPPROVEDfalseotherwise
-
compareTo
Sorts participants first by status, then by name- Specified by:
compareToin interfaceComparable<PullRequestParticipant>- Parameters:
other- the participant to compare to- Returns:
0ifotherhas same status and same name< 0ifotherhas approved the pull request andthishas not, or ifotherhas same status but comes first when alphabetically ordered by name> 0otherwise
- Throws:
NullPointerException- ifotherisnull- Since:
- 4.2
-