Skip to content

Commit

Permalink
Merge branch 'main' into feoffset
Browse files Browse the repository at this point in the history
  • Loading branch information
estelle authored Jan 29, 2025
2 parents 369886e + 284fb56 commit fd22dcb
Show file tree
Hide file tree
Showing 738 changed files with 29,161 additions and 2,807 deletions.
31 changes: 13 additions & 18 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,36 @@
# Default content owners
/files/en-us/ @mdn/yari-content-mdn

# MDN Firefox release notes
/files/en-us/mozilla/ @mdn/core-yari-content

# Mozilla Add-ons
/files/en-us/mozilla/add-ons/ @mdn/yari-content-mozilla-add-ons

# Accessibility
/files/en-us/web/accessibility/ @mdn/yari-content-accessibility
/files/en-us/learn/accessibility/ @mdn/yari-content-accessibility

# Web API
/files/en-us/web/api/ @mdn/yari-content-web-api

# CSS
/files/en-us/web/css/ @mdn/yari-content-css
/files/en-us/learn/css/ @mdn/yari-content-css

# HTML
/files/en-us/web/html/ @mdn/yari-content-html
/files/en-us/learn/html/ @mdn/yari-content-html

# JavaScript
/files/en-us/web/javascript/ @mdn/yari-content-javascript
/files/en-us/learn/javascript/ @mdn/yari-content-javascript

# HTTP
/files/en-us/web/http/ @mdn/yari-content-http
/files/en-us/learn/server-side/ @mdn/yari-content-http

# Web API
/files/en-us/web/api/ @mdn/yari-content-web-api

# Mozilla Add-ons
/files/en-us/mozilla/add-ons/ @mdn/yari-content-mozilla-add-ons
# JavaScript
/files/en-us/web/javascript/ @mdn/yari-content-javascript

# MathML
/files/en-us/web/mathml/ @mdn/content-mathml

# MDN Firefox Release Notes
/files/en-us/mozilla/firefox @mdn/core-yari-content

# New templates and sidebars
# Templates and sidebars (rari)
/files/jsondata/L10n-Template.json @mdn/core-dev
/files/sidebars @mdn/core-dev
/files/sidebars/ @mdn/core-dev

