class Dependabot::Clients::Bitbucket

def decline_pull_request(repo, pr_id, comment = nil)

def decline_pull_request(repo, pr_id, comment = nil)
  # https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/
  decline_path = "#{repo}/pullrequests/#{pr_id}/decline"
  post(base_url + decline_path, "")
  comment = "Dependabot declined the pull request." if comment.nil?
  content = {
    content: {
      raw: comment
    }
  }
  comment_path = "#{repo}/pullrequests/#{pr_id}/comments"
  post(base_url + comment_path, content.to_json)
end