1
0
mirror of synced 2025-12-22 11:26:57 -05:00
Commit Graph

52 Commits

Author SHA1 Message Date
Peter Bengtsson
2ec905fc77 trailingCommas:all on prettier (#38888) 2023-07-11 11:44:52 +00:00
Kevin Heis
ac38ab609e Import from the src directory in Node using #src (#37578) 2023-06-05 21:44:20 +00:00
Kevin Heis
f806ee7012 Move more files into src/webhooks (#36578) 2023-05-10 18:54:56 +00:00
Peter Bengtsson
23df17db4b pageinfo API (#36541) 2023-04-21 15:05:53 +00:00
Kevin Heis
68e29e17f6 Move search files to src (#35822)
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2023-04-03 17:14:26 +00:00
Rachael Sewell
e830ddd715 move rest api tests and code to feature folder (#36044) 2023-03-30 21:57:14 +00:00
Kevin Heis
0c67aadebc Move events into subject folder (#35262) 2023-03-14 15:53:42 +00:00
Peter Bengtsson
fc63361276 Be gone old api/search/legacy (#34839) 2023-02-16 16:26:13 +00:00
Peter Bengtsson
909b405054 Optionally return 'intro' in v1 search API (#34754) 2023-02-15 15:48:38 +00:00
Rachael Sewell
6ab083d643 Reorganize REST code (#34323) 2023-02-14 02:13:21 +00:00
Grace Park
ef2efb0636 Feature Branch: Global Nav Phase 1 (#33465)
Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com>
Co-authored-by: Joe Oak <41307427+joeoak@users.noreply.github.com>
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2023-01-31 17:49:50 +00:00
Peter Bengtsson
b83009ce59 max 10 pages of pagination on dedicated search page (#33915) 2023-01-12 20:18:29 +00:00
Kevin Heis
e791da01a6 Remove cacheControlFactory export (#33255) 2022-12-06 20:26:36 +00:00
Kevin Heis
f161f86ca1 Combine cache control (#33067) 2022-11-30 00:04:34 +00:00
Peter Bengtsson
f189f9d900 custom Fastly surrogate key for api search (#32536) 2022-11-21 12:34:06 +00:00
Robert Sese
b2e5d14036 Automate + Reactify webhooks page (#29534)
Co-authored-by: Rachael Sewell <rachmari@github.com>
Co-authored-by: Peter Bengtsson <mail@peterbe.com>
Co-authored-by: Joe Oak <41307427+joeoak@users.noreply.github.com>
Co-authored-by: Sarah Edwards <skedwards88@github.com>
Co-authored-by: Grace Park <gracepark@github.com>
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-11-15 22:12:16 +00:00
Peter Bengtsson
2f66514571 make highlighting fields configurable (#32328) 2022-11-14 12:46:36 +00:00
Peter Bengtsson
401d9696a6 use /api/search/v1 in Search.tsx (#31952) 2022-11-14 12:34:21 +00:00
Peter Bengtsson
7d20d59baa improve autocomplete searches (#32173) 2022-11-01 20:42:18 +00:00
Peter Bengtsson
86e2a32051 double the requestTimeout to Elasticsearch (#32205) 2022-11-01 18:06:42 +00:00
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