Skip to content

Commit

Permalink
Merge branch 'main' into html_autocomplete_usage
Browse files Browse the repository at this point in the history
  • Loading branch information
estelle authored Mar 27, 2024
2 parents 7534e2a + 2ceee44 commit 847799a
Show file tree
Hide file tree
Showing 3,668 changed files with 33,496 additions and 16,358 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Baseline issue
url: https://github.com/web-platform-dx/web-features
about: Baseline issues should be reported in the repository hosting Baseline data.
- name: Content or feature request
url: https://github.com/mdn/mdn/issues/new/choose
about: Propose new content for MDN Web Docs or submit a feature request using this link.
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/auto-cleanup-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,31 @@ jobs:
- name: Create PR with only fixable issues
if: success()
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
commit-message: "chore: auto-fix Markdownlint, Prettier, and front-matter issues"
branch: markdownlint-auto-cleanup
title: "fix: auto-cleanup by bot"
author: mdn-bot <[email protected]>
committer: mdn-bot <[email protected]>
body: |
All issues auto-fixed
labels: |
automated pr
token: ${{ secrets.AUTOMERGE_TOKEN }}

- name: Create PR with notice on unfixed issues
if: failure()
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
commit-message: "chore: auto-fix Markdownlint, Prettier, and front-matter issues"
branch: markdownlint-auto-cleanup
title: "fix: auto-cleanup by bot"
author: mdn-bot <[email protected]>
committer: mdn-bot <[email protected]>
body: |
Auto-fix was run, but additional issues found.
Please review the run log: https://github.com/mdn/content/actions/runs/${{ github.run_id }}
labels: |
automated pr
token: ${{ secrets.AUTOMERGE_TOKEN }}
5 changes: 4 additions & 1 deletion .github/workflows/interfacedata-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ jobs:
run: node scripts/update-interface-data.js ../webref/

- name: Create pull request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
path: mdn-content
token: ${{ secrets.AUTOMERGE_TOKEN }}
title: Update InterfaceData based on WebRef
author: mdn-bot <[email protected]>
committer: mdn-bot <[email protected]>
commit-message: Update InterfaceData based on WebRef
body: Automated changes generated by scripts/update-interface-data via interface-updater github workflow
labels: |
automated pr
delete-branch: true
branch: interfacedata-update
2 changes: 1 addition & 1 deletion .github/workflows/issue-regex-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
issue-labeler:
runs-on: ubuntu-latest
steps:
- uses: github/issue-labeler@v3.3
- uses: github/issue-labeler@v3.4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/issue-regex-labeler.yml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on-demand-preview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:

# See https://www.peterbe.com/plog/install-python-poetry-github-actions-faster
- name: Load cached ~/.local
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.local
# the trailing number is used to increase for getting
Expand All @@ -123,7 +123,7 @@ jobs:

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: yari/deployer/.venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('.github/workflows/pr-review-companion.yml') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ping-other-repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Ping w3c/mdn-spec-links
# This is one of many possible repos we can ping. When adding other
# repos, you can follow this w3c/mdn-spec-links one as an example.
uses: peter-evans/repository-dispatch@v2
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.REPO_PINGER_MDN_SPEC_LINKS }}
repository: w3c/mdn-spec-links
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 @@ -21,7 +21,7 @@ jobs:
# This is a "required" workflow so path filtering can not be used:
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks
# We have to rely on a custom filtering mechanism to run the checks only if required files are modified.
- uses: dorny/paths-filter@v2
- uses: dorny/paths-filter@v3
name: See if any file needs checking
id: filter
with:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/pr-check_url-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Check URL issues

on:
pull_request:
branches:
- main
paths:
- "files/**/*.md"

jobs:
check_url_issues:
#if: github.repository == 'mdn/content'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: yarn

- name: Check URL deletions and broken fragments
run: |
echo "::add-matcher::.github/workflows/url-issues-problem-matcher.json"
git fetch origin main
node scripts/log-url-issues.js --workflow
39 changes: 37 additions & 2 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,48 @@
name: "Pull request labeler"
name: PR labeler

on:
- pull_request_target

permissions:
issues: write
pull-requests: write
contents: read

jobs:
triage:
# Docs: https://github.com/actions/labeler
label-by-path:
# do not run on forks
if: github.repository == 'mdn/content'
name: Label by path
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

# Docs: https://github.com/CodelyTV/pr-size-labeler
label-by-size:
# do not run on forks
if: github.repository == 'mdn/content'
needs: label-by-path
name: Label by size
runs-on: ubuntu-latest
steps:
- uses: codelytv/pr-size-labeler@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
github_api_url: "https://api.github.com"
xs_label: "size/xs"
xs_max_size: "5"
s_label: "size/s"
s_max_size: "50"
m_label: "size/m"
m_max_size: "500"
l_label: "size/l"
l_max_size: "1000"
xl_label: "size/xl"
fail_if_xl: "false"
message_if_xl: ""
files_to_ignore: |
"files/en-us/_redirects.txt"
"files/en-us/_wikihistory.json"
4 changes: 2 additions & 2 deletions .github/workflows/pr-review-companion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

# See https://www.peterbe.com/plog/install-python-poetry-github-actions-faster
- name: Load cached ~/.local
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.local
# the trailing number is used to increase for getting
Expand All @@ -45,7 +45,7 @@ jobs:

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: yari/deployer/.venv
# the trailing number is used to increase for getting
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/url-issues-problem-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"problemMatcher": [
{
"owner": "log-url-issues",
"severity": "error",
"pattern": [
{
"regexp": "^(ERROR|WARN|INFO):(.+):(\\d+):(\\d+):(.+)$",
"severity": 1,
"file": 2,
"line": 3,
"column": 4,
"message": 5
}
]
}
]
}
16 changes: 16 additions & 0 deletions .husky/post-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env sh

BRANCH="$(git rev-parse --abbrev-ref HEAD)"
if [ "$BRANCH" != "main" ]; then
exit 0
fi

if [ -f ".husky/_/history" ]; then
lastHash=$(cat ./.husky/_/history)
isUpdated=$(git diff $lastHash HEAD -- ./package.json)
if [ "$isUpdated" != "" ]; then
echo "\n⚠🔥 'package.json' has changed. Please run 'yarn install'! 🔥"
fi
else
yarn install
fi
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
3 changes: 2 additions & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"prettier --write"
],
"tests/**/*.*": "yarn test:front-matter-linter",
"*.{svg,png,jpeg,jpg,gif}": "yarn filecheck"
"*.{svg,png,jpeg,jpg,gif}": "yarn filecheck",
"*": "node scripts/log-url-issues.js"
}
4 changes: 2 additions & 2 deletions .markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"config": {
"extends": "./.markdownlint.jsonc"
"extends": "./.markdownlint.jsonc",
},
"customRules": ["markdownlint-rule-search-replace"],
"ignores": ["node_modules", ".git", ".github", "tests"]
"ignores": ["node_modules", ".git", ".github", "tests"],
}
Loading

0 comments on commit 847799a

Please sign in to comment.