1
0
mirror of synced 2025-12-23 03:44:00 -05:00
Commit Graph

443 Commits

Author SHA1 Message Date
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