# ============================= CONTROL FILES ============================= #
# The CODEOWNERS file must end with these matches: Any pull request changing
Expand Down
44 changes: 23 additions & 21 deletions .github/issue-regex-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,29 @@ Content:HTTP:
Content:JS:
- '\/docs\/Web\/JavaScript'
Content:Learn:
- '\/docs\/Learn\/(Common|Front|Getting|Learning|Performance)'
Content:Learn:Accessibility:
- '\/docs\/Learn\/Accessibility'
Content:Learn:Client-side:
- '\/docs\/Learn\/Tools_and_testing\/(Client-side|Understanding_client-side)'
Content:Learn:Cross-Browser-Testing:
- '\/docs\/Learn\/Tools_and_testing\/Cross_browser_testing'
Content:Learn:CSS:
- '\/docs\/Learn\/CSS'
Content:Learn:Django:
- '\/docs\/Learn\/Server-side\/Django'
Content:Learn:Express:
- '\/docs\/Learn\/Server-side\/Express_Nodejs'
Content:Learn:Forms:
- '\/docs\/Learn\/Forms'
Content:Learn:GitHub:
- '\/docs\/Learn\/Tools_and_testing\/GitHub'
Content:Learn:HTML:
- '\/docs\/Learn\/HTML'
Content:Learn:JavaScript:
- '\/docs\/Learn\/JavaScript'
- '\/docs\/Learn_web_development\/'
# Mapping for old directories, see https://github.com/mdn/content/pull/36967
#
# Content:Learn:Accessibility:
# - '\/docs\/Learn\/Accessibility'
# Content:Learn:Client-side:
# - '\/docs\/Learn\/Tools_and_testing\/(Client-side|Understanding_client-side)'
# Content:Learn:Cross-Browser-Testing:
# - '\/docs\/Learn\/Tools_and_testing\/Cross_browser_testing'
# Content:Learn:CSS:
# - '\/docs\/Learn\/CSS'
# Content:Learn:Django:
# - '\/docs\/Learn\/Server-side\/Django'
# Content:Learn:Express:
# - '\/docs\/Learn\/Server-side\/Express_Nodejs'
# Content:Learn:Forms:
# - '\/docs\/Learn\/Forms'
# Content:Learn:GitHub:
# - '\/docs\/Learn\/Tools_and_testing\/GitHub'
# Content:Learn:HTML:
# - '\/docs\/Learn\/HTML'
# Content:Learn:JavaScript:
# - '\/docs\/Learn\/JavaScript'
Content:Manifest:
- '\/docs\/Web\/Manifest'
Content:MathML:
Expand Down
98 changes: 44 additions & 54 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,62 +57,53 @@ Content:JS:
Content:Learn:
- changed-files:
- all-globs-to-any-file:
- files/en-us/learn/**
- "!files/en-us/learn/accessibility/**"
- "!files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/**"
- "!files/en-us/learn/tools_and_testing/understanding_client-side_tools/**"
- "!files/en-us/learn/tools_and_testing/cross_browser_testing/**"
- "!files/en-us/learn/css/**"
- "!files/en-us/learn/server-side/django/**"
- "!files/en-us/learn/server-side/express_nodejs/**"
- "!files/en-us/learn/forms/**"
- "!files/en-us/learn/tools_and_testing/github/**"
- "!files/en-us/learn/html/**"
- "!files/en-us/learn/javascript/**"
- files/en-us/learn_web_development/**
- changed-files:
- any-glob-to-any-file:
- files/en-us/web/tutorials/**
Content:Learn:Accessibility:
- changed-files:
- any-glob-to-any-file:
- files/en-us/learn/accessibility/**
Content:Learn:Client-side:
- changed-files:
- any-glob-to-any-file:
- files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/**
- files/en-us/learn/tools_and_testing/understanding_client-side_tools/**
Content:Learn:Cross-Browser-Testing:
- changed-files:
- any-glob-to-any-file:
- files/en-us/learn/tools_and_testing/cross_browser_testing/**
Content:Learn:CSS:
- changed-files:
- any-glob-to-any-file:
- files/en-us/learn/css/**
Content:Learn:Django:
- changed-files:
- any-glob-to-any-file:
- files/en-us/learn/server-side/django/**
Content:Learn:Express:
- changed-files:
- any-glob-to-any-file:
- files/en-us/learn/server-side/express_nodejs/**
Content:Learn:Forms:
- changed-files:
- any-glob-to-any-file:
- files/en-us/learn/forms/**
Content:Learn:GitHub:
- changed-files:
- any-glob-to-any-file:
- files/en-us/learn/tools_and_testing/github/**
Content:Learn:HTML:
- changed-files:
- any-glob-to-any-file:
- files/en-us/learn/html/**
Content:Learn:JavaScript:
- changed-files:
- any-glob-to-any-file:
- files/en-us/learn/javascript/**
# Mapping for old directories, see https://github.com/mdn/content/pull/36967
#
# Content:Learn:Accessibility:
# - changed-files:
# - any-glob-to-any-file:
# - files/en-us/learn/accessibility/**
# Content:Learn:Client-side:
# - changed-files:
# - any-glob-to-any-file:
# - files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/**
# - files/en-us/learn/tools_and_testing/understanding_client-side_tools/**
# Content:Learn:Cross-Browser-Testing:
# - changed-files:
# - any-glob-to-any-file:
# - files/en-us/learn/tools_and_testing/cross_browser_testing/**
# Content:Learn:CSS:
# - changed-files:
# - any-glob-to-any-file:
# - files/en-us/learn/css/**
# Content:Learn:Django:
# - changed-files:
# - any-glob-to-any-file:
# - files/en-us/learn/server-side/django/**
# Content:Learn:Express:
# - changed-files:
# - any-glob-to-any-file:
# - files/en-us/learn/server-side/express_nodejs/**
# Content:Learn:Forms:
# - changed-files:
# - any-glob-to-any-file:
# - files/en-us/learn/forms/**
# Content:Learn:GitHub:
# - changed-files:
# - any-glob-to-any-file:
# - files/en-us/learn/tools_and_testing/github/**
# Content:Learn:HTML:
# - changed-files:
# - any-glob-to-any-file:
# - files/en-us/learn/html/**
# Content:Learn:JavaScript:
# - changed-files:
# - any-glob-to-any-file:
# - files/en-us/learn/javascript/**
Content:Manifest:
- changed-files:
- any-glob-to-any-file:
Expand Down Expand Up @@ -170,7 +161,6 @@ Content:Other:
- changed-files:
- any-glob-to-any-file:
- files/en-us/related/**
- files/en-us/web/demos/**
- files/en-us/web/exslt/**
- files/en-us/web/opensearch/**
- files/en-us/web/privacy/**
Expand Down
36 changes: 27 additions & 9 deletions .github/workflows/pr-check-lint_content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ jobs:
echo "DIFF_DOCUMENTS=${DIFF_DOCUMENTS}" >> $GITHUB_ENV
- name: Checkout HEAD
if: ${{ env.DIFF_DOCUMENTS }}
if: env.DIFF_DOCUMENTS
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
path: pr_head

- name: Get changed content from HEAD
if: ${{ env.DIFF_DOCUMENTS }}
if: env.DIFF_DOCUMENTS
run: |
git config --global user.email "[email protected]"
git config --global user.name "mdn-bot"
Expand All @@ -62,28 +62,36 @@ jobs:
git commit -m "Code from PR head"
- name: Setup Node.js environment
if: ${{ env.DIFF_DOCUMENTS }}
if: env.DIFF_DOCUMENTS
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: yarn

- name: Install all yarn packages
if: ${{ env.DIFF_DOCUMENTS }}
if: env.DIFF_DOCUMENTS
run: yarn --frozen-lockfile
env:
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Lint and format markdown files
if: ${{ env.DIFF_DOCUMENTS }}
if: env.DIFF_DOCUMENTS
run: |
# Generate random delimiter
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
EOF="$(openssl rand -hex 8)"
files_to_lint="$DIFF_DOCUMENTS"
echo "crlf line ending check"
CRLF_FAILED=true
CRLF_LOG=$(git ls-files --eol ${files_to_lint} | grep -E 'w/(mixed|crlf)') || CRLF_FAILED=false
echo "CRLF_LOG<<${EOF}" >> $GITHUB_ENV
echo "${CRLF_LOG}" >> $GITHUB_ENV
echo "${EOF}" >> $GITHUB_ENV
echo "CRLF_FAILED=${CRLF_FAILED}" >> $GITHUB_ENV
echo "Running markdownlint --fix"
MD_LINT_FAILED=false
MD_LINT_LOG=$(yarn markdownlint-cli2 --fix ${files_to_lint} 2>&1) || MD_LINT_FAILED=true
Expand Down Expand Up @@ -114,19 +122,20 @@ jobs:
fi
# info for troubleshooting
echo CRLF_FAILED=${CRLF_FAILED}
echo MD_LINT_FAILED=${MD_LINT_FAILED}
echo FM_LINT_FAILED=${FM_LINT_FAILED}
echo PRETTIER_FAILED=${PRETTIER_FAILED}
git diff
- name: Setup reviewdog
if: ${{ env.FILES_MODIFIED == 'true' || env.MD_LINT_FAILED == 'true' }}
if: env.FILES_MODIFIED == 'true' || env.MD_LINT_FAILED == 'true'
uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest

- name: Suggest changes using diff
if: ${{ env.FILES_MODIFIED == 'true' }}
if: env.FILES_MODIFIED == 'true'
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -141,7 +150,7 @@ jobs:
-reporter=github-pr-review < "${TMPFILE}"
- name: Add reviews for markdownlint errors
if: ${{ env.MD_LINT_FAILED == 'true' }}
if: env.MD_LINT_FAILED == 'true'
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -154,17 +163,26 @@ jobs:
-reporter="github-pr-review"
- name: Fail if any issues pending
if: ${{ env.FILES_MODIFIED == 'true' || env.MD_LINT_FAILED == 'true' || env.FM_LINT_FAILED == 'true' }}
if: env.FILES_MODIFIED == 'true' || env.CRLF_FAILED == 'true' || env.MD_LINT_FAILED == 'true' || env.FM_LINT_FAILED == 'true'
env:
CRLF_FAILED: ${{ env.CRLF_FAILED }}
MD_LINT_FAILED: ${{ env.MD_LINT_FAILED }}
FM_LINT_FAILED: ${{ env.FM_LINT_FAILED }}
PRETTIER_FAILED: ${{ env.PRETTIER_FAILED }}
CRLF_LOG: ${{ env.CRLF_LOG }}
MD_LINT_LOG: ${{ env.MD_LINT_LOG }}
FM_LINT_LOG: ${{ env.FM_LINT_LOG }}
PRETTIER_LOG: ${{ env.PRETTIER_LOG }}
run: |
echo -e "\nPlease fix all the linting issues mentioned in the following logs and in the PR review comments."
if [[ ${CRLF_FAILED} == 'true' ]]; then
echo -e "\n\n🪵 In the following files make sure all the lines end with only Line Feed (LF) character and not with Carriage Return Line Feed (CRLF) characters:"
echo "${CRLF_LOG}"
echo "For more information refer https://gist.github.com/LunarLambda/3df0840b336a5e314e4ffdac03cbf619 ."
echo "You may use https://app.execeratics.com/LFandCRLFonline/?l=en online tool to convert line endings from CRLF to LF."
fi
if [[ ${MD_LINT_FAILED} == 'true' ]]; then
echo -e "\n\n🪵 Logs from markdownlint:"
echo "${MD_LINT_LOG}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-check_redirects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:

- name: Check redirects file(s)
if: steps.filter.outputs.required_files == 'true'
run: yarn content validate-redirects en-us --strict
run: yarn content:legacy validate-redirects en-us --strict
Loading

0 comments on commit fd22dcb

Please sign in to comment.