@@ 102-108 (lines=7) @@ | ||
99 | return 'hey, I need a username!'; |
|
100 | } |
|
101 | $results = $this->queryGerrit('is:open owner:"' . $username . '" project:' . $project); |
|
102 | if (!empty($results)) { |
|
103 | $listOfItems = ['*Here are the results for ' . $username . '*:']; |
|
104 | foreach ($results as $item) { |
|
105 | $listOfItems[] = $this->buildReviewLine($item); |
|
106 | } |
|
107 | return implode(chr(10), $listOfItems); |
|
108 | } |
|
109 | return $username . ' has no open reviews or username is unknown'; |
|
110 | } |
|
111 | ||
@@ 191-197 (lines=7) @@ | ||
188 | } |
|
189 | ||
190 | $results = $this->queryGerrit('limit:50 ' . $query); |
|
191 | if (!empty($results)) { |
|
192 | $listOfItems = ["*Here are the results for {$query}*:"]; |
|
193 | foreach ($results as $item) { |
|
194 | $listOfItems[] = $this->buildReviewLine($item); |
|
195 | } |
|
196 | return implode(chr(10), $listOfItems); |
|
197 | } |
|
198 | ||
199 | return "{$query} not found, sorry!"; |
|
200 | } |