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

671 Коммитов

Автор SHA1 Сообщение Дата
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
Peter Bengtsson 0035e14e3b
one fast link checker to rule them all (#23041)
* one fast link checker to rule them all

* -L alias

* refactor

* hacking away

* passing pages

* adding a workflow

* limit level to critical

* ability to pass a specific set of files

* testing specific files

* remove temporary debugging

* reorganize the printing

* formatting of output

* check images too

* prettyFullPath()

* minimal permission on workflow

* update comment

* new permission

* fix actions shas
2021-12-09 08:56:07 +00:00
Peter Bengtsson 7f6f20a73f
run prettier on all code in CI (#23482)
* run prettier on all code in CI

* rename

* test .tsx too

* ignore more

* prettier the stragglers

* minimal permission
2021-12-08 16:11:52 +00:00
Marcelo Jacobus 55a5805e47
Also check data directory for mismatching liquid tags (#23433) 2021-12-08 02:33:04 +00:00
Marcelo Jacobus 4d82765849
Hide list of files inside a details tag (#23407)
That way the PR looks shorter, even though it has the same information
as before
2021-12-06 14:55:00 +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 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
Marcelo Jacobus 840de67988
Flatten array before joining (#23222)
Fix PR report body created for this issue: https://github.com/github/docs-engineering/issues/1278
2021-11-30 17:49:41 +00:00
Marcelo Jacobus 7b7d78e126
Properly reset files with broken liquid tags (#23151)
* Fix: Properly reset files with broken liquid tags

* Add a comment clarifying why we reset translations the way we do
2021-11-30 13:06:20 +00:00
Marcelo Jacobus 9eadcaf683
Only output error message when file exists (#23155)
Close https://github.com/github/docs-engineering/issues/1276
2021-11-30 12:46:05 +00:00
Marcelo Jacobus 18a54dd34b
Display all files reset in a translation batch (#23152)
* Output every file reset

* Add --dry-run and --reason options to reset-translated-file.js

* Output reason when reset-translated-file.js script is called
2021-11-30 12:38:22 +00:00
Marcelo Jacobus 855034fec3
Report files reset during the translation batch (#23159)
* Add script to report reset files

* Has the workflow report the reset files

* Fix script name

* Filter report by language

* Update .github/workflows/create-translation-batch-pr.yml

* Use build in array methods
2021-11-30 12:31:08 +00:00
Marcelo Jacobus 6275cd1071
Add script to spot differences in liquid tags (#22962)
* Add script to spot differences in liquid tags

It compares source and translation

Usage example:

```bash
script/i18n/liquid-diff.js {files} --language=es
```
2021-11-25 08:56:20 +00:00
Marcelo Jacobus 2de66f3c81
Fix script/i18n/lint-translation-files.js (#23016)
* Fix error

* Attempt to fix that error

* Remove debugging code

* fix: Update path of lint-translation script

* fix: Update conditional guard clause

The conditional compared an array to a string using strict equality, so
it was never going to be true. This change makes sure we return early
when there are no changes.

* fix: Exit early when there are no files to lint

* refactor: Filter files to reset in plain javascript

As opposed to doing it in bash.

* Update tests/linting/lint-files.js

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

* Update tests/linting/lint-files.js

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

* Update script/i18n/lint-translation-files.js

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

Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
2021-11-23 16:11:34 -08:00
Francis 9c4ef4dcc0
Add a new test that checks every YAML document can be parsed (#23053)
* fix: update lint-translation script to point to the correct test

This change reflects its new home in `test/linting/lint-files.js` as committed in f0d17c300d on April 28, 2021.

* test: check release notes can be parsed a single YAML document

* test: check yaml content parsability

* test: check parsability for all YAML content

* refactor: move annotations to lint yaml content suite

* fix: revert file contents

* fix: remove local test script

* refactor: lowercase yaml file type

* fix: remove null assignment to stay consistent with other variables

* refactor: update reference name to caught error

* fix: remove the royal we from annotation

* refactor: update annotation for improved readability

* fix: add missing preposition
2021-11-23 18:46:04 +00:00
Kevin Heis 5b1ac53379
A few things that Prettier seemed to miss (#23005) 2021-11-19 18:32:20 +00:00
Francis 8f4140fa9f
fix: update permissions and command execution for linting translation files (#22922)
* fix: make script for linting translations executable

* fix: execute the command directly

* feat: surface any errors if lint check fails

* fix: do not return early if lint check errors

Co-authored-by: Octomerger Bot <63058869+Octomerger@users.noreply.github.com>
2021-11-18 21:36:33 +00:00
Peter Bengtsson a5dc892147
retry on 403 secondary rate limit errors (#22828)
* retry on 403 secondary rate limit errors

Part of #1215

* longer sleep time
2021-11-18 14:32:45 +00:00
Francis 5bb2c7acb2
[Localization] Refactor script for linting translation files to require check type (#22653)
* feat: stub two reset scripts

* refactor: split lint script into two separate files

* fix: revert back to original lint script

* refactor: use commander interface for linting translation files

* Skip reset attempt when violation list is empty

So that "execSync(`cat ${log}...`)" in line 64 is never executed. When
there are no errors, the log file is not created, and unless it had been
previously created by another process, the script will error out.

Co-authored-by: Marcelo Jacobus <marcelo.jacobus@gmail.com>
2021-11-17 03:09:07 +00:00
Francis 2422a22293
Reset known and unique broken translation files sequentially (#22709)
* fix: de-duplicate and filter non-existent broken files

* fix: sequentially reset known broken translation files

When a known broken translation is reset, a Git operation performs the
underlying reset. If more than one Git operation is running at a time,
Git will throw an error:

> Another git process seems to be running in this repository [...]

This change ensures that we reset each broken translation file
sequentially to not run into this error.

* Skip reset of a file that does not exist

Co-authored-by: Marcelo Jacobus <marcelo.jacobus@gmail.com>
2021-11-15 16:24:23 +00:00
Grace Park 5bf39459ca
Updating Search using Primer Components (#22677)
* updating search icon

* remove no fill

* update fill color

* using ActionList and Overlay

* update to ActionList, Overlay, add Label to Breadcrumbs, and change Mark

* add search-results test data and move header search results to right

* make search results scrollable and fix max-width in header search

* update header search and styling updates

* add highlight

* update styling

* styling and lint errors

* fix lint error and fetch

* Update components/Search.tsx

* update label color

* remove bottom margin

Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-11-12 12:25:47 -08:00
dependabot[bot] 15cbf8e063
Bump @babel/eslint-parser from 7.16.0 to 7.16.3 (#22751)
Bumps [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) from 7.16.0 to 7.16.3.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.16.3/eslint/babel-eslint-parser)

---
updated-dependencies:
- dependency-name: "@babel/eslint-parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-12 16:35:11 +00:00
Rachael Sewell 0244fda807
search improvements (#22443) 2021-11-10 11:11:28 -08:00
Rachael Sewell a83c0cfd50
remove old unused scripts (#22650) 2021-11-08 17:43:59 +00:00
Rachael Sewell 1c196cdd42
test frontmatter properties too (#22642) 2021-11-05 20:05:55 +00:00
Rachael Sewell 8c7deebadc
add script to remove stale translation files (#22555) 2021-11-05 01:00:54 +00:00
Rachael Sewell c5df94c88b
Crowdin broken liquid test (#22559) 2021-11-04 14:27:22 -07:00
Rachael Sewell cbcd383323
add search QA tests (#22593) 2021-11-04 14:05:11 -07:00
Marcelo Jacobus ed9e3d79cb
Add test and script to ensure 1:1 parity of liquid tags between source and translation (#22472)
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2021-11-04 10:59:17 -03:00
Chris bb20db6ed9
Update reset-known-broken-translation-files to ignore checked files sources from GitHub issue (#22576) 2021-11-03 19:32:07 +00:00
Rachael Sewell 95d02d7eef
group translations scripts together (#22232) 2021-11-03 10:28:32 -07:00
Rachael Sewell 2f8283a79f
remove german search indexes (#22554) 2021-11-02 17:55:58 -07:00
Robert Sese 06f9fa101c
Add GHEC link check workflow (#22478)
* Add GHEC link checker workflow

* Update link check script for GHEC

* Remove stale comments
2021-10-29 20:50:22 +00:00
Mike Surowiec eba366be21
update check-github-github-links.js to ignore specific link path (#22479) 2021-10-29 04:44:10 +00:00
Kevin Heis 567652b0e3
Primer 18 b (#22462)
* Create migrate-colors-primer-18.js

* Update colors round 1

* upgrade primer packages

* Update index.scss

* Replace auto colors

* remove btn-primary-matte

* Turns out the class names and variables names DONT LINE UP... ugh....

* Check for allowed var colors
2021-10-28 19:17:23 +00:00
Peter Bengtsson d4c4c46f95
search sync with popular-pages.json (#22353) 2021-10-26 10:08:14 -07:00
Rachael Sewell 1570dc66e6
add ghec version to graphql guides (#22314) 2021-10-22 10:05:17 -07:00
Kevin Heis 0fa35fe0f2
Deprecate allow issue (#22355)
* Update remove-liquid-statements.js

* Update remove-liquid-statements.js

* Update remove-liquid-statements.js
2021-10-21 21:56:02 +00:00
Peter Bengtsson 26e5ee8425
refactor unnecessary use of process.exit(1) (#21974) 2021-10-18 14:43:32 +00:00
Robert Sese f7799cd3dd
Allow 421 on warmup requests (#21973) 2021-10-07 21:44:03 +00:00
James M. Greene bb0455962e
Do not use `build.status` as a looping condition for Heroku deployment (#21909)
* Do not use `build.status` of 'pending' as a looping condition for Heroku deployment
* Don't wait for `appSetup.status` either
* Fix incorrect Octokit method usage in local deploy script
* Bump the number of allowable errors from 5 to 10
* More logging!
* Add an environment variable for easily increasing the number of allowed Heroku failures per phase of polling
2021-10-06 12:57:30 -05:00
James M. Greene 8771695531
Make the HEROKU_PRODUCTION_APP_NAME env var required for prod deployment (#21910) 2021-10-06 11:53:28 -05:00
James M. Greene b4473a9dc6
Delete the 'create-app' module previously used for Docker deployment (#21906) 2021-10-05 18:12:48 -04:00
James M. Greene 9314c0ff94
Remove `gha-` staging app prefix for Actions-based deployments (#21799)
* Make the default app name prefix include the dash

* Remove the default app name prefix
2021-10-05 15:19:47 -05: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
James M. Greene 8d2e1ad577
Enable prod deployment via Actions (Take 2!) (#21852)
* Move concurrency control to top-level in prod deploy workflow

* Add 503 to the list of temporarily acceptable Heroku failure codes

* Add HEROKU_PRODUCTION_APP_NAME back into the prod deploy workflow
2021-10-01 13:37:46 -05:00
Grace Park 96ff67d756
Workflow to test docs.github.com links on github/github (#21601)
* run prettier

* removing files from test/integration

* update cron job to not start on the hour

* add github/github comment

* update comment

* updating to search by indices in the content rather than by line

* small updates and updating character max

* update name of script run

* updating to use api search code and get contents

* using api search code and get contents

* adding token check and .js

* remove blank line for title

* update issue body content

* update comment

* add support for GitHub.developer_help_url links
2021-10-01 17:23:58 +00:00
Marcelo Jacobus aed6c1654f
translation batch 1632491035 (#21717) 2021-09-30 11:53:04 +00:00
James M. Greene 7e954927e2
[DO NOT MERGE] Revert to no longer deploy to production via Actions (#21808)
* Update the production deployment workflow to target the main Heroku app

Without exposing our internal Heroku app name!

* Refactor the staging deployment script a bit to match more closely

* Use the HEROKU_PRODUCTION_APP_NAME Secret in the workflow

* Add a note about the newly required environment variable for production deployment into the local deploy script

* Add critical errors if the HEROKU_PRODUCTION_APP_NAME is missing

* Extract HEROKU_PRODUCTION_APP_NAME from process.env

* Revert the critical parts of PR #21807 to no longer deploy to prod via Actions

* Don't require HEROKU_PRODUCITON_APP_NAME
2021-09-29 15:29:53 -05:00
James M. Greene 90d030a41e
Deploy to the primary production Heroku App via Actions (#21807)
* Update the production deployment workflow to target the main Heroku app

Without exposing our internal Heroku app name!

* Refactor the staging deployment script a bit to match more closely

* Use the HEROKU_PRODUCTION_APP_NAME Secret in the workflow

* Add a note about the newly required environment variable for production deployment into the local deploy script

* Add critical errors if the HEROKU_PRODUCTION_APP_NAME is missing

* Extract HEROKU_PRODUCTION_APP_NAME from process.env
2021-09-29 14:43:29 -05:00
James M. Greene 12134aa84b
Use staging app name module for content changes table generation (#21805)
* Use the 'script/deployment/create-staging-app-name' module when creating the content changes table comments

* Remove the shebang from the non-runnable script helper module
2021-09-29 09:00:19 -07:00
James M. Greene 469e33cbb6
Allow Heroku `500` error codes while polling (#21795)
* Extract allowable Heroku error checks into a reusable function

* Add 500 to the list of allowable Heroku errors while polling
2021-09-28 21:00:03 +00:00
James M. Greene 1d0d782342
Production deploy script (#21768)
* Create a logic branch to deploy to production via a local script

* Ignore forceRebuild default value for production

* Add soft warnings for missing-but-not-critical env vars

* Only include the Preboot delay if the Fastly env vars are present

* Add some warning emojis ⚠️

* More emojis!

* Make FASTLY_* checks all independent

* Add more comments about additional env vars recommended for a local prod deployment
2021-09-27 22:17:21 +00:00
James M. Greene c52671408b
Do not pass `null` config vars to Heroku on AppSetup (#21766) 2021-09-27 15:47:04 -05:00
James M. Greene deab27360c
Announce if Heroku appears to be down (#21762) 2021-09-27 20:17:05 +00:00
James M. Greene 1024ede61d
Explicitly unset the DOCUBOT_REPO_PAT Heroku config var when possible (#21751) 2021-09-27 18:22:02 +00:00
James M. Greene a76f30e5f2
Move delay for Heroku Preboot to before marking deployment successful (#21736)
* Move delay for Heroku Preboot from post-deploy to pre-success

* Shorten arbitrary delay before first Fastly purge
2021-09-24 19:35:13 -05:00
Grace Park 9c9d47f508
Prod deployment workflow (#21223)
* add production deployment

* updating existing build

* remove state

* remove PR_URL and switch to main branch

* break out into build, prepare, and deploy

* update to download-artifact

* update staging to prod

* Actions production deployment redux (#21238)

* Simplify production deployment into a single Actions job

* Force esm to install

* Switch flag ordering to match staging deploy

* Use 'npm install' for the second installation to avoid deleting the prodDeps

* Apply Heroku upload fixes

* Include `.npmrc` file in builds to omit `optionalDeps`

* Remove download-artifact action

Co-authored-by: Grace Park <gracepark@github.com>

* Script updates to prod deployment (#21247)

* updating script to use latest sha

* changing back workflowRunLog

* remove line

* update error wording

* remove comment - using commit sha

* need release.id

* Update script/deployment/deploy-to-production.js

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

* remove hydro

* Update script/deployment/deploy-to-production.js

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

* Update .github/workflows/prod-build-deploy-pr.yml

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

* Update script/deployment/deploy-to-production.js

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

* Update script/deployment/deploy-to-production.js

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

* Update script/deployment/deploy-to-production.js

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

* updating spacing

* add 404/429 responses while polling Heroku API for prod

* removing nested ifs

* adding SOURCE_BLOB_URL

* update for early access

* add install dotenv

* need to add persist-credentials

* Testing GET request

* update request

* Rename workflow file to remove '-pr'

We are now triggering on pushes to 'main' rather than PR merges

* Remove the unnecessary workflow step to create a failure Status

Because the production deploy is done via a single workflow rather than a 2-part workflow chain, this is thankfully unnecessary

* Install all of the npm dependencies

We'll need them!

* Add the '-z' flag to 'tar' to gzip the tarball

* Pass the Heroku upload URL via env vars for security

Prevents potential injection attacks

* Log the deployment ID and log URL as deploy step outputs

* Take notice of Heroku polling resulting in failure statuses

* Add a note to consider waiting for Heroku Preboot

* Add a script and workflow step to purge Fastly

* update response to get sha

* Switch to Octokit functions instead of 'request' method

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-09-24 16:09:08 +00:00
Francis 53ec53d5ac
fix: update ghesReleaseNotesSchema's module name
Closes https://github.com/github/docs-engineering/issues/920
2021-09-23 14:33:36 -07:00
Rachael Sewell bbc5778e4a
add new options to rest schema script (#21571) 2021-09-23 19:34:56 +00:00
James M. Greene e29a965405
Display the reason for Heroku AppSetup failure (#21683) 2021-09-23 10:51:50 -05:00
James M. Greene 0c97550a77
Take notice of Heroku polling resulting in failure statuses (#21680) 2021-09-23 09:55:58 -05:00
Robert Sese f6d85c6d64
Security: remove Docker PR build/deploy workflows (#21599)
* Remove Docker PR build/deploy workflows

* Remove supporting Docker deploy script
2021-09-17 23:17:17 +00:00
James M. Greene b2c8af9d31
Secure early access staging deployment (#21450)
* Explicitly ensure the early access parent directories are created when cloning

* Use explicit --file flag with tar

* Remove security hole for Staging deployment by concatenating archives

* Fail the staging builds if *.js, .npmrc, or Procfile is changed in the open source repo

* docker build: extract user-code in separate directory

* Checkout PR base branch and install dependencies

* Remove one-off package installs

* Remove selective file checkout

* Don't persist git cloning credentials

It usually makes the clone of early access content fail in the later steps

* Update .github/workflows/staging-deploy-pr-docker.yml

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

* Update .github/workflows/staging-deploy-pr-docker.yml

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

* Remove debugging step

* Best practice: Use environment variables to avoid potential injection attacks if the data was user-controlled

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: Robert Sese <sese@github.com>
Co-authored-by: Robert Sese <robert.sese@gmail.com>
2021-09-17 22:41:13 +00:00
James M. Greene 7ae1eea3b5
Undeploy without Environment cleanup (#21530)
* Ensure we handle multiple pages of Deployments
* Do NOT delete the Environment during undeploy
* Do NOT deploy/undeploy PRs on lock/unlock events
2021-09-15 15:11:48 +00:00
James M. Greene 54583d494c
Stale environment cleanup revisions (#21508)
* Remove legacy environment name format
* Ensure we handle multiple pages of Deployments
* Track count of Deployments deleted per Environment
2021-09-14 18:37:21 +00:00
Kevin Heis 43158e8392
Upgrade NPM packages (#21480)
* Upgrade a bunch of packages

* ...and upgrade highlightjs

* ... and ajv-formats (but not ajv)

* Revert graphql changes

* Revert "Revert graphql changes"

This reverts commit a5b8a34d52a48a7c2858415f6b1081c1d4902482.

* Update build-changelog.js

* Upgrade html-entities

* Upgrade commander, following migration guide
2021-09-13 23:31:43 +00:00
Rachael Sewell 94e3c092d3
English search sync (#21446) 2021-09-13 17:30:08 +00:00
James M. Greene 1471ca2e25
Limit environment cleanup by closures, not matching names (#21443) 2021-09-10 22:09:48 +00:00
Robert Sese 6c37f45d61
Docker image deploy: set config vars (#21365)
* Add Hydro secrets as env vars

* Set app config-vars

* Add config vars previously used via app.json
2021-09-10 21:58:49 +00:00
James M. Greene 77fa552f87
Limit deployment environment cleanup per run (#21437)
* Limit deployment environment cleanup per run to reduce the likelihood of exceeding the API rate limit

* Remove the per_page size

* Change wording
2021-09-10 20:48:30 +00:00
James M. Greene 992924b1a1
Allow staging warmup requests to respond with 404 (#21423) 2021-09-10 19:00:26 +00:00
James M. Greene b507b67493
Script+workflow to remove stale staging deployment environments (#21399)
* Add a script to remove stale staging deployment environments from GitHub
* Add second job to cleanup GitHub deployment environments
* Specify GITHUB_TOKEN permissions matrix
* Stop marking staging deployments as transient
* Update staging undeployment mechanism to clean-up deployment environments on PR merge
* Define a stale PR as one that was merged or has been closed for more than 2 hours
* Rename workflow file
2021-09-10 14:43:01 +00:00
Rachael Sewell 54cb650ee5
Fix import statement for deploy script (#21404) 2021-09-10 00:31:02 +00:00
Rachael Sewell 55397df156
update status for deploy timeout (#21349) 2021-09-09 23:13:57 +00:00
Marc-Andre Giroux 264a4f2fbc
Fix example generation for "any" schema types (#21290) 2021-09-09 18:02:53 +00:00
Robert Sese 2c20d13927
Add PR author as app collaborator (#21353) 2021-09-08 00:53:42 +00:00
James M. Greene fe767f3da0
Actions staging deployment with Status updates instead of Check Runs (#21283)
* Update Staging deployment workflow to create Status updates

* Update local Staging deployment script to create Status updates

Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-09-03 18:55:24 +00:00
Robert Sese cbfba14ac1
Docker image deploy to Heroku (#21248)
* Start parallel Docker image deploy workflows

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: James M. Greene <JamesMGreene@users.noreply.github.com>

* Add early access content build stage

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>

* Create Heroku App script and workflow steps

* Tag the image for Heroku

* Push the image and grab the image ID

* Set app name and image id outputs

* Add parallel deploy script for Docker

* Scope workflow run to 'docker-' and release image to Heroku

* Update .github/workflows/staging-build-pr-docker.yml

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

* Exclude Docker workflow

* Cleanup Docker deploys

* Use action sha

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: James M. Greene <JamesMGreene@users.noreply.github.com>
Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-09-03 16:34:48 +00:00
James M. Greene 704f699353
Allow for a few 404/429 responses while polling the Heroku API (#21191) 2021-08-30 14:47:50 +00:00
Mike Surowiec d76c16da19
Scope markdown body (#21082)
* update article content to markdown ui component

* decouple lunr indexing from class name

* remove summary outline none rule, apply utility class instead

* improve typing

* scope more styles down to markdown-body/extended-markdown

* move all markdown-body style overrides to MarkdownContent component

* fix class targeting within css module

* clean up MarkdownContent header style

* rename data-lunr to data-search

* fix: inline code color issue

* fix: update article markdown to work with MarkdownContent
2021-08-30 14:24:49 +00:00
Rachael Sewell df16267a8f
remove cached-index-names file and dry run sync used for Algolia (#21133) 2021-08-25 22:04:26 +00:00
James M. Greene 08db1c970c
Refactor Staging deployment workflow to support open source PRs (#20459)
* Add a Staging build workflow

* Remove all commented out code from build workflow

It will be handled in https://github.com/github/docs-engineering/issues/726

* Use pinned version of upload-artifact action

* Tweaks to build

* Minor deployment script refactoring

* Update the Staging deployment workflow

* Missed refactoring tweak

* Add relevant comments

* Update Heroku app naming convention for Actions deploy to include 'gha-' prefix

* Update Heroku app ConfigVars and SourceBlob for optional prebuilt app

* Remove obsolete 'dist/' dir from PR build artifact

See https://github.com/github/docs-internal/pull/20405

* Ensure a new enough version of npm is used

* Switch to creating a tarball for upload

* Remove obsolete 'layouts' dir from file list

* Ditch the verbosity for 'tar'... too many files

* Add tarball support to deploy

* Add esm workaround to deploy script

See https://github.com/actions/github-script/issues/168

* Temporarily ignore staging deploy workflow from workflow linter

* Update deployment to use a Heroku Build Source instead of a GitHub Actions Artifact

* Update undeploy workflow to use ESM workaround

See https://github.com/actions/github-script/issues/168

* Add 'esm' package to optionalDependencies to better support workaround

See https://github.com/actions/github-script/issues/168

* Add Slack notifications for workflow failures

* Wrap AppSetup polling in try-catch

* Improve dyno monitoring

* Rename 'script/deploy' to have a .js extension #esm

* Update script references to include the extension

* Use non-deprecated Sources API for Heroku

* Use normal quotes

* Stub in a step to mark deployment inactive after timing out

* Apply suggestions from code review

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

Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-08-25 20:45:51 +00:00
Rachael Sewell 9a96a2699f
Deprecation workflow updates (#20962) 2021-08-18 23:05:04 +00:00
Rachael Sewell 8e7b1a0370
Remove 2.21 from the supported list of GHES versions (#20935) 2021-08-17 15:43:06 -07:00
Lucas Costi ee29fedb4e
Remove breaking commander functions (#20825)
.passCommandToAction() is undefined, and was removed in Commander 7.0.0. See release note: a9c9f17c7e/CHANGELOG.md (deleted)
2021-08-12 20:24:56 +00:00
Rachael Sewell a92853e40d
reapply some classes for lunr indexing (#20765) 2021-08-11 15:06:01 +00:00
Grace Park 2dbea3737a
Removing algolia (#20633) 2021-08-05 13:10:51 -04:00
Kevin Heis b29e37318a
Remove `import x` statements (#20594)
* Clear out most import x

* Update rimraf use

* Move up readme blocks in scripts
2021-07-29 20:28:30 +00:00
Kevin Heis 1ed18e1448
Clear out some non-fn references to Algolia (#20592)
* Clear out some non-fn references to Algolia

* Update .github/workflows/dry-run-sync-search-indices.yml

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

* Update contributing/search.md

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

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-07-29 20:20:55 +00:00
Kevin Heis 0b1ff73a46
Update some readFileSync to await readFile with top level await (#20525)
* Update some readFileSync to await readFile with top level await

* More updates

* Update all-products.js

* Use 'lib/readfile-async.js' in runtime files for better performance

* Remove unnecessary use of 'for await...of' loops

* Revert to importing 'fs/promises'

Co-authored-by: James M. Greene <jamesmgreene@github.com>
2021-07-29 16:45:46 +00:00
Kevin Heis d68dde17d1
Upgrade pipeline with env `COMMONMARK=1 npm start` to see new, otherwise parse current (#20508)
* Update the trim nightmare

* Update create-processor.js

* Update other packages in the rendering pipeline

* A few more updates

* Fix tables

* Update lint-files.js

* Fix copy code blocks

* Update render-content.js

* remove whitespace from liquid conditionals

* We no longer need require eslint rules

* Neat, it worked

* Revert test change

* Update create-processor.js

* Without aliases

Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-07-29 14:24:26 +00:00
Kevin Heis eddadb875e
LFS the Lunr Indexes (#20521)
* LFS the Lunr Indexes

* Add a note about installing Git LFS

* Run "install" command

* Update indexes

* Index names
2021-07-27 22:06:31 +00:00
Mike Surowiec 9386571aa4
fix: use named export for all-versions (#20478)
* fix: use named export for all-versions

* run prettier
2021-07-22 19:29:00 +00:00
Rachael Sewell d9b75d1e58
Deprecate 2.21 script updates (#20454) 2021-07-21 21:22:38 +00:00
James M. Greene df301cb5da
Remove all code related to Redis page caching (#20457)
Towards simplification for https://github.com/github/docs-engineering/issues/678
2021-07-21 20:44:00 +00:00
Kevin Heis fa0fbd0db9
Delete unneeded script files (#20426)
* Delete convert-cjs-to-esm.mjs

* Delete commonmark-indent.js
2021-07-20 16:35:38 -07:00
Sarah Schneider cc2d10d1b3
Rewrite Liquid deprecation script (#20225) 2021-07-19 22:36:15 +00:00
Kevin Heis c451f3269e
Script to update ol/ul indents from 2 to 4 spaces (#20384)
* Script to update ol/ul indents from 2 to 4 spaces

* Update commonmark-indent.js

* Update commonmark-indent.js
2021-07-19 15:04:22 +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