We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8cb17f5 commit 6d15030Copy full SHA for 6d15030
1 file changed
lib/github_api/client/git_data/references.rb
@@ -35,8 +35,8 @@ def list(*args)
35
repo = arguments.repo
36
37
response = if (ref = params.delete('ref'))
38
- validate_reference ref
39
- get_request("/repos/#{user}/#{repo}/git/refs/#{ref}", params)
+ formatted_ref = validate_reference ref
+ get_request("/repos/#{user}/#{repo}/git/#{formatted_ref}", params)
40
else
41
get_request("/repos/#{user}/#{repo}/git/refs", params)
42
end
@@ -143,6 +143,8 @@ def validate_reference(ref)
143
unless VALID_REF_PARAM_VALUES['ref'] =~ refs
144
raise ArgumentError, "Provided 'reference' is invalid"
145
146
+
147
+ refs
148
149
end # GitData::References
150
end # Github
0 commit comments