1
0
mirror of synced 2025-12-23 03:44:00 -05:00
Commit Graph

32 Commits

Author SHA1 Message Date
Peter Bengtsson
46764a165d api/search/v1 should always return a string for breadcrumbs (#31953) 2022-10-21 16:41:39 +00:00
Peter Bengtsson
3ce69524dc set requestTimeout to 500ms for ES queries (#31929) 2022-10-20 20:31:23 +00:00
Kevin Heis
d6e1a66519 Fix code scanning alert (#31914) 2022-10-20 17:21:29 +00:00
Peter Bengtsson
bf870f2960 render a slim 404 message on /api/* (#31818) 2022-10-18 17:19:06 +00:00
Peter Bengtsson
098fb105b2 support filters in api/search/legacy (#31616) 2022-10-12 00:26:18 +00:00
Peter Bengtsson
cfe8b3a139 record timings from within getSearchResults (#31448) 2022-10-05 17:27:59 +00:00
Peter Bengtsson
ef5b9d5f07 proxy /api/search/* to docs.github.com (#31281) 2022-09-29 21:50:38 +00:00
Peter Bengtsson
70f750c8dd create new error if es fails in any way (#31232) 2022-09-28 16:53:07 +00:00
Peter Bengtsson
c3beb974d3 failed to Failbot send on /api/search/legacy (#31047) 2022-09-22 16:09:20 -04:00
Peter Bengtsson
b97fa9d2b9 fix TypeError in /api/search/legacy (#31049)
Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-09-22 19:38:29 +00:00
Peter Bengtsson
dcba53d185 include indexName in api.search statsd timer (#31037) 2022-09-22 13:03:21 -04:00
Peter Bengtsson
d7d6d3c9a8 send statd timers on ES searches (#31008) 2022-09-21 14:19:39 -04:00
Peter Bengtsson
a179364cda favor more exact spelling searches (#30741) 2022-09-13 18:59:14 +00:00
Kevin Heis
7523a7c460 Prep for ts-node (#30587) 2022-09-08 15:45:13 +00:00
Peter Bengtsson
2a10a8b4cd don't fail in FailBot in search API if nothing to report (#30546) 2022-09-06 20:27:18 +00:00
Peter Bengtsson
8fbb3d0cb1 don't let 4xx errors propagate up from es-search (#30495) 2022-09-06 12:00:31 +00:00
Peter Bengtsson
54991f70c9 connect to ES 7.11 (#30462)
Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-09-06 11:50:40 +00:00
Peter Bengtsson
d977d39536 use prefix for ES indexes for tests (#30288)
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2022-08-26 21:10:30 +00:00
Peter Bengtsson
ec302a668d simplify and improve default cache-control headers (#30162)
simply and perfect cache-control headers
2022-08-22 19:57:42 +00:00
Peter Bengtsson
fe80f4ae4d suppress es-search if ELASTICSEARCH_URL isn't configured (#30096)
* suppress es-search if ELASTICSEARCH_URL isn't configured

* simplify

* simple 500 error instead
2022-08-19 20:54:37 +00:00
Peter Bengtsson
8765c628ff dedicated search results page (redux) (#29902)
* dedicated search results page (redux)

* Update SearchResults.tsx

* adding pagination

* fix pagination

* say something on NoQuery

* better Flash

* tidying link

* small fixes for results

* debug info

* l18n the meta info

* inDebugMode

* basic jest rendering of the skeleton page

* basic jest rendering test

* fix content tests

* better document title

* fix tests

* quote query in page title

* use home page sidebar

* something when nothing is found

* parseInt no longer needs the 10

* fix linting tests

* fix test

* prettier

* Update pages/search.tsx

Co-authored-by: Rachael Sewell <rachmari@github.com>

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-08-19 13:36:55 +00:00
Kevin Heis
688a274f1f Remove CSRF check (#29910)
* Use color_mode for gating "sign up" button

* Remove csrf check

* Add `res.removeHeader('set-cookie')` to cache-control

* Update static-assets.js

* Remove package

* Remove tough-cookie

* Update cache-control.js

* Update cache-control.js

* Update cache-control.js
2022-08-15 19:28:42 +00:00
Kevin Heis
ca61b3465a Use color_mode for gating "sign up" button (#29901)
* Use color_mode for gating "sign up" button

* Update useHasAccount.ts

* Update useHasAccount.ts

* Update useHasAccount.ts
2022-08-12 18:18:58 +00:00
Peter Bengtsson
126b0a9f44 find hyphenated words better (#29864)
* find hyphenated words better

* consistent about boost constants
2022-08-11 20:49:26 +00:00
Kevin Heis
101e7155c8 userLanguage in browser instead of XHR (#29782)
* userLanguage in browser instead of XHR

* refactors on pr 29782 (#29798)

Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-08-10 15:28:21 +00:00
Kevin Heis
04f38e4779 Parse color_mode cookie in browser (#29738)
* Parse color_mode cookie in browser

* Update useTheme.ts

* Update use-theme.js

* Update use-theme.js

* Add support for dark_high_contrast

Per https://primer.style/css/support/theming

I also checked all the color mode options, this is the only additional working with Primer 20 so far

* Remove gray bg

* Remove  type

* Use defaults instead of types for fn args

* Thicker types
2022-08-09 16:48:18 +00:00
Peter Bengtsson
a1e3866fa5 don't get available languages from session (#29715)
* don't get available languages from session

* update useSession

* one more fix
2022-08-08 11:13:27 -04:00
Peter Bengtsson
f8f20605f4 search api with elasticsearch (#29053)
* indexing records into Elasticsearch

* @elastic/elasticsearch@8.2.0

* mv

* fix the code

* pipe

* lfs

* use sha

* change how index names work

* search api with Elasticsearch

* works

* refactor client

* better snowballing

* remove dbg

* wip

* highlights and fuzzy search

* improvements and upgrade

* also upgrade

* wip

* index more explicitly

* better validation

* change max size

* popularity by ordinal ranking instead

* playing

* fix package-lock

* rearranging

* catchMiddlewareError

* fix indexing

* match_phrase_prefix on wrapped search

* refactorings

* escape html in content

* wip

* search by URL

* update lock file

* v1 api

* inroads on jest testing the search

* valid yaml hopefully

* index fixtures into local elasticsearch

* specific versions to index only

* small fixes

* feedbacked

* fix tests

* use the npm script
2022-08-05 19:40:38 +00:00
Kevin Heis
11267f2404 Explicitly no cache on /api/events (#29549) 2022-08-02 18:22:17 +00:00
Kevin Heis
0886faddac Move language context to browser/session (#29433) 2022-07-28 18:50:46 +00:00
Kevin Heis
bb3cb78dd1 Move events under api (#29298) 2022-07-26 18:00:58 +00:00
Kevin Heis
564e3a5e2a Move CSRF response back to XHR (Node.js prep) (#29179)
* Move CSRF response back to XHR

* Update events.js

* Pass through cookieJar

* Enable session route test

* Skip next x csrf test

* Add other fields to endpoint for future issues

* Remove client side parts

* Revert test skip

* Use nested router pattern

* ugh forgot a file

* Update naming

* Update tests/rendering/session.js

Co-authored-by: Peter Bengtsson <peterbe@github.com>

* Updating to use cache control

* Use req.langauge and req.userLanguage

Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-07-22 18:17:22 +00:00