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

671 Коммитов

Автор SHA1 Сообщение Дата
Rachael Sewell 57d7b216ce
update script that creates ghes release stubs for graphql (#31329) 2022-09-30 18:58:57 +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 db52a7e8bd
dry-run with scraping and elasticsearch (#31201) 2022-09-27 16:59:33 -04:00
Peter Bengtsson ff533e4ea3
be more explicit about potential alias updates (#31214) 2022-09-27 20:41:21 +00:00
Peter Bengtsson 8112c47fee
merge in domwaiter (#31197) 2022-09-27 14:38:12 -04:00
Rachael Sewell 83252085e1
webhooks decorator script (#31066)
Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com>
2022-09-26 23:46:46 +00:00
Kevin Heis bc82b990bb
Update prevent-translation-commits.js (#31145) 2022-09-26 09:57:17 -07:00
Robert Sese 2b9dfe8ce9
Fix translation batch workflow (#31081) 2022-09-23 12:54:10 -05:00
Sarah Schneider b7f48ea2c1
Support GHAE internal-only semantic versioning (#29178)
Co-authored-by: Peter Bengtsson <mail@peterbe.com>
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
2022-09-22 08:26:58 +02:00
Peter Bengtsson a96b9ac779
send statsd timers on ES bulk indexing (#31017) 2022-09-21 18:27:36 +00:00
Robert Sese cc171a2710
tag diffs are always a text diff anyways (#30987) 2022-09-21 11:02:03 -05:00
Sarah Schneider 36248fefbb
Remove an old file (#31000) 2022-09-21 09:30:26 -04:00
github-openapi-bot 757066487d
Update OpenAPI Descriptions (#30924)
Co-authored-by: github-openapi-bot <github-openapi-bot@users.noreply.github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
Co-authored-by: Grace Park <gracepark@github.com>
Co-authored-by: Grace Park <gracepark@Graces-MacBook-Pro-2.local>
Co-authored-by: Hector Alfaro <hectorsector@github.com>
Co-authored-by: Ashwin Jeyaseelan <8gitbrix@github.com>
Co-authored-by: hubwriter <hubwriter@github.com>
Co-authored-by: Sarita Iyer <66540150+saritai@users.noreply.github.com>
2022-09-19 10:28:23 -07:00
Peter Bengtsson 921cf5037f
dry-run search scrape + index on PRs (#30861) 2022-09-19 14:32:23 +00:00
Peter Bengtsson a179364cda
favor more exact spelling searches (#30741) 2022-09-13 18:59:14 +00:00
Hector Alfaro 25b455c35f
Remove unused CrowdIn workflows and scripts (#30234) 2022-09-12 17:59:28 +00:00
Hector Alfaro 478f293116
Sort tokens on localized files before running diff (#30625) 2022-09-09 12:15:05 +00:00
Kevin Heis 7523a7c460
Prep for ts-node (#30587) 2022-09-08 15:45:13 +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 eda38df4c7
fetch external urls better in link checker (#30387) 2022-09-01 11:46:15 +00:00
Peter Bengtsson 05967a9b68
optionally check external URLs in rendered content (#25429) 2022-08-29 20:43:12 +00:00
Rachael Sewell a9aa911d84
remove some old logging from openapi script (#30317) 2022-08-26 22:37:23 +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
Rachael Sewell 83680f30b0
refactor scripts used for openapi (#30309) 2022-08-26 20:28:37 +00:00
Rachael Sewell 59542a4fcc
openapi class bugfix for nullable type (#30270) 2022-08-25 21:59:07 +00:00
Kevin Heis 303d5190db
Create a translations test suite (#30000)
* Scaffold files for migration

* Move user-agent into unit suite

* Nothing to move from browser suite

* Migrate tests to translations/content

* Migrate existing translation test to meta

* No graphql tests to migrate

* Migrate lint-translation-reporter

* Migrate lint-translation-reporter

* Remove languages-schema, unused

* Restore languages-schema

* Restore languages-schema

* Migrate rendering

* Migrate routing

* Migrate most of unit

* Remove dead files, comment out tests that aren't expected to work yet

* Migrate from get-redirect

* Migrate page and pages

* Migrate linting code

* Fix lint issues

* Found a few more

* Run prettier

* Move crowdin-config test and helper

* Update crowdin-config.js

* Remove translation linting, crowdin config lint, reduce file count

* Remove test that's been skipped for a year

* Restore linting with note to remove later

* Update lint-translation-reporter.js

* Clean up rendering suite

* Update rendering.js

* Remove excessive describe blocks

* Redirect tests

* Clean up unit

* Remove test that's never called

* Don't compare early access

* Rename test suites

* Update "content" tests

* Update files.js

* Update search.js

* Update files.js

* Update files.js
2022-08-25 12:38:03 -07:00
Rachael Sewell 28423ba069
simplify openapi schema parsing (#30192) 2022-08-24 22:14:39 +00:00
Sarah Edwards d2a2113c11
REST new user guidance (#29642) 2022-08-23 19:31:01 +00:00
Peter Bengtsson 420ea91b81
cap check-all-english-links and upload log file (#30092) 2022-08-19 18:11:21 +00:00
Rachael Sewell 961f985cfe
Revert "Refactor openapi table func" (#30040) 2022-08-17 17:24:11 -07:00
Rachael Sewell 792f4c626a
Refactor openapi table func (#29924) 2022-08-17 13:46:15 -07:00
Hector Alfaro 077195f5ab
REST: Script for adding a GHEC key to API operations (#29683)
* add draft of ghec api rewrite script

* fix regex to allow for any location of the githubCloudOnly prop

* add better logging

* account for missing x-github key

* skip and log each time dotcom isn't a version

* log oauth categories

* move script to a better spot

* remove oauth logging, add more clarity to logs
2022-08-16 17:40:31 +00:00
Hector Alfaro 54d996f186
Localization: Clean up Microsoft workflow (#29675)
* remove comments that no longer apply

* remove unused matrix variables

* remove CrowdIn-specific step of resetting broken files

* udpate link to Microsoft-specific log

* bring back reset script still in use

* add acceptable ja translation of TOS to rendering test

* add ability to remove files that have been translated but don't exist (wip)

* document what `languageFiles()` returns

* fix path issues for removed translations

* cleaner script execution

* add removed files to CSV report

* add workflow link to PR body for better troubleshooting

* catch missing regex for reporting file removals

* fix capturing groups in regex for csv reporting

* fix link to CSV file for PR

* fix formatting for PR

* pass in branch name from workflow

* put back helper scripts, make msft-specific copies
2022-08-15 17:17:25 +00:00
Rachael Sewell b552180c04
remove unused properties from decorated rest schemas (#29881) 2022-08-12 00:09:41 +00:00
Sarah Schneider 9236898431 add support for passing an option to open sections by default 2022-08-11 11:21:20 -04:00
Sarah Schneider db6f3c8890 change toc filenames to index.html 2022-08-10 15:26:13 -04:00
Sarah Schneider af50d6e859 re-add the dev toc in script/static form 2022-08-10 15:05:23 -04:00
Rachael Sewell f6d34d019c
atomically update index alias and delete old indexes (#29742) 2022-08-09 01:02:55 +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
Peter Bengtsson 2c8e07843b
github/github link checker got config (#29617) 2022-08-04 11:27:39 -04:00
Rachael Sewell 3cbd7103da
Remove top-level categories on graphql queries page (#29592) 2022-08-03 20:01:38 +00:00
Rachael Sewell 467459af7c
Reactify graphql pages (#28547) 2022-08-03 10:51:21 -07:00
Grace Park b5f8a6089f
Fix REST decorator script (#29542)
* fix decorator script

* run on node 16

Co-authored-by: Grace Park <lugraciecy@gmail.com>
2022-08-03 17:35:02 +00:00
github-openapi-bot 2255a2c8f7
Update OpenAPI Descriptions (#29408)
* Update OpenAPI  Descriptions

* Add decorated OpenAPI schema files

* Add new pages override (#29446)

* update decorated files

Co-authored-by: github-openapi-bot <github-openapi-bot@users.noreply.github.com>
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-07-28 13:40:47 -07:00
Kevin Heis 2182ff28f3
Next12 now supports ESM (#29295)
* Next12 now supports ESM

* No more michael jackson script extensions

* Fix test running

* Update jest-puppeteer.config.cjs

* Update package.json
2022-07-26 17:53:23 +00:00
Peter Bengtsson ad4c835316
only sync search records without lunr and no br compression (#29156)
* refactor sync-search-indices

* tidying

* only sync search records without Lunr and no .br compression

* works

* oops
2022-07-20 18:57:34 +00:00
Peter Bengtsson b0746325db
nicer timestamps in Elasticearch index names (#29155) 2022-07-19 15:35:29 +00:00
Peter Bengtsson 44a91fdec5
refactor sync-search-indices (#29152)
* refactor sync-search-indices

* tidying
2022-07-19 15:13:34 +00:00
Peter Bengtsson b7b22d1685
read search records from any directory (#29153) 2022-07-19 12:24:46 +00:00
Peter Bengtsson 9abd3b7929
remove leftover debugging in index script (#29145) 2022-07-18 20:27:58 +00:00
Peter Bengtsson e61d71f42f
HTML to plain text is broken in various places (#29006)
* HTML to plain text is broken in various places

* remove comment
2022-07-13 21:29:55 +00:00
Peter Bengtsson 88f0b1686f
delete script/content-migrations/deduplicate-enterprise-assets.js (#29011)
* delete script/content-migrations/deduplicate-enterprise-assets.js

* update package-lock
2022-07-13 20:48:09 +00:00
Peter Bengtsson 721e68f4ab
Index records into Elasticsearch (#27819)
* indexing records into Elasticsearch

* @elastic/elasticsearch@8.2.0

* mv

* fix the code

* pipe

* lfs

* use sha

* change how index names work

* better snowballing

* improvements and upgrade

* index more explicitly

* wip

* no need to save space with elasticsearch

* update package-lock

* Revert "no need to save space with elasticsearch"

This reverts commit 9cdd4d8f4fa7be822bdef3976091c3c640519dec.

* adding a comment

* better comment

* a better comment

* feedbacked

* more comment
2022-07-13 20:32:22 +00:00
Hector Alfaro 95e6f3d3ab
Deprecate GHES 3.1 (#28798)
* add 3.1 to deprecated versions

* rewrite img src to use azure blob storage in archive script

Co-authored-by: rachmari <rachmari@users.noreply.github.com>

* remove static files for ghes 3.1

* remove liquid conditionals and content for ghes 3.1

* remove outdated hardware reqs reusable

* Fix liquid conditional uncaught by script

* Close liquid conditionals missed by script

* Apply @mattpollard's suggestions

Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>

Co-authored-by: rachmari <rachmari@users.noreply.github.com>
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
2022-07-11 21:17:09 +00:00
Kevin Heis 05fe4c60cb
Upgrade commander (#28613)
* Upgrade commander

* Change import
2022-06-17 16:43:02 +00:00
Bishal Das 139b4f231c
"or not" is added 2022-06-15 15:46:54 +05:30
Bishal Das e6e14dd47b
UPDATE the Typos in script/README.md 2022-06-13 17:34:52 +05:30
Robert Sese b3af722730
Fix daily link checker (#28346)
* reduce linkinator concurrency from 300 to 100

* reduce it and use self-hosted

* try again

* actually do concurrency of 10

* move the override to the Action workflow

* Trying `DISABLE_RENDERING_CACHE`

* back to 100?

* super low concurrency

* 3??

* 1??

* try self-hosted + 100 concurrency

Co-authored-by: Peter Bengtsson <mail@peterbe.com>
2022-06-09 16:48:02 -05:00
Sarah Schneider 14c8fc570e add script 2022-06-06 18:11:17 -04:00
Sarah Schneider 1500b84cd2 support passing an array of file extensions 2022-06-06 18:08:03 -04:00
Mike Surowiec b4608a86d8
fix: remove usage of readFileAsync (#28053)
* fix: remove usage of readFileAsync

* fix: use same import style

* fix: update tests

Co-authored-by: Peter Bengtsson <mail@peterbe.com>
2022-06-01 14:49:30 +00:00
Peter Bengtsson 31c3fc36b2
don't fail on posting comment from English link checker (#28059)
* don't fail on posting comment from English link checker

* small correction on line break and longer timeout patience

* feedbacked
2022-05-31 18:05:39 +00:00
Peter Bengtsson 7783171b56
get popularity from article path (#28016) 2022-05-26 21:27:09 +00:00
Peter Bengtsson 8d4e1cda62
use shorthand notation (#27919) 2022-05-23 18:22:44 +00:00
Peter Bengtsson 18504871b9
cache full rendering (#25424)
* cache full rendering

* still not working with gzip

* progress progress progress

* smaller

* hacky progress

* small fixes

* wip

* lock file

* wip

* wip

* package-lock updates

* wip

* search DOM in lowercase

* simplify

* with instrument

* improve test coverage

* mutateCheeriobodyByRequest

* fix

* remove renderContentCacheByContex

* disable render caching in sync-search

* diables things in github/github link checker

* gzip lru

* tidying up

* updated

* correct tests

* fix: move userLanguage to LanguagesContext

* Revert "fix: move userLanguage to LanguagesContext"

This reverts commit d7c05d958c71eaad496eb46764eb845d80b866ca.

* contexts ftw

* fixed rendering tests

* oops for got new file

* nits addressed

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
2022-05-23 12:12:09 +00:00
Peter Bengtsson d5cef9c5d6
run link checker against localhost:4000 instead of prod (#27757)
* run link checker against localhost:4000 instead of prod

* exclude docs.github.com

* print output if possible

* upload broken_links.md as artifact

* debug broken_links.md
2022-05-19 13:12:07 +00:00
Hector Alfaro 6cbe4d131e
clean up unnecessary conditional code 2022-05-13 12:40:07 -04:00
Hector Alfaro 807e8b5509
bring conditional removal back into main block 2022-05-13 12:40:07 -04:00
Hector Alfaro 2d184b705b
squash bug with indices not updating appropriately 2022-05-13 12:40:06 -04:00
Hector Alfaro 80ff57ff47
squash bug missing nested conditionals 2022-05-13 12:40:05 -04:00
Hector Alfaro 67c4c193a9
handle unnecessary conditionals, those with all versions 2022-05-13 12:40:05 -04:00
Peter Bengtsson 5733237c00
remove add-tags-to-articles script (#27639) 2022-05-12 10:51:40 -04:00
Grace Park 2e821f52ff
REST subcategory/category rendering test and refactor test-open-api-schema (#27138)
* first stage of test

* update test

* add rest test for categories and subcategories rendering

* update timeout back to original

* remove export

* remove testing

* refactor test-open-api-schema

* remove function

* remove check

* remove slash

* remove comment

* rearrange

* update getting the categories and maptopic levels

* update tests

* update copy

* add error message task
2022-05-10 17:09:47 +00:00
Rachael Sewell 14111129e2
display dictionary type body parameters (#27483) 2022-05-04 21:50:49 +00:00
Grace Park f2c6004aaa
REST API Pages: fix links of endpoints-available-for-github-apps page (#27425) 2022-05-04 00:56:04 +00:00
Rachael Sewell 5f4f858b94
REST two-pane layout (#26954) 2022-05-02 10:10:33 -07:00
Matt Pollard 2dbfef88bc
Improve YAML file handling for script to toggle lightweight feature flags for GitHub AE (#27170)
* Refactor for YAML files

* Accommodate strings in YAML files

* feedbacked

Co-authored-by: Peter Bengtsson <mail@peterbe.com>
2022-04-28 18:48:13 +00:00
Baoshuo Ren 685a69703b
chore: remove git.io (#17417)
All links on git.io will stop redirecting after April 29, 2022.

- https://github.blog/changelog/2022-04-25-git-io-deprecation/
2022-04-27 06:43:01 -07:00
Rachael Sewell 749efd7b99
Rest redirect endpoint (#27027) 2022-04-25 16:14:04 +00:00
Rachael Sewell 434f49afe0
remove prerendered request description (#27185) 2022-04-25 16:09:48 +00:00
Grace Park bb2e234238
update openapi test (#27127) 2022-04-21 19:56:30 +00:00
Robert Sese 78ebd2e483
openapi: render example request and response descriptions (#27057)
* Render code example response descriptions

* Add updated decorated files

* Pluralize

* Also render example request descriptions

* Add updated decorated files
2022-04-20 17:51:13 -05:00
Sarah Schneider 9abbfb6ee4
Merge branch 'main' into move-bookmarklets 2022-04-20 14:43:20 -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 2fe74dc32b
check broken links using localhost (#27010)
* Revert "fix(link-check): add WAF token to avoid 403 (#26964)"

This reverts commit 8bb525188f.

* check broken links using localhost

* remove temp comment
2022-04-19 15:17:37 +00:00
Sarah Schneider e48469d34e update generated bookmarklet 2022-04-19 10:06:14 -04:00
Sarah Schneider 7a3b412a91 incorporate @lucascosti changes from docs-content PR 6604 and also change dotcom to FPT 2022-04-19 10:05:46 -04:00
Sarah Schneider a326f133c3 restore IIFEs and remove breaking spaces 2022-04-19 10:04:50 -04:00
Sarah Schneider 08ac9529b2 add links in README plus a few edits 2022-04-19 10:04:09 -04:00
Sarah Schneider 53f0383fa4 Merge branch 'main' of github.com:github/docs-internal into move-bookmarklets 2022-04-19 09:20:49 -04:00
Robert Sese 0056a2d648
openapi: fix array of objects params (#26978)
* Make a copy of the type array, splice() will modify it

* Also check for 'array' in array of types

* Add updated decorated files

* Make copying clearer

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

Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-04-15 22:50:27 +00:00
Mike Surowiec 8bb525188f
fix(link-check): add WAF token to avoid 403 (#26964) 2022-04-15 16:29:23 -05:00
Robert Sese aff739a381
openapi: fix param description rendering (#26913)
* Should be 'param.descriptionHTML'

* Add updated decorated files
2022-04-13 20:22:08 +00:00
Sarah Schneider dc2bd4b140 add bookmarklets to script dir 2022-04-13 15:53:59 -04:00
Robert Sese cb355c6da3
openapi: fix nested params (#26894)
* Check for 'object' in ['object', 'null']

* Add updated decorated files

* arrays can also be null with this format

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

* arrays can also be null with this format

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

Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-04-12 18:15:22 -05:00
Sarah Edwards 67e194eea9
Organization discussions and polls (#26517)
Co-authored-by: Steve Guntrip <stevecat@github.com>
2022-04-12 16:11:20 +00:00
Rachael Sewell e86dc05ecc
add openapi example tests (#26860) 2022-04-11 16:08:15 -07:00
Rachael Sewell 02dbebbef3
render existing openapi examples (#26405) 2022-04-11 16:09:03 +00:00
Peter Bengtsson 5d7973b928
make PR about deletable orphan assets (#26484)
* warn on orphan images

* oops

* temporarily adding orphan image

* fix the bug

* permission

* better comment

* try this

* try this

* debugging

* debugging

* using fs

* cjs

* remove experiment image

* debugging

* debugging

* try that

* try that

* git config

* cleaning

* token

* body

* label

* try that

* try that

* try that

* not upstream

* try that

* token twice

* try again

* cleaning up

* fix unit test

* one more exception

* feedbacked
2022-03-30 11:56:18 -04:00
Peter Bengtsson b685b6fda7
don't need disk caching for site data (#26333)
* reinstate

* start server manually

* routing tests too

* skip more

* sleep more and fail if not 200

* use e2etest for content/ too

* automatically start server for jest

* does this work?

* feedbacked

* rename things

* getting it to work

* add dev dependency

* install the right version

* don't need to start that

* fix package lock

* update readme about it

* feedbacked

* don't need disk caching for site-data
2022-03-19 16:05:27 +00:00
Peter Bengtsson 4fcd3ae25f
automatically start server for jest (#26206)
* reinstate

* start server manually

* routing tests too

* skip more

* sleep more and fail if not 200

* use e2etest for content/ too

* automatically start server for jest

* does this work?

* feedbacked

* rename things

* getting it to work

* add dev dependency

* install the right version

* don't need to start that

* fix package lock

* update readme about it

* feedbacked
2022-03-18 21:46:07 +00:00
Peter Bengtsson 3d298dd88d
CLI tool to rename file or tree (#25306)
* CLI tool to rename file or tree

* it works

* progress

* progress

* wip

* wip

* wip

* debugging

* fixed

* remove console logging

* add support for also updating learning-tracks

* cope with the 'children' key in the root content/index.md unicorn

* update childGroups too

* guardrails

* refactor

* tidying up arguments

* refactored for single files

* nicer error in pre-validation of the first file argument

* regression fix

* fix for moving directories

* delete lib/redirects/.redirects-cache.json if present
2022-03-18 20:44:43 +00:00
Grace Park 2c8713037d
Move deploy keys from deployments to keys in rest pages (#26166)
* move deploy keys from deployments to keys in rest pages

* move minitocs above intro

* Update content/rest/reference/keys.md

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

* add to banner, add redirects from deployments

* remove deploy keys from deployments intro

* update data/reusables name

* update - to _

* update script and add redirects for subcategories turned categories

Co-authored-by: Sarah Edwards <skedwards88@github.com>
2022-03-17 17:25:12 +00:00
Peter Bengtsson 01baeda3c0
sync serialize sitedata to disk (#25749)
* sync serialize sitedata to disk

* use os.tmpdir

* refactor tests

* debugging

* use log

* debugging

* louder about syntax errors

* warn-before-tests

* louder about disk-caching redirects

* less loud

* only in development again
2022-03-09 20:57:40 -05:00
Rachael Sewell 9fd4fe0a6c
remove prerendered response rest docs (#25652) 2022-03-04 21:24:46 +00:00
Rachael Sewell 0fcf31cdc3
Support OpenAPI 3.1 (#25710) 2022-03-03 05:51:25 +00:00
Rachael Sewell 2ade7d8489
reactify rest pages (#25005) 2022-02-28 18:30:54 +00:00
Robert Sese f48d536bbf
Fix management console API URLs (#25562)
* No /api/v3 for mgmt console operations

* Add updated decorated files
2022-02-24 22:51:01 +00:00
dependabot[bot] 619ce22bab
Bump @graphql-inspector/core from 2.9.0 to 3.1.1 (#25384) 2022-02-22 23:08:35 +00:00
Lucas Costi e6af9ae1e6
Remove Actions REST enterprise subcategory (moved to Actions page) (#25065)
Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-02-17 15:18:07 +10:00
Peter Bengtsson 53796d44ac
make octicon search svgs cached longer (#25421)
* make octicon search svgs cached longer

* not an orphan exception
2022-02-16 17:11:43 +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
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 9e2cb3b03e
remove update-short-titles-from-csv.js (#25129) 2022-02-08 21:05:05 +00:00
Peter Bengtsson a0af48149e
delete old deploy.js script (#24862) 2022-02-08 16:11:11 +00: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
dependabot[bot] a02a4355e3
Bump url-template from 2.0.8 to 3.0.0 (#24889)
* Bump url-template from 2.0.8 to 3.0.0

Bumps [url-template](https://github.com/bramstein/url-template) from 2.0.8 to 3.0.0.
- [Release notes](https://github.com/bramstein/url-template/releases)
- [Commits](https://github.com/bramstein/url-template/compare/v2.0.8...v3.0.0)

---
updated-dependencies:
- dependency-name: url-template
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* No more default export

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Robert Sese <rsese@github.com>
Co-authored-by: Robert Sese <robert.sese@gmail.com>
2022-02-02 22:27:30 +00:00
Peter Bengtsson bd9d85ed0f
remove need for 'count-array-values' (#24867) 2022-02-01 21:27:47 +00:00
Peter Bengtsson 53afd39a13
mention about false positives (#24864) 2022-02-01 16:33:49 +00:00
Peter Bengtsson 6efd78b0ac
move 'csv-parse' to optional dependencies (#24852) 2022-02-01 12:45:30 +00:00
Peter Bengtsson bb67c2a6f5
move 'bottleneck' to optional dependencies (#24829) 2022-01-31 18:30:38 +00:00
Rachael Sewell ef4dee2e7d
Revert "Revert "rest/reference/repos#statuses redirect"" (#24559) 2022-01-27 22:09:20 +00:00
Peter Bengtsson 3c579b410c
delete customRanking (#24659) 2022-01-27 13:02:13 +00:00
Peter Bengtsson 7844ad4740
move 'image-size' to optional dependencies (#24670) 2022-01-26 19:50:01 +00:00
Peter Bengtsson 5f3036df69
shut down the old internal link check CI scripts (#23694) 2022-01-26 19:22:59 +00:00
Peter Bengtsson 2832e4f0f0
move 'website-scraper' to optional dependencies (#24651) 2022-01-26 16:50:13 +00:00
Robert Sese c02a5ec9b3
Render the operation response description Markdown (#24466)
* Render the operation description Markdown

* Add updated decorated files
2022-01-24 20:11:40 +00:00
Peter Bengtsson 96e16d7ee6
sleep longer and more when code searching (#24385)
* sleep longer and more when code searching

* exponential
2022-01-18 20:08:52 +00:00
James M. Greene e5d9186ed6
Allow rendered-content-link-checker script to be given a list of zero files (#24290)
#docs-friction
2022-01-13 21:53:16 +00:00
James M. Greene a83f39beb2
Prevent Link Checker from erring on long file lists (#24269)
* Add '--list' parameter to rendered-content-link-checker script

* Utilize trilom/file-changes-action output files and pass to rendered-content-link-checker script

* Rename job to unique name

* Correct module path for import

* Move import into local imports section

* Dump the contents of the file listing

* Fix typo
2022-01-13 12:46:44 +00:00
Ryosuke Nakayama e1a64337d3
Fix render translation test (#24235) 2022-01-12 13:26:58 +00:00
Ramya Parimi ec6d783bb5
Update README.md (#24203)
very -> every
2022-01-11 10:46:03 -05:00
Ramya Parimi 738456c5b7 Revert "Update README.md"
This reverts commit 28f0d8c46e.
2022-01-11 09:20:30 -06:00
Ramya Parimi 28f0d8c46e
Update README.md 2022-01-11 09:04:15 -06:00
James M. Greene bb58be2d50
Partial revert of PR #24176 to fix lint errors (#24196) 2022-01-10 22:30:25 -06:00
Peter Bengtsson 4406fd9834
treat list of files as space separated (#24176)
* treat list of files as space separated

* debuggnig

* debuggnig

* better

* test now

* cleanup

* all cleanups

* mention feature request on the action
2022-01-11 02:58:45 +00: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
dependabot[bot] 67bd87585e
Bump linkinator from 2.16.2 to 3.0.3 (#24014) 2022-01-07 15:24:06 -08:00
James M. Greene be4249b57c
Remove the concept of "undeployment" as a part of the PR deployment lifecycle (#23731)
* Update remove-stale-staging-resources workflow to completely replace undeploy workflow
* Delete the staging-undeploy-pr workflow file
* Delete all undeployment scripts and logic
* Remove all references to the automated-block-deploy label used for undeployment
* Simplify staging cross-workflow concurrency needs
2022-01-06 16:27:48 +00:00
Robert Sese 9234921dca
Fix server URL for repos/upload-release-asset (#23838)
* Fix server URL for repos/upload-release-asset

* Add updated decorated file
2022-01-05 14:58:00 -06:00
Peter Bengtsson 26d2c5438a
Check for orphaned assets in CI (#24074) 2022-01-05 16:26:45 +00:00
Peter Bengtsson 3a8c8c4ba3
retract deletion of search-XX.svg assets (#24075) 2022-01-05 16:22:12 +00:00
Mike Surowiec cfbc6f694f
remove await-sleep, less reliant on external pkgs (#24033) 2022-01-04 21:06:04 +00:00
Peter Bengtsson 47763c5ca5
Script to find orphaned assets (#23567)
* script/find-orphaned-assets.mjs to list orphan images

* better filtering
2022-01-04 18:38:38 +00:00
Rachael Sewell 45f1a41e79
prerender graphql mutations page (#23757) 2021-12-15 12:28:39 -08:00
Peter Bengtsson f68eb74d90
Make a dedicated, fast, workflow just for docs-internal only (#23289)
* Make a dedicated, fast, workflow just for docs-internal only

Part of #1297

* make staging-build-pr only for github/docs

* prune later

* make it louder and clearer about disabling workflows

* does it merge?

* typo

* rename ref

* rename

* early access should be good to go

* far from perfect

* start with that

* gzip

* rearrange

* html_url

* correction of actions/checkout sha

* correction of actions/setup-node sha

* quote

* ooops

* actually deploy

* move @octokit/rest to dependencies

* await-sleep hack

* reinstall npm

* typo

* CONTEXT_NAME

* deployments:write permission

* pull-requests:read permission

* actions:read and statuses:write permissions

* private repo mention exception

* it's called github.run_id

* Apply suggestions from code review

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* make CONTEXT_NAME optional (if it works)

* comment out CONTEXT_NAME

* simplifying

* going to run on on.pull_request instead

* remove comment

* only the 2-phase staging deploy on github/docs

* better if statement on label check

* refactor of staging-deploy script

* switch to npm install to get the deDependencies back

* using --only=dev

* updating comments

* event_name

* not on pushes to main

* add staging-commit-status-success

* testing testing

* fix linting error

* Remove other docs-internal references from staging-deploy-pr.yml

* Cleaning up new staging-commit-status-success script and usage

* Remove unnecessary environment refs

* Remove unnecessary fallback

Since the only event trigger is pull_request now instead of also push

* Remove unnecessary env vars from workflow

* docs-internal or docs but not both

* Don't provide unnecessary environment refs

* remove now moot exception

* setting it to pull_request_target

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-12-14 08:57:54 -05: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
Peter Bengtsson 0142b04d03
use Promise.all() on iterator of async functions (#23520) 2021-12-09 16:24:24 +00:00