Skip to content

Commit

Permalink
Merge branch 'main' into xBZZZZ/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed Feb 2, 2025
2 parents b5dcb02 + c496cb4 commit 2cca199
Show file tree
Hide file tree
Showing 7,068 changed files with 228,471 additions and 152,106 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
29 changes: 14 additions & 15 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +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
# Templates and sidebars (rari)
/files/jsondata/L10n-Template.json @mdn/core-dev
/files/sidebars/ @mdn/core-dev

# ============================= CONTROL FILES ============================= #
# The CODEOWNERS file must end with these matches: Any pull request changing
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/content-bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
### Before you start
**Want to change a page yourself?** This content is open source!
↩ Look for the _Edit on GitHub_ link on any MDN page.
↩ Look for the _View this page on GitHub_ link on any MDN page to edit the content on github.com afterwards.
**Is your issue about a browser compatibility table?**
↩ Use the _Report problems with this compatibility data on GitHub_ link next to a compatibility table.
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/page-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
### Before you start
**Want to change this page yourself?** This content is open source!
↩ Go back and use the _Edit on GitHub_ link on the page.
↩ Go back and use the _View this page on GitHub_ link on the page to edit the content on github.com afterwards.
**Is your issue about the browser compatibility table?**
↩ Go back and use the _Report problems with this compatibility data on GitHub_ link on the page.
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
1 change: 1 addition & 0 deletions .github/workflows/auto-cleanup-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
yarn content fix-flaws
yarn fix:md
yarn fix:fm
node scripts/sort_and_unique_file_lines.js .vscode/dictionaries
- name: Create PR with only fixable issues
if: success()
Expand Down
69 changes: 57 additions & 12 deletions .github/workflows/pr-check-lint_content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@ jobs:
run: |
# Use the GitHub API to get the list of changed files
# documentation: https://docs.github.com/rest/commits/commits#compare-two-commits
DIFF_DOCUMENTS=$(gh api repos/{owner}/{repo}/compare/${{ env.BASE_SHA }}...${{ env.HEAD_SHA }} \
DIFF_DOCUMENTS=$(gh api repos/{owner}/{repo}/compare/${BASE_SHA}...${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/.*\.md$" | xargs)
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 "108879845+mdn-bot@users.noreply.github.com"
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 All @@ -101,15 +109,23 @@ jobs:
echo "FM_LINT_FAILED=${FM_LINT_FAILED}" >> $GITHUB_ENV
echo "Running Prettier"
PRETTIER_FAILED=false
PRETTIER_LOG=$(yarn prettier --check ${files_to_lint} 2>&1) || PRETTIER_FAILED=true
echo "PRETTIER_LOG<<${EOF}" >> $GITHUB_ENV
echo "${PRETTIER_LOG}" >> $GITHUB_ENV
echo "${EOF}" >> $GITHUB_ENV
echo "PRETTIER_FAILED=${PRETTIER_FAILED}" >> $GITHUB_ENV
yarn prettier -w ${files_to_lint}
if [[ -n $(git diff) ]]; then
echo "FILES_MODIFIED=true" >> $GITHUB_ENV
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
Expand Down Expand Up @@ -147,11 +163,40 @@ 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 "\nLogs from markdownlint:"
echo "${MD_LINT_LOG}"
echo -e "\nLogs from front-matter linter:"
echo "${FM_LINT_LOG}"
echo -e "\nPlease fix all the linting issues mentioned in above logs and in the review comments."
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}"
fi
if [[ ${FM_LINT_FAILED} == 'true' ]]; then
echo -e "\n\n🪵 Logs from front-matter linter:"
echo "${FM_LINT_LOG}"
fi
if [[ ${PRETTIER_FAILED} == 'true' ]]; then
echo -e "\n\n🪵 Logs from Prettier formatter:"
echo "${PRETTIER_LOG}"
echo -e "\nYou can use Prettier playground to format the files online (configuration pre-filled): https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBiABABwIYGd7owAWc6CMAlgE6kBmFANqSTSADQgSaXS7KjYqVCAHcACoIR8U2BiOwBPPhwBGVbGADWcGAGVsAWzgAZClDjIYVAK5xV6rTt04wZgOaWbdkLjgGKnrYccAAemHBUFEawsgAqEVCCFHDStLK+HLjuTACK1hDwyGkMGSAAVrghutlweQUWSMWlAI758GLCmNIgeAC05nAAJkPsIFbYjO4AwhAGBtjIPQwMo1lQbkwAgjBWFCrW7RGm5kXp3kQwBgwA6kQU8LgucLpS9xQAbvcKi2C4yiDvWwASSgw1gujAkW4m1BuhgCiYpxK3kwwl813UmEWqJSEXeFg4Zl8VBgHWwbnmSNKOCoxMW8yomkGoigo1RZhg1wog2IyAAHAAGDg0VrUOBkikLRpnDgwbAqLk8ojIABMHGsvli8tSMpAfhUQ2Gg2M2HW1nJcAAYhAqPMdu5FtgDhAQABfV1AA \n"
fi
exit 1
Loading

0 comments on commit 2cca199

Please sign in to comment.