Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitbucket deprecated its API v1.0: update all endpoints to API v2.0 #348

Merged
merged 2 commits into from
Jul 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/pronto/clients/bitbucket_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def pull_comments(slug, pull_id)
end

def pull_requests(slug)
response = get("#{pull_request_api(slug)}/pullrequests?state=OPEN")
response = get("/#{slug}/pullrequests?state=OPEN")
openstruct(response['values'])
end

Expand All @@ -30,11 +30,11 @@ def create_pull_comment(slug, pull_id, body, path, position)
end

def approve_pull_request(slug, pull_id)
self.class.post("#{slug}/pullrequests/#{pull_id}/approve")
self.class.post("/#{slug}/pullrequests/#{pull_id}/approve")
end

def unapprove_pull_request(slug, pull_id)
self.class.delete("#{slug}/pullrequests/#{pull_id}/approve")
self.class.delete("/#{slug}/pullrequests/#{pull_id}/approve")
end

private
Expand Down