app/mediators/receive_pull_request_event.rb
# The "synchronize" event occurs whenever a new commit is pushed to the branch
# or the branch is rebased.
#
# In this case, we preserve the current review status and update the new
# commit with the correct status indicator.
The "synchronize" event occurs whenever a new commit is pushed to the branch
or the branch is rebased.

In this case, we preserve the current review status and update the new
commit with the correct status indicator.
The " synchronize " event occurs whenever a new commit is pushed to the branch or the branch is rebased . In this case we preserve the current review status and update the new commit with the correct status indicator .
def on_synchronize
    number = @payload["number"]
    repository = @payload["repository"]["full_name"]
    if pr = PullRequest.find_by(number: number, repository: repository)
      pr.update_status
    else
      CreateOrUpdatePullRequest.new.perform(@payload["pull_request"])
    end
  end
def on_synchronize number = @payload [ "number" ] repository = @payload [ "repository" ] [ "full_name" ] if pr = PullRequest . find_by ( number : number , repository : repository ) pr . update_status else CreateOrUpdatePullRequest . new . perform ( @payload [ "pull_request" ] ) end end
The "synchronize" event occurs whenever a new commit is pushed to the branch
or the branch is rebased.
The " synchronize " event occurs whenever a new commit is pushed to the branch or the branch is rebased .