Skip to content

Commit 189dca8

Browse files
author
Kyle Rames
authored
Merge pull request #17 from codeship/webhook-page-len
update list webhooks to a page length of 100
2 parents 4d99286 + cea45f7 commit 189dca8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/bitbucket_rest_api/repos/webhooks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def list(user_name_or_project_key, repo_name)
5151
url = if BitBucket.options[:bitbucket_server]
5252
"/1.0/projects/#{user_name_or_project_key}/repos/#{repo_name}/webhooks"
5353
else
54-
"/2.0/repositories/#{user_name_or_project_key}/#{repo_name}/hooks"
54+
"/2.0/repositories/#{user_name_or_project_key}/#{repo_name}/hooks?pagelen=100"
5555
end
5656

5757
get_request(url)

spec/bitbucket_rest_api/repos/webhooks_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
it 'makes a GET request for all the webhooks beloning to the given repo' do
128128
expect(subject).to receive(:request).with(
129129
:get,
130-
'/2.0/repositories/mock_username/mock_repo/hooks',
130+
'/2.0/repositories/mock_username/mock_repo/hooks?pagelen=100',
131131
{},
132132
{}
133133
)

0 commit comments

Comments
 (0)