1
0
mirror of synced 2025-12-23 11:54:18 -05:00
Commit Graph

424 Commits

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