Transition a Contribution from PENDING_PEER_REVIEW to PENDING_MENTOR_APPROVAL
- Given a Contribution in State PENDING_PEER_REVIEW
- When a peer reviews it
- Should notify the Contribution's Mentor
- And the new State of the Contribution is PENDING_MENTOR_APPROVAL
We need the ability to peer review a Contribution. This is a stamp of approval from the Adopt OpenJDK team, allowing the Contribution to be sent to the official Mentor.
The state transition is: PENDING_PEER_REVIEW -> PENDING_MENTOR_REVIEW.
To do this, the main changes we need to make are:
- Add "PEER_REVIEWED_EVENT" to the ContributionEventType enum.
- The UI needs to have a button for 'peer review'.
- This button must be hooked up to publish a Contribution event with the new ContributionEventType.
- Implement an Actor to handle a ContributionEvent with this new ContributionEventType.
- This will enable the Actor to respond to the UI 'peer review' button being clicked.
- This Actor would be effectively replacing the MentorNotificationActor.
- The actor should trigger the email notification to the Mentor.
- This should be done using the current standard method within BetterRev.
- Ideally there should be an "Email" actor.
- Once the email is sent, the actor should:
- transition the Contribution's state to PENDING_MENTOR_APPROVAL, using the ContributionModifier.
- publish a new ContributionEvent with type: MENTOR_NOTIFIED
Ensure that all documentation is updated after this.