1
0
mirror of synced 2025-12-23 21:07:12 -05:00
Commit Graph

58 Commits

Author SHA1 Message Date
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
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
Sarah Schneider
aed1f595c6 remove no longer needed test 2022-06-24 13:05:00 -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
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
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
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
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
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
53e3077973 use 302 when redirecting from without language prefix (#23409)
Part of #1312
2021-12-07 14:07:11 +00:00
Matt Pollard
4657a4d3f3 Merge branch 'main' into jules-4795 2021-10-20 15:49:31 +02:00
Peter Bengtsson
4e4ca1d12d gg commit (#22323)
Part of #1061
2021-10-20 09:45:18 -04:00
Matt Pollard
16c8801dbc Merge branch 'main' into jules-4795 2021-10-19 12:26:41 +02:00
Peter Bengtsson
1d72d4c87e use temporary redirect to inject locale prefix (#22239)
* use temporary redirect to inject locale prefix

Fixes #996

* fix routing tests
2021-10-18 20:09:20 +00:00
Peter Bengtsson
c712da8f5d be more conservative with spotting q= in URL (#21945)
* be more conservative with spotting q= in URL

Fixes https://github.com/github/docs-engineering/issues/951

* refactor check

* Update tests/routing/redirects.js

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

Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-10-18 12:04:45 +00:00
Matt Pollard
dfb4d8265e Update hardcoded link 2021-10-11 12:53:18 +02:00
Matt Pollard
307e8094ec Backport updated content from GitHub AE M2 megabranch and version for ghae-next (#21525) 2021-10-04 16:11:57 +00:00
Laura Coursen
b8429d8248 "Authentication" top-level doc set (#21531) 2021-09-21 19:27:08 +00:00
Robert Sese
b9ee89fc46 Add redirects for language-less homepage requests (#20494)
* Redirect homepage to user's language

* Redirect URLs with no language code

* Add leading forward slash

* Revert "Redirect URLs with no language code"

This reverts commit f817ac1136ea0c7e11c4d61327a4445b56a2f5d6.

* Simplify per @zeke

* Add homepage language redirect tests

* Update middleware/redirects/handle-redirects.js

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>

* braces are good

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2021-08-05 21:46:57 +00:00
Kevin Heis
8a56437c93 Pretty format (#20352)
* Update prettier flow to include JS

* Run prettier

* ...run prettier
2021-07-14 14:35:01 -07:00
Kevin Heis
42e785b0a8 Migrate CommonJS to ESM (#20301)
* First run of script

* Get the app running --- ish

* Get NextJS working

* Remove `node:`

* Get more tests passing in unit directory

* Update FailBot test to use nock

* Update test.yml

* Update Dockerfile

* tests/content fixes

* Update page.js

* Update build-changelog.js

* updating tests/routing

* Update orphan-tests.js

* updating tests/rendering

* Update .eslintrc.js

* Update .eslintrc.js

* Install jest/globals

* "linting" tests

* staging update to server.mjs

* Change '.github/allowed-actions.js' to a ESM export

* Lint

* Fixes for the main package.json

* Move Jest to be last in the npm test command so we can pass args

* Just use 'npm run lint' in the npm test command

* update algolia label script

* update openapi script

* update require on openapi

* Update enterprise-algolia-label.js

* forgot JSON.parse

* Update lunr-search-index.js

* Always explicitly include process.cwd() for JSON file reads pathed from project root

* update graphql/update-files.js script

* Update other npm scripts using jest to pass ESM NODE_OPTIONS

* Update check-for-enterprise-issues-by-label.js for ESM

* Update create-enterprise-issue.js for ESM

* Import jest global for browser tests

* Convert 'script/deploy' to ESM

Co-authored-by: Grace Park <gracepark@github.com>
Co-authored-by: James M. Greene <jamesmgreene@github.com>
2021-07-14 13:49:18 -07:00
James M. Greene
2dbae93c53 Try to prevent late/duplicate response errors (#20077)
* Ensure all Express 'next' calls include 'return's

* Add headersSent checks during archived versions flow

* Return a 404 earlier if archived resource fetch fails

* Short-circuit responses for archived stuff

* Be more careful about responding to and short-circuiting after search requests

* Fix tests
2021-06-28 19:31:54 +00:00
Grace Park
06ebe03c9b one more update on createApp change 2021-06-23 11:25:29 -07:00
Grace Park
6c0b43a4bb updating libapp in one script and tests 2021-06-23 10:46:10 -07:00
Emily Gould
1e5372ac79 Move Getting started category to top-level doc set (#20008)
* Move category to top-level doc set

* Move doc set to the top and update short title

* Undo package-lock changes

* updated hardcoded refs in tests

* Update test

* Fix hardcoded link in test

Co-authored-by: Sarah Schneider <sarahs@github.com>
2021-06-18 17:13:04 +00:00
Sarah Edwards
7bb65a6388 Issues etc restructuring (#19506) 2021-05-25 19:00:59 +00:00
Sarah Schneider
5978edb47b remove feature flagged code 2021-05-20 10:01:33 -04:00
Sarah Schneider
e30292c0fd add feature flagged conditionals to tests 2021-05-18 20:44:46 -04:00
Sarah Schneider
a5d52dcef0 Add landing page for GitHub Enterprise (#19041) 2021-05-12 11:55:32 +00:00
mc
8a9683d345 Quickstart guide about issues, pull requests, GitHub Discussions and team discussions (the return) (#18980)
* made a start

* start addressing comments

* simplify, simplify, simplify

* more changes

* rework completely

* tidy up, fix typos

* Update content/github/getting-started-with-github/be-social.md

Co-authored-by: Sarah Edwards <skedwards88@github.com>

* Update content/github/collaborating-with-issues-and-pull-requests/quickstart-for-communicating-on-github.md

Co-authored-by: Sarah Edwards <skedwards88@github.com>

* Update content/github/collaborating-with-issues-and-pull-requests/quickstart-for-communicating-on-github.md

Co-authored-by: Sarah Edwards <skedwards88@github.com>

* Update content/github/collaborating-with-issues-and-pull-requests/quickstart-for-communicating-on-github.md

Co-authored-by: Sarah Edwards <skedwards88@github.com>

* Update content/github/collaborating-with-issues-and-pull-requests/quickstart-for-communicating-on-github.md

Co-authored-by: Sarah Edwards <skedwards88@github.com>

* Apply suggestions from code review

Co-authored-by: Sarah Edwards <skedwards88@github.com>

* address comments

* tidy up

* upcase topic

* add more topics

* use test fixture instead of live content

* Apply suggestions from code review

Co-authored-by: Sarah Edwards <skedwards88@github.com>

* address latest comments

Co-authored-by: Sarah Edwards <skedwards88@github.com>
Co-authored-by: Sarah Schneider <sarahs@github.com>
2021-05-07 08:25:11 +01:00
James M. Greene
6e20ed7927 Implement app clustering (#17752)
* Install throng for easy cluster management
* Extract the Express app construction into its own file
* Switch server.js to use app clustering for deployed environments
* Worker count is based on the lesser of process.env.WEB_CONCURRENCY and the count of CPUs
* Reading clustered output is difficult, let's prefix the std{out,err} streams

Co-authored-by: Jason Etcovitch <jasonetco@github.com>
2021-03-19 20:07:46 +00:00
Sarah Schneider
d3617af76a add test 2021-02-26 13:23:55 -05:00
Sarah Schneider
9809627129 lint 2021-01-14 17:10:12 -05:00