We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7b4e08 commit 72f8d9dCopy full SHA for 72f8d9d
1 file changed
lib/github_api/client/repos/hooks.rb
@@ -52,6 +52,24 @@ def list(*args)
52
end
53
alias :all :list
54
55
+
56
+ # List repository hooks by id
57
+ #
58
+ # @example
59
+ # github = Github.new
60
+ # github.repos.hooks.list 'user-id'
61
+ # github.repos.hooks.list 'user-id' { |hook| ... }
62
63
+ # @api public
64
+ def list_by_id(*args)
65
+ arguments(args, required: [:id])
66
67
+ response = get_request("/repos/#{arguments.id}/hooks", arguments.params)
68
+ return response unless block_given?
69
+ response.each { |el| yield el }
70
+ end
71
+ alias :all :list_by_id
72
73
# Get a single hook
74
#
75
# @example
0 commit comments