-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ko/localized-links/4
- Loading branch information
Showing
11,926 changed files
with
186,237 additions
and
168,901 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# AutoCorrect Link ignore rules. | ||
# https://github.com/huacnlee/autocorrect | ||
# | ||
# Like `.gitignore`, this file to tell AutoCorrect which files need to check, some need to ignore. | ||
files/ | ||
docs/ | ||
!files/zh-cn/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
textRules: | ||
一二三,四五六.七八九: 0 | ||
一二三,四五六,七八九,一二三,四五六,七八九: 0 | ||
9.9亿: 0 |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,3 +87,4 @@ | |
/.github/ @mdn/core-dev | ||
/* @mdn/core-dev | ||
/*.md @mdn/core-dev @mdn/core-yari-content | ||
/.prettierignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# This workflow to use AutoCorrect tool for checking the copywriting, correct spaces and punctuations for CJK contents. | ||
# | ||
# For example: | ||
# | ||
# - incorrect: "欢迎阅读MDN文档." | ||
# - correct: "欢迎阅读 MDN 文档。" | ||
# | ||
# - incorrect: "Welcome,this is MDN Web Docs。" | ||
# - correct: "Welcome, to read MDN Web Docs." | ||
# | ||
# More details: | ||
# https://github.com/huacnlee/autocorrect | ||
name: AutoCorrect Lint | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get changed files | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BASE_SHA: ${{ github.event.pull_request.base.sha }} | ||
HEAD_SHA: ${{ github.event.pull_request.head.sha }} | ||
run: | | ||
# Use the GitHub API to get the list of changed files | ||
# documenation: https://docs.github.com/rest/commits/commits#compare-two-commits | ||
DIFF_DOCUMENTS=$(gh api repos/{owner}/{repo}/compare/${{ env.BASE_SHA }}...${{ env.HEAD_SHA }} \ | ||
--jq '.files | .[] | select(.status|IN("added", "modified", "renamed", "copied", "changed")) | .filename') | ||
# filter out files that are not markdown | ||
DIFF_DOCUMENTS=$(echo "${DIFF_DOCUMENTS}" | egrep -i "^files/zh-cn/" | xargs) | ||
echo "DIFF_DOCUMENTS=${DIFF_DOCUMENTS}" >> $GITHUB_ENV | ||
- name: AutoCorrect changed content | ||
if: ${{ env.DIFF_DOCUMENTS }} | ||
uses: huacnlee/[email protected] | ||
with: | ||
args: ${{ env.DIFF_DOCUMENTS }} --lint --no-diff-bg-color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: reviewdog | ||
|
||
on: | ||
- pull_request | ||
|
||
jobs: | ||
prettier: | ||
# do not run on forks | ||
if: github.repository == 'mdn/translated-content' | ||
name: prettier | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get changed files | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BASE_SHA: ${{ github.event.pull_request.base.sha }} | ||
HEAD_SHA: ${{ github.event.pull_request.head.sha }} | ||
run: | | ||
# Use the GitHub API to get the list of changed files | ||
# documenation: https://docs.github.com/rest/commits/commits#compare-two-commits | ||
DIFF_DOCUMENTS=$(gh api repos/{owner}/{repo}/compare/${{ env.BASE_SHA }}...${{ env.HEAD_SHA }} --jq '.files | .[] | select(.status|IN("added", "modified", "renamed", "copied", "changed")) | .filename' | xargs) | ||
echo "DIFF_DOCUMENTS=${DIFF_DOCUMENTS}" >> $GITHUB_ENV | ||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: yarn | ||
|
||
- name: Install all yarn packages | ||
run: yarn --frozen-lockfile | ||
env: | ||
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Perform linting | ||
run: yarn prettier --ignore-unknown --write ${{ env.DIFF_DOCUMENTS }} | ||
|
||
- name: Submit suggestion | ||
uses: reviewdog/action-suggester@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
tool_name: prettier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.