File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -151,17 +151,18 @@ def self.private_repo?(full_name)
151
151
def self . search_query_string ( *main_params , **qualifiers )
152
152
params = main_params
153
153
154
- if ( args = qualifiers . fetch ( :args , nil ) )
155
- params << if args . from && args . to
156
- "created:#{ args . from } ..#{ args . to } "
157
- elsif args . from
158
- "created:>=#{ args . from } "
159
- elsif args . to
160
- "created:<=#{ args . to } "
161
- end
154
+ from = qualifiers . fetch ( :from , nil )
155
+ to = qualifiers . fetch ( :to , nil )
156
+
157
+ params << if from && to
158
+ "created:#{ from } ..#{ to } "
159
+ elsif from
160
+ "created:>=#{ from } "
161
+ elsif to
162
+ "created:<=#{ to } "
162
163
end
163
164
164
- params += qualifiers . except ( :args ) . flat_map do |key , value |
165
+ params += qualifiers . except ( :args , :from , :to ) . flat_map do |key , value |
165
166
Array ( value ) . map { |v | "#{ key . to_s . tr ( "_" , "-" ) } :#{ v } " }
166
167
end
167
168
You can’t perform that action at this time.
0 commit comments