Skip to content

Commit 26603fb

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent b40ad23 commit 26603fb

File tree

2 files changed

+26
-11
lines changed

2 files changed

+26
-11
lines changed

content/v3/search.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,16 @@ Find file contents via various criteria. (This method returns up to 100 results
126126

127127
GET /search/code
128128

129+
### Considerations for code search
130+
131+
Due to the complexity of searching code, there are a few restrictions on how searches are performed:
132+
133+
<ul>
134+
<li>Only the _default branch_ is considered. In most cases, this will be the `master` branch.</li>
135+
<li>Only files smaller than 200 KB are searchable.</li>
136+
<li class='not-enterprise'> You must always include at least one search term when searching source code. For example, searching for <a href="https://github.com/search?utf8=✓&q=language%3Ago&type=Code"><code>language:go</code></a> is not valid, while <a href="https://github.com/search?utf8=✓&q=amazing+language%3Ago&type=Code"><code>amazing language:go</code></a> is.</li>
137+
</ul>
138+
129139
### Parameters
130140

131141
Name | Type | Description
@@ -217,34 +227,36 @@ The `q` search term can also contain any combination of the supported issue sear
217227
Qualifies which fields are searched. With this qualifier you can restrict the
218228
search to just the title, body, comments, or any combination of these.
219229
* [`author`](https://help.github.com/articles/searching-issues#search-by-the-author-of-an-issue-or-pull-request)
220-
Finds issues created by a certain user.
230+
Finds issues or pull requests created by a certain user.
221231
* [`assignee`](https://help.github.com/articles/searching-issues#search-by-the-assignee-of-an-issue-or-pull-request)
222-
Finds issues that are assigned to a certain user.
232+
Finds issues or pull requests that are assigned to a certain user.
223233
* [`mentions`](https://help.github.com/articles/searching-issues#search-by-a-mentioned-user-within-an-issue-or-pull-request)
224-
Finds issues that mention a certain user.
234+
Finds issues or pull requests that mention a certain user.
225235
* [`commenter`](https://help.github.com/articles/searching-issues#search-by-a-commenter-within-an-issue-or-pull-request)
226-
Finds issues that a certain user commented on.
236+
Finds issues or pull requests that a certain user commented on.
227237
* [`involves`](https://help.github.com/articles/searching-issues#search-by-a-user-thats-involved-within-an-issue-or-pull-request)
228-
Finds issues that were either created by a certain user, assigned to that
238+
Finds issues or pull requests that were either created by a certain user, assigned to that
229239
user, mention that user, or were commented on by that user.
240+
* [`team`](https://help.github.com/articles/searching-issues/#search-by-a-team-thats-mentioned-within-an-issue-or-pull-request)
241+
For organizations you're a member of, finds issues or pull requests that @mention a team within the organization.
230242
* [`state`](https://help.github.com/articles/searching-issues#search-based-on-whether-an-issue-or-pull-request-is-open)
231-
Filter issues based on whether they're open or closed.
243+
Filter issues or pull requests based on whether they're open or closed.
232244
* [`labels`](https://help.github.com/articles/searching-issues#search-by-the-labels-on-an-issue)
233-
Filters issues based on their labels.
245+
Filters issues or pull requests based on their labels.
234246
* [`no`](https://help.github.com/articles/searching-issues#search-by-missing-metadata-on-an-issue-or-pull-request)
235247
Filters items missing certain metadata, such as `label`, `milestone`, or `assignee`
236248
* [`language`](https://help.github.com/articles/searching-issues#search-by-the-main-language-of-a-repository)
237-
Searches for issues within repositories that match a certain language.
249+
Searches for issues or pull requests within repositories that match a certain language.
238250
* [`is`](https://help.github.com/articles/searching-issues#search-based-on-the-state-of-an-issue-or-pull-request)
239251
Searches for items within repositories that match a certain state, such as `open`, `closed`, or `merged`
240252
* [`created` or `updated`](https://help.github.com/articles/searching-issues#search-based-on-when-an-issue-or-pull-request-was-created-or-last-updated)
241-
Filters issues based on date of creation, or when they were last updated.
253+
Filters issues or pull requests based on date of creation, or when they were last updated.
242254
* [`merged`](https://help.github.com/articles/searching-issues#search-based-on-when-a-pull-request-was-merged)
243255
Filters pull requests based on the date when they were merged.
244256
* [`closed`](https://help.github.com/articles/searching-issues#search-based-on-when-an-issue-or-pull-request-was-closed)
245-
Filters issues based on the date when they were closed.
257+
Filters issues or pull requests based on the date when they were closed.
246258
* [`comments`](https://help.github.com/articles/searching-issues#search-by-the-number-of-comments-an-issue-or-pull-request-has)
247-
Filters issues based on the quantity of comments.
259+
Filters issues or pull requests based on the quantity of comments.
248260
* [`user` or `repo`](https://help.github.com/articles/searching-issues#search-within-a-users-or-organizations-repositories)
249261
Limits searches to a specific user or repository.
250262

script/enterprise-cutter

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ begin
3939
doc.css('img').each do |img|
4040
img['src'] = "/enterprise/#{version}#{img['src']}" if img['src'] =~ /^\//
4141
end
42+
doc.css('.not-enterprise').each do |non_ent|
43+
non_ent.remove
44+
end
4245
File.open(html_file, 'w') { |file| file.write(doc.to_html) }
4346
end
4447

0 commit comments

Comments
 (0)