Package com.atlassian.bitbucket.pull
Interface PullRequestParticipant
- All Superinterfaces:
Comparable<PullRequestParticipant>
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(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_WORK
orPullRequestParticipantStatus.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
null
if the participant has not yet reviewed the pull request. The last reviewed commit for a participant may also be reset back tonull
if 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:
true
if the status of this participant isAPPROVED
false
otherwise
-
compareTo
Sorts participants first by status, then by name- Specified by:
compareTo
in interfaceComparable<PullRequestParticipant>
- Parameters:
other
- the participant to compare to- Returns:
0
ifother
has same status and same name< 0
ifother
has approved the pull request andthis
has not, or ifother
has same status but comes first when alphabetically ordered by name> 0
otherwise
- Throws:
NullPointerException
- ifother
isnull
- Since:
- 4.2
-