Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Turning off "Needs Work" results in a PullRequestParticipantUnapprovedEvent

Matt December 2, 2016

Hello,

I'm developing a plugin to listen for Pull Request events. With an open pull request,

User clicks "Needs Work". Event received is PullRequestParticipantReviewedEvent. This is expected behavior.

User then clicks "Needs Work" again, effectively turning it off. What is received is PullRequestParticipantUnapprovedEvent and not all what I'm expected. The pul request wasn't Unapproved, if anything it's closer to approved because it no longer needs work.

Has anyone else seen this?

 Bitbucket v4.9.1

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Matt December 2, 2016

I figured out the issue. The pull request status goes from "UNAPPROVED" to "NEEDS_WORK" and the back to "UNAPPROVED". Since the status changes to "UNAPPROVED" the Unapproved event is fired.

TAGS
AUG Leaders

Atlassian Community Events