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
Sarah Schneider
7dc8d11fed
reorder imports to be more standard
2022-07-22 12:12:33 -04:00
Sarah Schneider
4cbbf22fbd
Merge branch 'main' of github.com:github/docs-internal into versioned-redirects
2022-07-21 09:04:04 -04:00
Peter Bengtsson
9dce4cd96d
redirect to language url for ghes 3.0 and 3.1 ( #29136 )
...
Co-authored-by: Hector Alfaro <hectorsector@github.com >
2022-07-19 15:22:48 +00:00
Peter Bengtsson
4bff926c7e
inject language for legact admin/release-notes URLs ( #29082 )
2022-07-15 20:28:31 +00:00
Peter Bengtsson
e0a20add31
//en/some/path should redirect to /en/some/path ( #29077 )
...
* //en/some/path should redirect to /en/some/path
* remove debugging
2022-07-15 19:16:42 +00:00
Peter Bengtsson
ef5406ae9a
rest reference redirects with free-pro-team@latest ( #28838 )
2022-06-29 20:42:58 +00:00
Peter Bengtsson
ee1f20f4fb
jest 28.1.1 ( #28797 )
...
* got 28.1.1
* wip
* force upgrade nth-check
* legacyFakeTimers
2022-06-29 11:55:03 +00:00
Sarah Schneider
aed1f595c6
remove no longer needed test
2022-06-24 13:05:00 -04:00
Sarah Schneider
f6f43cd353
make the exceptions redirects function accept filename as a param so we can reuse it
2022-06-24 12:25:37 -04:00
Sarah Schneider
d77727ec7a
re-add exceptions redirects file and handler... we can continue to use these for true exceptions
2022-06-24 12:23:58 -04:00
Sarah Schneider
10b7d41e36
fix conflicts
2022-06-24 09:21:18 -04:00
Kevin Heis
f948c81038
Upgrade got ( #28617 )
...
* Upgrade got
* Update e2etest.js
* Skip following redirects on redirect tests
* Update deprecated-enterprise-versions.js
2022-06-21 16:23:51 +00:00
Robert Sese
beefde480e
Use issues product for homepage redirect tests
2022-06-08 11:37:44 -05:00
Matt Pollard
0984f7dae6
Fix tests
2022-06-08 14:47:15 +02:00
Matt Pollard
e4877b8517
Fix two tests for deleted product
2022-06-08 14:44:13 +02:00
Peter Bengtsson
0504d968c6
stop mocking hydro calls with supertest ( #28179 )
...
* stop mocking hydro calls with supertest
* wip
* fix the tests
* nock.cleanAll()
2022-06-03 15:17:12 +00:00
Peter Bengtsson
d014f36222
fix external redirects ( #28063 )
...
* fix external redirects
* oops
* feedbacked
2022-06-02 02:06:29 +00:00
Peter Bengtsson
75c0ec5cab
/en/ permanent redirects to /en should be CDN cacheable (#27976 )
2022-05-25 13:51:16 +00:00
Sarah Schneider
b2db816d66
update test
2022-04-28 16:27:07 -04:00
Sarah Schneider
1c02d01554
move the redirect exceptions into test fixtures and tests
2022-04-27 17:57:28 -04:00
Grace Park
b98c83e924
REST operations sidebar ( #26225 )
...
* testing out a rest operations sidebar
* cleanup
* renamed 5 files
* renamed 5 files
* set redirect_from on 5 files
* renamed 1 files
* renamed 1 files
* renamed 3 files
* renamed 1 files
* renamed 1 files
* renamed 3 files
* renamed 1 files
* renamed 2 files
* renamed 1 files
* renamed 4 files
* renamed 15 files
* renamed 2 files
* renamed 6 files
* renamed 1 files
* renamed 4 files
* renamed 7 files
* renamed 1 files
* renamed 3 files
* renamed 3 files
* renamed 1 files
* renamed 5 files
* renamed 1 files
* renamed 1 files
* renamed 3 files
* renamed 4 files
* renamed 1 files
* renamed 1 files
* renamed 2 files
* renamed 4 files
* renamed 1 files
* renamed 1 files
* renamed 1 files
* renamed 6 files
* renamed 6 files
* renamed 4 files
* move files
* adding more
* updating to add restcontext and start of removing data/reusables/rest-reference
* removed data/reusables
* add a RestMiniTocItem and updating the filtering to add a subcategory so all manually added H3s are in mini tocs in addition to operations
* remove console log
* [WIP]: REST New Proposal Sidebar (#26471 )
* saving
* update sidebar
* remove console log
* update guides and overview
* import Category for category level rest pages
* update undefined restOperations
* update restOperationData category and subcategory levels"
* minor updates
* update get mini toc items function
* updating REST context for sidebar
* updating rest data
* remove console logs
* WIP: mini-toc-ing the sidebar
Co-authored-by: Robert Sese <rsese@github.com >
* A little cleanup
* Fix first subcategory link and add some comments
* updating anchor links in sidebar
* adding updates
* remove standalone
* update product and maptopic pages using article context
* add conditional link wrapper
* fix sidebar toggle and versions for enterprise admin
* update versions per subcategory
* Highlight sidebar link for current page
* Update miniToc hash links and hash change tracking
* fix unique key in CollapsibleSection
* Fix list markup
* remove title
* update permissions
* Hide minitocs on landing (#26594 )
* hide minitocs on landing page
* simplify page components and remove minitoc from sidebar for guides/overview
* fix carats and category fix
* remove id
Co-authored-by: Grace Park <gracepark@github.com >
* updating content based on versions script check with the OpenAPI
* update script and content files
* update script and content/rest files
* update to add TocLanding
* update script
* update index files
* add codespaces repository-secrets
* remove openapi schema check script
* remove minitocs at the top
* add h2 about the {title} api
* fix tests/unit/openapi-schema.js
* Fix linting tests
* fix search/topics test
* fix tests/unit/pages test
* update rest/reference links in components
* run prettier
* Update components/rest/RestReferencePage.tsx
Co-authored-by: Rachael Sewell <rachmari@github.com >
* Update components/rest/RestReferencePage.tsx
Co-authored-by: Rachael Sewell <rachmari@github.com >
* Update pages/[versionId]/rest/[category]/[subcategory].tsx
Co-authored-by: Rachael Sewell <rachmari@github.com >
* Update pages/[versionId]/rest/[category]/[subcategory].tsx
Co-authored-by: Rachael Sewell <rachmari@github.com >
* Update pages/[versionId]/rest/[category]/[subcategory].tsx
Co-authored-by: Rachael Sewell <rachmari@github.com >
* Update pages/[versionId]/rest/[category]/[subcategory].tsx
Co-authored-by: Rachael Sewell <rachmari@github.com >
* Update tests/unit/openapi-schema.js
Co-authored-by: Rachael Sewell <rachmari@github.com >
* updating comment location
* remove dependabot override
* remove path-utils current product update for rest
* run linter
* remove dependabot.md and remove h2 heading on restreference
* update the correct product to rest for rest pages
* adding comments for updates to path-utils
* remove console log
* REST sidebar: handle legacy v3 redirects (#26686 )
* Add script to handle legacy v3 REST redirects
* Run the script
* Handle a redirect to a redirect
* Update REST test URLs
* 'await' and test runs subcategory of checks
* Update REST URLs for routing/developer-site-redirects tests
* Update developer-redirects fixture with new REST URLs
* Resolve merge conflicts
* Update rest-redirects fixture with new REST URLs
* Fix broken links with REST pages re-org
* redirectTo could be undefined
* Fix script for posterity, can't redirect paths with hashes
* Remove invalid hash redirects
* Typically don't need to save one-off scripts
* Undo redirect changes (not necessary for handling v3 redirects)
* Remove script-added redirects
* Update old v3 redirects with new REST URLs
* No more GHES search indexing page
* 'org' not 'organization'
* Update fixture data for new REST URLs
* revert any content directory changes
Co-authored-by: Grace Park <gracepark@github.com >
Co-authored-by: Rachael Sewell <rachmari@github.com >
* Adding test rest (#26750 )
* add test to check openapi schema versions and content rest frontmatter versions
* update lib/redirects
* fix test and add error messages
* adding repository secrets
* adding repository-secrets.md
* Revert "update lib/redirects"
This reverts commit 3aafe28265764d5bc09c0c478c8e0ca099c8fbcf.
* remove lib/redirects changes and console logs
* Update lib/rest/index.js
Co-authored-by: Rachael Sewell <rachmari@github.com >
* update unique key
* Rest client side redirects (#26754 )
* adding tags subcategory for the rest content repos category
* run prettier
* bug fix for anchor scrolls" (#26892 )
* updating width size for rest reference page
* Rest sidebar consolidation (#26862 )
* refactor sidebar
* fix articlecontext provider issue on rest product landing page for all versions
* fix a bug, create new component
* revert change to create new component and fix bug
Co-authored-by: Rachael Sewell <rachmari@github.com >
* Set currentAnchor with a hashchange handler (#26923 )
* Rest sidebar design tweaks (#26807 )
* Rest sidebar design tweaks
* tweak color to subtle
* use muted color and margin for line
* update to design feedback
Co-authored-by: Grace Park <gracepark@github.com >
* Remove cheerio from rest-collapsible (#26948 )
* remove cheerio from rest-collapsible
* update type
* adding endswith instead
* use productId instead
* one off edge case for secret-scanning
* Reorganize subcategory and category, Update pre -> div, Add RestContext (#26950 )
* reorganize subcategory and category
* add RestContext
* update comment
* update for endpoints page
* add comment
* move object to restcontext
* remove effectiveDate in restcontext
* remove width calculation for rest reference page
* fix adding manual writer's minitocs to sidebar
* update with feedback
* update comment
* update isRestReferencePage
* remove page component and fix bug
* adding back rest/index.tsx
Co-authored-by: Rachael Sewell <rachmari@github.com >
* update content/rest"
* add back design tweak
* update to div
* update margins on rest api reference
* remove page component
* adding tests
* separate product from rest sidebar (#27065 )
* separate product from rest sidebar
* Use ProductCollapsibleSections for product pages
* fix tests
Co-authored-by: Robert Sese <rsese@github.com >
Co-authored-by: Grace Park <gracepark@github.com >
* Rest sidebar translations (#27052 )
* update translations
* remove general test
Co-authored-by: Robert Sese <rsese@github.com >
Co-authored-by: Rachael Sewell <rachmari@github.com >
2022-04-20 10:19:48 -07:00
Peter Bengtsson
8362602503
do rendering end-to-end tests with a real server ( #26169 )
...
* reinstate
* start server manually
* routing tests too
* skip more
* sleep more and fail if not 200
* use e2etest for content/ too
* feedbacked
2022-03-18 17:06:12 -04:00
Peter Bengtsson
fcda086e13
make enterprise 3.0 redirects work ( #26041 )
...
* make enterprise 3.0 redirects work
* improve tests and better variable name
2022-03-09 16:32:05 +00:00
Peter Bengtsson
9d4b913bdc
language redirects without cache ( #25872 )
...
* redirect to your preferred language (#25664 )
* redirect to your preferred language
* refactorings
* use js-cookies
* make sure no cache when language is involved in the redirect
* fix tests
2022-03-07 16:25:22 +00:00
Peter Bengtsson
881a6d2212
Revert "redirect to your preferred language ( #25664 )" ( #25869 )
...
This reverts commit a9947c086c .
2022-03-04 21:56:57 +00:00
Peter Bengtsson
a9947c086c
redirect to your preferred language ( #25664 )
...
* redirect to your preferred language
* refactorings
* use js-cookies
2022-03-04 16:29:11 +00:00
Robert Sese
79c48070c4
Deprecate 3.0 ( #25646 )
...
* Deprecate 3.0
* 3.0 deprecation: remove 3.0 markup (#25647 )
* Remove liquid conditionals and content for 3.0 deprecation
* Remove manually, no longer versioned in a supported version
* Remove translations manually, no longer versioned in a supported version
* Remove 'if', now in all supported versions
* Remove dangling 'elseif', now in all supported versions
* Remove dangling 'elseif' and 3.0 screenshot reference, now in all supported versions
* Nudge to latest supported GHES version
* Nudge to latest supported release GHES version
* Bump all the version for the liquid tests
* Bump first deprecated version for linting tests
* Prefer double quotes
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Prefer double quotes
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Prefer double quotes
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Prefer double quotes
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Prefer double quotes
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Prefer double quotes
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Prefer double quotes
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Prefer double quotes
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Prefer double quotes
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Remove extra newline
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Remove extra newline
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Remove extra newline
Co-authored-by: Laura Coursen <lecoursen@github.com >
* One reusable per line
Co-authored-by: Laura Coursen <lecoursen@github.com >
* One reusable per line
Co-authored-by: Laura Coursen <lecoursen@github.com >
* One reusable per line
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Version check not needed anymore
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Version check not needed anymore
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Version check not needed anymore
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Version check not needed anymore
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Version check not needed anymore
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Version check not needed anymore
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Version check not needed anymore
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Stray whitespace ✂️
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Stray whitespace ✂️
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Stray whitespace ✂️
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Stray whitespace ✂️
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Stray whitespace ✂️
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Stray whitespace ✂️
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Stray whitespace ✂️
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Stray whitespace ✂️
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Version check not needed anymore
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Version check not needed anymore
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Just 'ghes' since we're deprecating 3.0
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Just 'ghes' since we're deprecating 3.0
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Just 'ghes' since we're deprecating 3.0
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Just 'ghes' since we're deprecating 3.0
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Just 'ghes' since we're deprecating 3.0
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Just 'ghes' since we're deprecating 3.0
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Just 'ghes' since we're deprecating 3.0
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Just 'ghes' since we're deprecating 3.0
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Don't depend on hardcoded versions
Co-authored-by: Laura Coursen <lecoursen@github.com >
* Remove static files for 3.0 deprecation (#25649 )
Co-authored-by: Laura Coursen <lecoursen@github.com >
2022-03-03 13:08:24 -06:00
Peter Bengtsson
d0524e5124
make sure req.ip becomes correct ( #25628 )
...
* make sure req.ip becomes correct
* feedbacked
2022-02-24 17:54:09 +00:00
Peter Bengtsson
c976b9da6a
formate /_ip with JSON instead ( #25574 )
2022-02-23 17:58:39 +00:00
Peter Bengtsson
177e197d8d
soft rate limit all requests ( #25556 )
...
* rate limit all requests
* set IP in tags to statsd
* expose _ip route for assuring we get the right IP
* remove old unit test
* nit
2022-02-23 16:46:29 +00:00
Peter Bengtsson
0d01c5b7b6
refactor developer-site-redirects test code ( #25376 )
2022-02-15 21:22:50 +00:00
Grace Park
d3cb224cc9
Testing moving the setTimeout outside describe block ( #25362 )
...
* testing moving the setTimeout outside describe block
* Revert "testing moving the setTimeout outside describe block"
This reverts commit 60ddb42ce6f27b729f4db70d2dece39b1d71d59a.
* update setTimeout
* increase timeout
* move settimeout
2022-02-15 20:38:46 +00:00
Peter Bengtsson
07c8fc3c2a
Decouple redirects from language ( #24597 )
...
* experimenting with redirects
* cleanup developer.json
* wip
* clean console.log
* progress
* some progress
* progress
* much progress
* debugging tests
* hacky progress
* ditch latest -> number redirects
* minor
* hacky progress
* lots of progress
* some small fixes
* fix rendering tests
* small fixes
* progress
* undo debugging
* better
* routing tests OK
* more cleaning
* unit tests
* undoing lineending edit
* undoing temporary debugging
* don't ever set this.redirects on Page
* cope with archived version redirects
* adding code comments on the major if statements
* address all feedback
* update README about redirects
* delete invalid test
* fix feedback
2022-02-14 20:19:10 +00:00
Peter Bengtsson
b381520839
don't overload the eventloop ( #25344 )
...
* don't overload the eventloop
* adding comment
2022-02-14 20:04:37 +00:00
Mike Surowiec
2be0c5e09b
Remove help-to-docs redirect; it's handled by fastly now ( #24870 )
2022-02-01 15:49:08 +00:00
Peter Bengtsson
98491c759f
hardcode popular redirect tests ( #24602 )
...
* hardcode popular redirect tests
* don't follow redirects
* 302 beacause it inject /en
* 60x longer timeout
2022-01-25 16:16:24 +00:00
Jules Parker
e20f8548cf
fixes conflict
2022-01-25 12:43:09 +01:00
Peter Bengtsson
c42823af9d
use 302 when redirecting from enterprise-server@latest to enterprise-server@<version> ( #24494 )
...
* use 302 when redirecting from enterprise-server@latest to enterprise-server@<version>
* correct tests
2022-01-21 17:10:09 +00:00
Laura Coursen
baec362248
Reframe the GitHub Connect docs ( #24146 )
2022-01-20 15:39:16 -06:00
Jules Parker
70342a38bd
fixes tests
2022-01-13 15:26:00 +01:00
Jules Parker
d1ace77811
fixes tests
2022-01-13 15:08:29 +01:00
Jules Parker
39e8de7076
fixes tests
2022-01-13 14:27:26 +01:00
Jules Parker
74774e1674
fixes tests
2022-01-13 13:20:10 +01:00
Peter Bengtsson
9782b804a0
refactor redirecting specifically for the old query string key ( #23749 )
...
* refactor redirecting specifically for the old query string key
* fix tests
2021-12-16 13:09:37 +00:00
Peter Bengtsson
7b5711e095
cache archived enterproxy proxy responses much longer ( #23456 )
...
* cache archived enterproxy proxy responses much longer
* Update middleware/archived-enterprise-versions.js
Co-authored-by: Rachael Sewell <rachmari@github.com >
Co-authored-by: Rachael Sewell <rachmari@github.com >
2021-12-08 19:55:12 +00:00
Peter Bengtsson
53e3077973
use 302 when redirecting from without language prefix ( #23409 )
...
Part of #1312
2021-12-07 14:07:11 +00:00
Matt Pollard
b3e1ff4e89
Update documentation for GitHub AE's December 2021 release ( #23405 )
2021-12-07 10:36:37 +01:00
Kevin Heis
fae539f9c9
Update release-notes.js
2021-12-03 12:48:39 -08:00