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

53 Коммитов

Автор SHA1 Сообщение Дата
Sarah Schneider 9613805a95
Make TODOCS placeholder case-insensitive (#33205) 2022-12-05 20:53:22 +00:00
Peter Bengtsson 98cb108644
remove loadSiteData from tests/linting/lint-versioning.js (#33125) 2022-12-01 15:25:48 +00:00
Peter Bengtsson e686578674
remove loadSiteData from tests/linting/lint-files.js (#33124) 2022-12-01 15:25:40 +00:00
Sarah Edwards 1bd0efef1c
Add linter for personal access token literals (#31824) 2022-10-24 19:50:36 +00:00
Sarah Schneider 16cbe928d5
Add linter to catch placeholder text (#30817)
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-10-17 15:11:28 +00:00
Sarah Schneider e0006ae542
Catch deprecated GHAE flags in feature-based versioning (#31097)
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
2022-09-26 14:12:42 +00: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
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
Peter Bengtsson 8765c628ff
dedicated search results page (redux) (#29902)
* dedicated search results page (redux)

* Update SearchResults.tsx

* adding pagination

* fix pagination

* say something on NoQuery

* better Flash

* tidying link

* small fixes for results

* debug info

* l18n the meta info

* inDebugMode

* basic jest rendering of the skeleton page

* basic jest rendering test

* fix content tests

* better document title

* fix tests

* quote query in page title

* use home page sidebar

* something when nothing is found

* parseInt no longer needs the 10

* fix linting tests

* fix test

* prettier

* Update pages/search.tsx

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

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-08-19 13:36:55 +00:00
Peter Bengtsson ee1f20f4fb
jest 28.1.1 (#28797)
* got 28.1.1

* wip

* force upgrade nth-check

* legacyFakeTimers
2022-06-29 11:55:03 +00:00
Sarah Schneider 56c1531708 make the pattern a string in all-versions so it can be serialized, and regex-ify it during implementation 2022-06-07 18:38:50 -04:00
Sarah Schneider 092de5186e improve the validation 2022-06-07 16:14:03 -04:00
Sarah Schneider 2a03cad6dc remove redundant test 2022-06-07 16:13:38 -04:00
Sarah Schneider cc3e827239 update tests to support ifversion for FBV instead of if 2022-06-06 18:11:45 -04:00
Sarah Schneider 1b016e26e8 extract versioning linters into a separate file 2022-06-06 10:54:14 -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
Lucas Costi b49c768777
Version actions for GHES, use reusables (#26004)
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Sarah Edwards <skedwards88@github.com>
2022-04-01 09:36:17 +10:00
Peter Bengtsson 5d5c3e971b
add context to liquid rendering in linting tests (#26055)
* HACK

* back

* remove consolelog

* remove debugging

* remove more debugging
2022-03-09 16:45:18 +00:00
Peter Bengtsson edb0da95f1
move test/utils.js to where it belongs (#23586) 2021-12-11 19:58:34 +00:00
Peter Bengtsson 26014646dd
Massive DIFF_FILES crashes bash in repo-sync (#23326)
* Massive DIFF_FILES crashes bash in repo-sync

Part of #1304

* gst

* make exception
2021-12-02 18:57:38 +00:00
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
Peter Bengtsson 480159e778
only lint the files that changed (#22924)
* only lint the files that changed

* allowed action

* do nothing

* debug more

* less debugging

* debug

* debug

* debug

* using patterns

* testing something

* testing something (2)

* lemme try something

* lemme try something

* one more attempt

* testing

* tidying up

* sample changes

* add debugging

* some code comments

* fine but sample changes

* update allowed actions

* final cleaning before opening PR for review

* tiny update

* remove commented out code

* feedbacked
2021-11-18 03:03:47 +00:00
Martin Lopes 83dc407ada
Restructure Actions guides (#21577)
Co-authored-by: Sarah Edwards <skedwards88@github.com>
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
2021-09-22 16:49:41 +10:00
Grace Park 6a490ed8bb
Adding next next version support (#21481)
* adding next next version support

* adding check for next next version

* update to use semver
2021-09-15 13:24:33 -07:00
Mike Surowiec 06d8f81401
Two-pane Experiment (#21092)
* pull changes from docs-playground

* cleanup, add callout banner

* cleanup linting and test fixes

* add discussion link

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-08-26 14:19:40 -04:00
Rachael Sewell 8e7b1a0370
Remove 2.21 from the supported list of GHES versions (#20935) 2021-08-17 15:43:06 -07: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
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
Sarah Schneider cc2d10d1b3
Rewrite Liquid deprecation script (#20225) 2021-07-19 22:36:15 +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
Sarah Schneider 7de66fe4ef Merge branch 'main' of github.com:github/docs-internal into script-to-use-short-versions 2021-06-24 10:14:50 -04:00
Sarah Schneider 489031c805 add a note about linting test 2021-06-22 13:44:22 -04:00
Sarah Schneider 7f0737b162 add feature versions schema and tests 2021-06-17 14:41:31 -04:00
Sarah Schneider f4b455b0c3 move from test helpers to script helpers 2021-06-16 13:14:55 -04:00
Sarah Schneider b848e89ae5 add a linter to prevent if tags for versioning 2021-06-15 15:03:39 -04:00
Sarah Schneider d96fa5e2f0 add convience props to context and put supported ops in a separate module 2021-06-14 16:24:48 -04:00
Sarah Schneider 5d7174d035 remove .only 2021-06-11 15:32:01 -04:00
Sarah Schneider 7466e24a9b Merge branch 'main' of github.com:github/docs-internal into support-short-versions 2021-06-11 15:25:20 -04:00
Sarah Schneider b4b4804a07 add ifversion tag linter 2021-06-11 15:23:09 -04:00
Felicity Chapman 23b0b84111
Add Code security landing and guides pages (#19650) 2021-06-10 20:14:56 +00:00
Sarah Schneider 33cec6f10f add linter to catch use of {% if version %} instead of {% ifversion %} 2021-06-10 12:12:00 -04:00
Sarah Schneider 534996d81c change ifver to ifversion 2021-06-10 11:53:56 -04:00
Sarah Schneider b8bc94aed4 Merge branch 'main' of github.com:github/docs-internal into support-short-versions 2021-06-10 11:50:52 -04:00
Sarah Schneider 4f43873bbc throw errors if we are trying to evaluate strings in Liquid conditionals (they always evaluate to true and may render content we don't want) 2021-06-09 17:00:05 -04:00
Kate Higa d578acf8f6 add necessary eslint/prettier/typescript plugins 2021-06-09 09:37:15 -07:00
Sarah Schneider 49166811f5 exercise the GHAE schema in lint-files 2021-05-28 11:32:41 -04:00
Kevin Heis f6acb1f08a
Update dependencies (#19408)
* Update dependencies 2

* Lint fixes

* Update graphql packages

* Update changelog-entry.json

* Update @octokit/rest

* Update commander with help from @rachmari

@rachmari

* Upgrade helmet

* Upgrade js-yaml

* Update server.js

* Update cheerio

* Revert "Update cheerio"

This reverts commit 8aa17c39fbf564ee554037d89e7a473027d16984.
2021-05-19 17:32:47 +00:00
Sarah Schneider e30292c0fd add feature flagged conditionals to tests 2021-05-18 20:44:46 -04:00