Skip to content

Commit

Permalink
Merge branch 'main' into ja/prettier/web/api/1
Browse files Browse the repository at this point in the history
  • Loading branch information
queengooborg authored Aug 1, 2023
2 parents 02c04e3 + ecacb0e commit 43f3810
Show file tree
Hide file tree
Showing 4,416 changed files with 66,962 additions and 52,310 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
45 changes: 45 additions & 0 deletions .github/workflows/reviewdog.yml
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
35 changes: 4 additions & 31 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ build/
/files/fr/web/css/justify-content/index.md
/files/fr/web/css/place-items/index.md
/files/fr/web/css/place-self/index.md
/files/fr/web/javascript/reference/global_objects/array/includes/index.md
/files/fr/web/javascript/reference/global_objects/intl/displaynames/of/index.md
/files/pt-br/learn/server-side/django/forms/index.md
/files/ru/learn/server-side/django/forms/index.md
/files/ru/learn/server-side/django/introduction/index.md
/files/ru/learn/html/introduction_to_html/the_head_metadata_in_html/index.md
/files/zh-cn/learn/css/howto/css_faq/index.md
/files/zh-cn/learn/server-side/django/forms/index.md
/files/zh-cn/web/javascript/reference/operators/exponentiation/index.md
/files/zh-cn/web/javascript/reference/operators/exponentiation_assignment/index.md

# A full pass on all Markdown files is being performed.
# The following folders still need a full pass:
Expand All @@ -38,15 +41,8 @@ build/
/files/es/web/css/**/*.md
/files/es/web/javascript/reference/**/*.md

# fr
/files/fr/web/javascript/**/*.md

# ja
/files/ja/learn/javascript/**/*.md
/files/ja/mozilla/**/*.md
/files/ja/mdn/**/*.md
/files/ja/mozilla/add-ons/**/*.md
/files/ja/mozilla/add-ons/webextensions/api/**/*.md
/files/ja/web/api/**/*.md
/files/ja/web/css/**/*.md
/files/ja/web/html/**/*.md
Expand All @@ -55,24 +51,9 @@ build/
/files/ja/web/svg/**/*.md

# ko
/files/ko/glossary/**/*.md
/files/ko/learn/**/*.md
/files/ko/learn/css/**/*.md
/files/ko/learn/html/**/*.md
/files/ko/learn/javascript/**/*.md
/files/ko/learn/server-side/**/*.md
/files/ko/mdn/**/*.md
/files/ko/mozilla/**/*.md
/files/ko/mozilla/add-ons/**/*.md
/files/ko/mozilla/add-ons/webextensions/api/**/*.md
/files/ko/mozilla/firefox**/*.md
/files/ko/web/**/*.md
/files/ko/web/api/**/*.md
/files/ko/web/css/**/*.md
/files/ko/web/html/**/*.md
/files/ko/web/http/**/*.md
/files/ko/web/javascript/**/*.md
/files/ko/web/svg/**/*.md

# pt-br
/files/pt-br/web/api/**/*.md
Expand All @@ -89,11 +70,3 @@ build/
/files/ru/web/http/**/*.md
/files/ru/web/javascript/**/*.md
/files/ru/web/svg/**/*.md

# zh-cn
/files/zh-cn/web/api/**/*.md
/files/zh-cn/web/css/**/*.md
/files/zh-cn/web/html/**/*.md
/files/zh-cn/web/http/**/*.md
/files/zh-cn/web/javascript/reference/**/*.md
/files/zh-cn/web/svg/**/*.md
Loading

0 comments on commit 43f3810

Please sign in to comment.