Skip to content
Snippets Groups Projects
Unverified Commit 48c0c673 authored by Mike McQuaid's avatar Mike McQuaid
Browse files

Fix GitHub search behaviour change

Handle the case where paths are now returned with preceding `/`.
parent 4067b4d9
Branches
Tags
No related merge requests found
......@@ -312,7 +312,14 @@ module GitHub
end
def search_code(**qualifiers)
search("code", **qualifiers)
matches = search("code", **qualifiers)
return matches if matches.blank?
matches.map do |match|
# .sub workaround for GitHub returning preceding /
match["path"] = match["path"].sub(%r{^/}, "")
match
end
end
def issues_for_formula(name, tap: CoreTap.instance, tap_full_name: tap.full_name, state: nil)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment