Граф коммитов

743 Коммитов

Автор SHA1 Сообщение Дата
Peter Bengtsson 2f4af03975
be loud about failed learning track processing (#25370)
* be loud about failed learning track processing

* rendering test

* undo whitespace cleanup
2022-02-15 20:14:13 +00:00
Peter Bengtsson c9aa9edeeb
make supertest wrappers less weird (#25347) 2022-02-14 21:58:25 +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
Peter Bengtsson caf0791694
support archived enterprise assets (#25224)
* support archived enterprise assets

* better tests
2022-02-11 15:58:05 -05:00
Mike Surowiec 624581e527
Remove most of Heroku references (#25208)
* remove most of heroku references

* remove more stuff

* update codeowners
2022-02-10 17:36:07 -06:00
Peter Bengtsson 24d3ea6814
remove catch-bad-accept-language middleware (#25231) 2022-02-10 18:51:30 +00:00
Peter Bengtsson 5c9a83be7c
Stop doing Gzip in the middleware (#25227) 2022-02-10 11:01:56 -05:00
Peter Bengtsson e535e52280
minimize caching on static asset 404s (#25192) 2022-02-09 20:03:15 +00:00
Peter Bengtsson a1c78717d5
cache the search API (#25068)
* cache the search API

* extend tests
2022-02-09 17:21:49 +00:00
Peter Bengtsson 987fef9315
correct how legacy enterprise links are rewritten (#25183)
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
2022-02-09 16:09:42 +00:00
Peter Bengtsson 94d976c1fa
faster 404 for missing static assets (#25124) 2022-02-08 18:30:07 +00:00
Peter Bengtsson 2599d72116
conditionally clone docs-early-access by branchname (#24674)
* conditionally clone docs-early-access by branchname

* fix path

* right api

* the correct use of Octokit

* try that

* destructuring total_count

* test early access with fs.existsSync

* debugging

* bad lookup

* better lookup technique

* trying something

* always check it out

* with debugging

* with token

* with path

* better

* go for it

* only on docs-internal

* better name

* formatting

* tidying up

* correct octokit

* feedbacked

* correct hopefully

* final version

* disable test that checks for perfect translation-to-English file parity

* Accidentally committed in the wrong branch.

This reverts commit adee780718ea7414934e2257d17b0c004bd804af.

* match the azure-preview-env-deploy.yml
2022-02-08 17:20:51 +00:00
Peter Bengtsson a0af48149e
delete old deploy.js script (#24862) 2022-02-08 16:11:11 +00:00
Peter Bengtsson ac30f9297c
basic tests of the search API (#25069)
* basic tests of the search API

* lfs
2022-02-07 17:11:08 +00:00
Peter Bengtsson cc44b2725e
an empty 'product', 'permissions', or 'learningTracks' gets stuck (#25070)
* and empty 'this.product' gets stuck

* add test to prove change
2022-02-07 16:08:51 +00:00
Peter Bengtsson f33ab1cf89
set 'manul-purge' surrogate key on assets/cb- URLs (#25028) 2022-02-04 11:55:40 -05:00
Peter Bengtsson 14ca55f670
cope with possible translation drift (#24842)
* cope with possible translation drift

* fix test

* don't shallow clone

* fix unit tests

* update code comments

* more code comment corrections

* more code comment

* feedbacked
2022-02-04 14:31:56 +00:00
Peter Bengtsson cc79340595
cache individual renderContent instead of page.render (#24955)
* cache individual renderContent() instead of page.render()

* remove commented code

* unbreak unit tests
2022-02-03 16:56:05 +00:00
Robert Sese c5f9788223
Version the 'All products' link (#24972)
* Don't show link no matter what version you're on

* Maintain current version in link

* No 'All products' link on homepage for all versions
2022-02-03 16:31:05 +00:00
Lucas Costi a7860a720f
Change code-example test to not use Actions (#24979)
* Change code-example test to not use Actions

* Use discussions instead

* Use code-security, but make the 'more' test not an exact number

* Removed references to actions/code-examples.yml

* Update tests/browser/browser.js

Co-authored-by: Robert Sese <robert.sese@gmail.com>

Co-authored-by: Martin Lopes <martin389@github.com>
Co-authored-by: Robert Sese <robert.sese@gmail.com>
2022-02-02 22:32:39 -06:00
Peter Bengtsson 6361591c45
serve a /favicon.ico (#24935)
* serve a /favicon.ico

* fix exception

* avoid res.sendFile() bcause CodeQL is worried
2022-02-03 00:11:59 +00:00
Ivy Alexander 9e30bf18f8
Merge branch 'main' into ivyharriet-jules-p-dev-docset 2022-02-02 09:13:42 +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
Jules Parker 75d1a1ed10 fixes test, potentially 2022-02-01 16:45:57 +01:00
Peter Bengtsson 7acccdac9b
load webhook versions at runtime instead of import-time (#24788)
* load webhook versions at runtime instead of import-time

* fix tests
2022-01-28 18:27:00 +00:00
Peter Bengtsson 9a3adcff9c
lazy highlight json examples on Webhooks page (#24785)
* lazy-highlight JSON examples on Webhooks page

* it works

* using intersectionobserver

* explain in  formatAsJsonCodeBlock

* fix tests
2022-01-28 12:20:56 -05:00
Peter Bengtsson fa00513864
test that youtube embeds work (#24726)
* test that YouTube embeds work

* tidying
2022-01-27 17:18:33 +00:00
Peter Bengtsson 3c579b410c
delete customRanking (#24659) 2022-01-27 13:02:13 +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 264c3f9638 Merge branch 'jules-4800' of github.com:github/docs-internal into jules-4800 2022-01-25 12:43:38 +01: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
Peter Bengtsson daf6c65884
rewrite enterprise-serverl@atest links to enterprise-server@<version> (#24476)
* rewrite enterprise-server@latest links to enterprise-server@<actual>

* update test
2022-01-21 13:39:48 +00:00
Laura Coursen baec362248
Reframe the GitHub Connect docs (#24146) 2022-01-20 15:39:16 -06:00
Peter Bengtsson bebdeea0ee
fix test 2022-01-20 09:27:11 -05:00
Matt Pollard bc80a1ad60 Merge branch 'main' into jules-4800 2022-01-20 14:24:04 +01:00
Robert Sese 54af81acd5
a11y: update code example search (#24226)
* Search on submit

* Should be a ul

* Fix broken link

* No search on change event

* Add translation strings

* Add role for the 0 results message

* Update test with new search behavior

* Make search input a controlled component

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

* Trim whitespace in search text

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

* Better variable names

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

* Update visible results count in useEffect

* Control the input's value with the typed state

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

* Inline the submit handler

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

Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-01-19 12:53:50 +00:00
Steve Guntrip 11d193bd7f
Reorganize support articles 2022-01-18 13:24:02 +00:00
Robert Sese cc69799558
a11y: landing page headings adjustments (#24295)
* Adjust heading level and only heading with intro text

* Adjust heading level

* Adjust code example and guide card heading levels

* Adjust tests for new heading levels

* Adjust rendering test for new heading levels
2022-01-14 17:23:05 +00: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 63d3dedbb7 fixes tests 2022-01-13 14:59:12 +01:00
Jules Parker 1b05aa958d fixes tests 2022-01-13 14:44:37 +01:00
Jules Parker ade38a83bf fixes tests 2022-01-13 14:33:12 +01:00
Jules Parker 39e8de7076 fixes tests 2022-01-13 14:27:26 +01:00
Jules Parker 6f1b81b1b9 fixes tests 2022-01-13 14:16:22 +01:00
Jules Parker acf612ba03 fixes tests 2022-01-13 13:59:11 +01:00
Jules Parker 74774e1674 fixes tests 2022-01-13 13:20:10 +01:00
Jules Parker 4327a25e21 fixing tests 2022-01-13 12:29:57 +01:00
Jules Parker a7d13278d6 fixing tests 2022-01-13 12:22:16 +01:00
Jules Parker 7f6e24474d fixing tests 2022-01-13 11:59:43 +01:00
Jules Parker 18ffa1e900 fixing tests 2022-01-13 11:46:44 +01:00
Jules Parker f1457c657c fixing tests 2022-01-13 11:36:28 +01:00
Jules Parker 9e731c46be Merge branch 'jules-4800' of github.com:github/docs-internal into jules-4800 2022-01-13 11:24:01 +01:00
Jules Parker ecca1b3cf4 fixing tests 2022-01-13 11:21:27 +01:00
docubot 78edefdd7c
New translation batch for ja (#24260)
* Add crowdin translations

* Run script/i18n/homogenize-frontmatter.js

* Run script/i18n/lint-translation-files.js --check parsing

* run script/i18n/reset-files-with-broken-liquid-tags.js --language=ja

* run script/i18n/reset-known-broken-translation-files.js

* Check in ja CSV report

* correct fixture usage

Co-authored-by: Peter Bengtsson <mail@peterbe.com>
2022-01-12 20:18:20 +00:00
Peter Bengtsson ed6e80bd20
remove tool-switcher (#24242) 2022-01-12 16:32:30 +00:00
Mike McDonald 04da545821
Adding Codespace prebuilds to docs-internal (#23952)
* Adding Codespaces prebuilds
* Adding permissions
* Use pinned SHA for github/codespaces-precache action
* Add comments
* Add codespaces-precache repo to reference allow list

Co-authored-by: James M. Greene <jamesmgreene@github.com>
2022-01-11 00:23:08 -06:00
Peter Bengtsson 78500789e5
Don't remove `.feature` frontmatter key inside getApplicableVersions() (#24189)
* goofing around to trigger an error

* only call warmServer once

* delete versions when it can be inherited

* fix nasty unit test
2022-01-11 02:00:19 +00:00
Rachael Sewell a340162d84
reorganize repository apis (#23728)
Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-01-11 11:53:12 +10:00
Rachael Sewell 0399d5f424
Translation tests (#24164)
* update translations tests

* update tests
2022-01-10 14:16:04 +00:00
Peter Bengtsson c200f12e57
crash on redirect_from with a trailing slash (#23888) 2022-01-04 18:33:13 +00:00
Kevin Heis 55ee70e06b
Check that actions specify hashes instead of allowlist (#24042)
* Check that actions specify hashes instead of allowlist

* Fixes for unhashed version

* Update actions-workflows.js
2022-01-04 17:43:40 +00:00
Robert Sese a2bd8ae67f
Add support for videos to landing pages (#23801)
* Add new video properties frontmatter

* Handle video links in the middleware

* Video links don't have intros, authors, or full titles

* Make videos available from context

* Add default video heading

* Add basic tests for videos

* tmp videos test

* Remove stray test debugging

* more tmp videos testing

* Add videos test fixture

* Revert "more tmp videos testing"

This reverts commit 382946a5603ff217014797f77f37216bb8bb6c9c.

* Revert "tmp videos test"

This reverts commit 8767d0eaf08bd4ca04e2dacd12d476a2506c0367.
2021-12-17 11:09:00 -06:00
Matt Pollard 0744800757
Document version picker for GitHub Docs (#23703) 2021-12-17 09:53:30 +00: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 ed48eab88d
check for redirect orphans (#23330)
* check for redirect orphans

Part of #1303

* timeout

* avoid external redirects in redirects_from too

* delete content/admin/advanced-security/viewing-your-github-advanced-security-usage.md

* remove from children: too

* remove some trailing slashes in redirect_froms

* fix a few more trailing slash redirects

* delete orphan pages
2021-12-16 12:54:59 +00:00
Grace Park 9e21836f4d
Revert "Accessibility: Nesting headingLevel 3 mini tocs (#23663)" (#23759)
This reverts commit 41c7f58437.
2021-12-15 12:34:21 -08:00
Peter Bengtsson 10ca315bd5
Static assets should set ETag and Last-Modified (#23459)
* Static assets should set ETag and Last-Modified

* tests to prevent this ever happening again

* fix tests

Co-authored-by: docubot <67483024+docubot@users.noreply.github.com>
2021-12-15 16:57:39 +00:00
Rachael Sewell daafb8cb9d
break up large rest pages (#23652) 2021-12-14 20:39:25 +00:00
Grace Park 41c7f58437
Accessibility: Nesting headingLevel 3 mini tocs (#23663)
* nesting headingLevel 3 mini tocs

* fix tests

* Update components/article/ArticlePage.tsx

Co-authored-by: Robert Sese <robert.sese@gmail.com>

* run prettier

Co-authored-by: Robert Sese <robert.sese@gmail.com>
2021-12-14 04:29:09 +00:00
Peter Bengtsson d42023d52d
cache /categories.json (#23635) 2021-12-13 21:30:38 +00:00
Marcelo Jacobus c84d98766f
Prevent creation of empty source files (#23634)
* Add test to prevent `crowdin upload` errors

* Remove empty file causing `crowdin upload` error

Closes https://github.com/github/crowdin-support/issues/117
2021-12-13 16:57:38 +00:00
Peter Bengtsson 51e1b14c4e
improve test debugging and loading of cached redirects json file (#23584)
* improve test debugging and loading of cached redirects json file

* exception for testing 500 page itself
2021-12-13 16:20:05 +00:00
Peter Bengtsson fe5a08ece6
content unit tests shouldn't depend on github.blog (#23578) 2021-12-13 08:57:00 +00:00
docubot b0cafa65fe
New translation batch for ja (#23559)
* Add crowdin translations

* Run script/i18n/homogenize-frontmatter.js

* Run script/i18n/lint-translation-files.js --check parsing

* Run script/i18n/lint-translation-files.js --check rendering

* run script/i18n/reset-files-with-broken-liquid-tags.js --language=ja

* run script/i18n/reset-known-broken-translation-files.js

* Check in ja CSV report

* Skip test to unblock translation batch

See docs-engineering #923

* Remove console log

Co-authored-by: Marcelo Jacobus <marcelo.jacobus@gmail.com>
2021-12-13 02:11:48 +00:00
Peter Bengtsson 6363640cb1
in-memory cache the changelog RSS downloads (#23582)
* in-memory cache the changelog RSS downloads

* fix tests
2021-12-11 16:52:27 -05:00
Peter Bengtsson edb0da95f1
move test/utils.js to where it belongs (#23586) 2021-12-11 19:58:34 +00:00
Peter Bengtsson ae3dadfc66
cache asset images more aggressively (#23553)
* cache asset images more aggressively

* more careful about which gets the manual surrogate key

* fix rendered-content-link-checker script too

* feedbacked
2021-12-10 13:01:48 +00:00
Patrick Thomson 49882bb8d8
Document precise and search-based code navigation strategies. (#23177) 2021-12-09 16:41:49 +00:00
Peter Bengtsson 77f298f225
301 redirects should not set-cookie (#23360)
* 301 redirects should not set-cookie

Part of #1316

* Update release-notes.js

* No public facing doc changes (#23355)

Co-authored-by: jmarlena <6732600+jmarlena@users.noreply.github.com>

* New translation batch for pt (#23362)

* Add crowdin translations

* Run script/i18n/homogenize-frontmatter.js

* Run script/i18n/fix-translation-errors.js

* Run script/i18n/lint-translation-files.js --check parsing

* Run script/i18n/lint-translation-files.js --check rendering

* run script/i18n/reset-known-broken-translation-files.js

* Check in pt CSV report

* 24h cache all internal redirects without language prefix (#23354)

Part of #1271

* Redirects for root path should not set-cookie in all supported languages (#23377)

* test: add case when unsupported language is specified in redirect

* test: assert root redirects to appropriate language preference if specified

* refactor: remove redundant unit test

* refactor: re-order units starting with affirmative case

* refactor: remove single-use variable from unit

* fix: re-include previous unit with udpated description

Co-authored-by: Octomerger Bot <63058869+Octomerger@users.noreply.github.com>

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Rogan Ferguson <40493721+roferg@users.noreply.github.com>
Co-authored-by: jmarlena <6732600+jmarlena@users.noreply.github.com>
Co-authored-by: docubot <67483024+docubot@users.noreply.github.com>
Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
Co-authored-by: Octomerger Bot <63058869+Octomerger@users.noreply.github.com>
2021-12-09 16:31:27 +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
Peter Bengtsson 9a7a8a761e
make lib/rest/index.js callable (#23214)
* Experiment with making the tarball smaller

Part of #1248

* try this

* stop debugging

* delete translations too

* delete heavy search indexes too

* push and popd

* try this hack

* delete but leave directory

* debug more

* faster delete of translations

* less loud

* async await

* async await

* no tree

* simplify

* experimenting more

* unfinished

* only the large files

* change order

* brotli with level 6

* cope better with decorated rest json files

* tidying

* keep images

* cleaning

* cleaning up

* refactored function

* try this

* better comment

* remove console logging

* more important changes

* make lib/rest/index.js callable

Part of #1177

* memoize

* remove console logging
2021-12-07 13:21:23 +00:00
Matt Pollard b3e1ff4e89
Update documentation for GitHub AE's December 2021 release (#23405) 2021-12-07 10:36:37 +01:00
Peter Bengtsson 7c66d4456f
static assets should not use csrf (Set-Cookie) (#23357)
* static assets should not use csrf (Set-Cookie)

Part of #1316

* move setFastlySurrogateKey up too
2021-12-06 13:00:34 +00:00
Peter Bengtsson ddd14479c5
24h cache all internal redirects without language prefix (#23354)
Part of #1271
2021-12-03 21:51:04 +00:00
Kevin Heis fae539f9c9
Update release-notes.js 2021-12-03 12:48:39 -08:00
Kevin Heis d79f78c87e
Refactor developer site redirects test (#23342) 2021-12-02 23:42:53 +00:00
Peter Bengtsson 26014646dd
Massive DIFF_FILES crashes bash in repo-sync (#23326)
* Massive DIFF_FILES crashes bash in repo-sync

Part of #1304

* gst

* make exception
2021-12-02 18:57:38 +00:00
Grace Park 4ff5167e51
Updating name: sublanding to guides and using DropdownMenu for type/topics filter (#23290)
* updating sublanding to guides page and using DropdownMenu primer component

* fix linting error

* remove unnecessary import

* updating translation files

* move data-testid

* trying to fix test

* fix browser tests

* Update content/README.md

Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>

Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
2021-12-02 18:43:33 +00:00
Peter Bengtsson 1ab125dd08
draw title from first H1 only (#23266)
Part of #1218
2021-12-01 23:26:08 +00:00
Peter Bengtsson 8e1508d5fd
remove crowdin-support hack (#23231) 2021-12-01 22:56:03 +00:00
Peter Bengtsson 5f2d621408
make release-notes tests not depend on real network (#23196)
Part of #1246
2021-11-30 21:47:32 +00:00
Peter Bengtsson 2f6f076cc0
LinkChecker and better linksToSkip function (#23001)
* LinkChecker and better linksToSkip function

Part of #1253

* try now

* escaped

* make sure it skips all non-english links

* feedbacked
2021-11-30 21:39:39 +00:00
Peter Bengtsson e59c79acd0
speed up repository reference checks (#23178)
* speed up repository reference checks

Part of #1246

* feedbacked

* microoptimization
2021-11-30 21:32:33 +00:00
Rachael Sewell 63ab5664ca
remove test for previews in openapi schema (#23181) 2021-11-30 01:59:36 +00:00
Kevin Heis e3b2e820fd
React tool picker (#23004)
* Working on tool picker

* Start on react version of tool picker

* Update ToolPicker.tsx

* Update tool-switcher.html

* Get it working

* Update browser.js

* Update browser.js

* Update ToolPicker.tsx
2021-11-29 23:04:06 +00:00
Grace Park ed2495ed97
using legacy fake timers (#23110) 2021-11-29 18:40:31 +00:00