Skip to content

Commit

Permalink
Merge branch 'main' into houdini
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdavidmills authored Jan 17, 2024
2 parents 5ff83c6 + acb4615 commit 97e65c8
Show file tree
Hide file tree
Showing 262 changed files with 1,576 additions and 1,429 deletions.
42 changes: 42 additions & 0 deletions .github/pull-request-size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Configuration for PR Size Labeler

# List of files to exclude from size calculation
# Files matching these patterns will not be considered when calculating PR size
exclude_files:
- "files/en-us/_redirects.txt"
- "files/en-us/_wikihistory.json"

# Configuration for labeling based on the size of the Pull Request
# Each entry defines a size label, along with thresholds for diff and file count
label_configs:
# Configuration for 'extra small' PRs
- size: xs
diff: 10 # Threshold for the total lines of code changed (additions + deletions)
files: 1 # Threshold for the total number of files changed
labels: ["size/xs"] # Labels to be applied for this size

# Configuration for 'small' PRs
- size: s
diff: 25
files: 5
labels: ["size/s"]

# Configuration for 'medium' PRs
- size: m
diff: 100
files: 10
# Additional labels can be added, e.g.;
# labels: ["size/m", "pairing-wanted"]
labels: ["size/m"]

# Configuration for 'large' PRs
- size: l
diff: 250
files: 25
labels: ["size/l"]

# Configuration for 'extra large' PRs
- size: xl
diff: 500
files: 50
labels: ["size/xl"]
30 changes: 28 additions & 2 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,39 @@
name: "Pull request labeler"
name: Pull request labeler

on:
- pull_request_target

permissions:
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'
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

# Docs: https://github.com/cbrgm/pr-size-labeler-action
label-by-size:
# do not run on forks
if: github.repository == 'mdn/content'
needs: label-by-path
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Label PR based on size
uses: cbrgm/pr-size-labeler-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_repository: ${{ github.repository }} # Repository name
github_pr_number: ${{ github.event.number }} # Pull request number
config_file_path: ".github/pull-request-size.yml" # Path to pr-size-labeler config
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"],
}
58 changes: 29 additions & 29 deletions .markdownlint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,29 @@
// Disabled, as some callouts include headings.
"heading-increment": false,
"ul-style": {
"style": "dash"
"style": "dash",
},
"ul-indent": {
"indent": 2
"indent": 2,
},
"no-hard-tabs": {
"spaces_per_tab": 2
"spaces_per_tab": 2,
},
"line-length": false,
"no-duplicate-heading": {
"allow_different_nesting": true
"siblings_only": true,
},
"single-title": {
"front_matter_title": "^\\s*title\\s*[:=]"
"front_matter_title": "^\\s*title\\s*[:=]",
},
"no-trailing-punctuation": {
"punctuation": ".,;:"
"punctuation": ".,;:",
},
// Consecutive Notes/Callouts currently don't conform with this rule
"no-blanks-blockquote": false,
// Force ordered numbering to catch accidental list ending from indenting
"ol-prefix": {
"style": "ordered"
"style": "ordered",
},
"no-inline-html": {
"allowed_elements": [
Expand Down Expand Up @@ -99,8 +99,8 @@
"thead",
"tr",
"ul",
"var"
]
"var",
],
},
"no-bare-urls": false,
// Produces too many false positives
Expand All @@ -109,13 +109,13 @@
// See https://github.com/mdn/content/pull/20026, as macros currently break this
"no-empty-links": false,
"code-block-style": {
"style": "fenced"
"style": "fenced",
},
"emphasis-style": {
"style": "underscore"
"style": "underscore",
},
"strong-style": {
"style": "asterisk"
"style": "asterisk",
},
// Disabled, as yari generates link fragments by replacing spaces with underscores, not dashes.
"link-fragments": false,
Expand All @@ -128,90 +128,90 @@
"message": "Don't use curly double quotes",
"searchPattern": "/“|”/g",
"replace": "\"",
"searchScope": "text"
"searchScope": "text",
},
{
"name": "curly-single-quotes",
"message": "Don't use curly single quotes",
"searchPattern": "/‘|’/g",
"replace": "'",
"searchScope": "text"
"searchScope": "text",
},
{
"name": "nbsp",
"message": "Don't use no-break spaces",
"searchPattern": "/ /g",
"replace": " ",
"searchScope": "all"
"searchScope": "all",
},
{
"name": "m-dash",
"message": "Don't use '--'. Use m-dash — instead",
"search": " -- ",
"replace": " — ",
"searchScope": "text"
"searchScope": "text",
},
{
"name": "relative-link",
"message": "Internal links should start with '/'",
"searchPattern": "/([\\(\"])en-US\\/docs/g",
"replace": "$1/en-US/docs",
"searchScope": "text"
"searchScope": "text",
},
{
"name": "relative-link-path",
"message": "Don't use relative paths",
"search": "](..",
"searchScope": "text"
"searchScope": "text",
},
{
"name": "trailing-spaces",
"message": "Avoid trailing spaces",
"searchPattern": "/ +$/gm",
"replace": "",
"searchScope": "all"
"searchScope": "all",
},
{
"name": "double-spaces",
"message": "Avoid double spaces",
"searchPattern": "/([^\\s>]) ([^\\s|])/g",
"replace": "$1 $2",
"searchScope": "text"
"searchScope": "text",
},
{
"name": "stuck-definition",
"message": "Character is stuck to definition description marker",
"searchPattern": "/- :(\\w)/g",
"replace": "- : $1",
"searchScope": "text"
"searchScope": "text",
},
{
"name": "fqdn-moz-links",
"message": "Don't use developer.mozilla.org for links, except for blog posts",
"searchPattern": "/\\]\\(https:\\/\\/developer.mozilla.org\\/(?!en-US\\/blog\\/)/g",
"replace": "](/",
"searchScope": "text"
"searchScope": "text",
},
{
"name": "incorrect-spelling",
"message": "Incorrect spelling",
"searchPattern": ["/e-mail/ig", "/(w)eb site/ig"],
"replace": ["email", "$1ebsite"],
"searchScope": "all"
"searchScope": "all",
},
{
"name": "localhost-links",
"message": "Don't use localhost for links",
"searchPattern": "/\\]\\(https?:\\/\\/localhost:\\d+\\//g",
"replace": "](/",
"searchScope": "text"
"searchScope": "text",
},
{
"name": "un-closed-md-link",
"message": "Missng closing bracket ')'",
"message": "Missing closing bracket ')'",
"searchPattern": "/(\\[[^\\]]*?\\]\\(([^\\)\\n]|\\([^\\)\\n]\\)|\\s[\"'])+?)(\\n|\\s|[,:][\\s\\n])/gm",
"searchScope": "text"
}
]
}
"searchScope": "text",
},
],
},
}
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ To ensure that all MDN documents follow the same formatting, we use both [Pretti
If you have a [local checkout](#forking-and-cloning-the-repository) of the repository and have [installed the dependencies](#preparing-the-project), or you are using [github.dev](https://github.dev), a pre-commit hook will be installed which automatically runs while making a commit. To save some headache and improve your work flow while authoring, you may wish to [configure your editor to automatically run Prettier](https://prettier.io/docs/en/editors.html). Alternatively, you may run `yarn fix:md` in the command line to manually format all Markdown files.
> **Note:** Automatically formatting changes does not work for pull requests opened using the GitHub Web UI as described in the ["Simple changes" section](#simple-changes). This may result in failed status checks on pull requests. If you're not sure about how to fix this, [get in touch with us](/en-US/docs/MDN/Community/Communication_channels) for help.
> **Note:** Automatically formatting changes does not work for pull requests opened using the GitHub Web UI as described in the ["Simple changes" section](#simple-changes). This may result in failed status checks on pull requests. If you're not sure about how to fix this, [get in touch with us][]! for help.
### Adding a new document
Expand Down Expand Up @@ -274,7 +274,13 @@ Let's say you want to move the entire `/en-US/Learn/Accessibility` tree to `/en-
yarn content move Learn/Accessibility Learn/A11y
```
3. Commit all of the changes and push your branch to the remote:
3. Once files are moved we need to update references to those files in the other content files as well. Use following command to update all the references automatically in one go:
```bash
node scripts/update-moved-file-links.js
```
4. Commit all the changes and push your branch to the remote:
```bash
git add .
Expand Down
13 changes: 6 additions & 7 deletions files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
/en-US/docs/Accessibility/Accessible_dynamic_content /en-US/docs/Web/Accessibility/An_overview_of_accessible_web_applications_and_widgets
/en-US/docs/Accessibility/Accessible_forms/alerts /en-US/docs/Web/Accessibility/ARIA
/en-US/docs/Accessibility/An_overview_of_accessible_web_applications_and_widgets /en-US/docs/Web/Accessibility/An_overview_of_accessible_web_applications_and_widgets
/en-US/docs/Accessibility/Architecture /en-US/docs/Web/Accessibility/Architecture
/en-US/docs/Accessibility/Community /en-US/docs/Web/Accessibility
/en-US/docs/Accessibility/FAQ /en-US/docs/Web/Accessibility
/en-US/docs/Accessibility/HTML_To_MSAA /en-US/docs/Web/Accessibility
Expand All @@ -123,7 +122,6 @@
/en-US/docs/Accessibility/Keyboard-navigable_JavaScript_widgets /en-US/docs/Web/Accessibility/Keyboard-navigable_JavaScript_widgets
/en-US/docs/Accessibility/Web_Development /en-US/docs/Web/Accessibility
/en-US/docs/Accessibility/Web_applications_and_ARIA_FAQ /en-US/docs/Web/Accessibility/ARIA
/en-US/docs/Accessibility:Architecture /en-US/docs/Web/Accessibility/Architecture
/en-US/docs/Accessibility:Community /en-US/docs/Web/Accessibility
/en-US/docs/Accessibility_FAQ /en-US/docs/Web/Accessibility
/en-US/docs/Accessibility_Information_for_Web_Authors /en-US/docs/Web/Accessibility/Information_for_Web_authors
Expand Down Expand Up @@ -5412,7 +5410,7 @@
/en-US/docs/MDN/Contribute/Content/Layout/Reference_page /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference
/en-US/docs/MDN/Contribute/Content/Layout/Reference_subpage /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference
/en-US/docs/MDN/Contribute/Content/Macros /en-US/docs/MDN/Writing_guidelines/Page_structures/Macros
/en-US/docs/MDN/Contribute/Content/Quicklinks /en-US/docs/MDN/Writing_guidelines/Page_structures/Quicklinks
/en-US/docs/MDN/Contribute/Content/Quicklinks /en-US/docs/MDN/Writing_guidelines/Page_structures/Sidebars
/en-US/docs/MDN/Contribute/Content/Specification_tables /en-US/docs/MDN/Writing_guidelines/Page_structures/Specification_tables
/en-US/docs/MDN/Contribute/Content/Style_guide /en-US/docs/MDN/Writing_guidelines/Writing_style_guide
/en-US/docs/MDN/Contribute/Creating_and_editing_pages /en-US/docs/MDN/Writing_guidelines/Howto/Creating_moving_deleting
Expand Down Expand Up @@ -5445,7 +5443,7 @@
/en-US/docs/MDN/Contribute/Guidelines/Layout/Reference_page /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference
/en-US/docs/MDN/Contribute/Guidelines/Layout/Reference_subpage /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference
/en-US/docs/MDN/Contribute/Guidelines/Macros /en-US/docs/MDN/Writing_guidelines/Page_structures/Macros
/en-US/docs/MDN/Contribute/Guidelines/Quicklinks /en-US/docs/MDN/Writing_guidelines/Page_structures/Quicklinks
/en-US/docs/MDN/Contribute/Guidelines/Quicklinks /en-US/docs/MDN/Writing_guidelines/Page_structures/Sidebars
/en-US/docs/MDN/Contribute/Guidelines/Specification_tables /en-US/docs/MDN/Writing_guidelines/Page_structures/Specification_tables
/en-US/docs/MDN/Contribute/Guidelines/Style_guide /en-US/docs/MDN/Writing_guidelines/Writing_style_guide
/en-US/docs/MDN/Contribute/Guidelines/Video /en-US/docs/MDN/Writing_guidelines/Howto/Images_media
Expand Down Expand Up @@ -5508,7 +5506,7 @@
/en-US/docs/MDN/Contribute/Structures/Page_types/HTML_element_page_template /en-US/docs/MDN/Writing_guidelines/Page_structures/Page_types/HTML_element_page_template
/en-US/docs/MDN/Contribute/Structures/Page_types/HTTP_header_page_template /en-US/docs/MDN/Writing_guidelines/Page_structures/Page_types/HTTP_header_page_template
/en-US/docs/MDN/Contribute/Structures/Page_types/SVG_element_page_template /en-US/docs/MDN/Writing_guidelines/Page_structures/Page_types/SVG_element_page_template
/en-US/docs/MDN/Contribute/Structures/Quicklinks /en-US/docs/MDN/Writing_guidelines/Page_structures/Quicklinks
/en-US/docs/MDN/Contribute/Structures/Quicklinks /en-US/docs/MDN/Writing_guidelines/Page_structures/Sidebars
/en-US/docs/MDN/Contribute/Structures/Specification_tables /en-US/docs/MDN/Writing_guidelines/Page_structures/Specification_tables
/en-US/docs/MDN/Contribute/Structures/Syntax_sections /en-US/docs/MDN/Writing_guidelines/Page_structures/Syntax_sections
/en-US/docs/MDN/Contribute/Style_guide /en-US/docs/MDN/Writing_guidelines
Expand All @@ -5517,7 +5515,7 @@
/en-US/docs/MDN/Contribute/Style_guide/Custom_macros /en-US/docs/MDN/Writing_guidelines/Page_structures/Macros/Commonly_used_macros
/en-US/docs/MDN/Contribute/Style_guide/Live_samples /en-US/docs/MDN/Writing_guidelines/Page_structures/Live_samples
/en-US/docs/MDN/Contribute/Style_guide/Macros /en-US/docs/MDN/Writing_guidelines/Page_structures/Macros
/en-US/docs/MDN/Contribute/Style_guide/Quicklinks /en-US/docs/MDN/Writing_guidelines/Page_structures/Quicklinks
/en-US/docs/MDN/Contribute/Style_guide/Quicklinks /en-US/docs/MDN/Writing_guidelines/Page_structures/Sidebars
/en-US/docs/MDN/Contribute/Style_guide/Specification_tables /en-US/docs/MDN/Writing_guidelines/Page_structures/Specification_tables
/en-US/docs/MDN/Contribute/Tagging /en-US/docs/MDN/Writing_guidelines/Howto
/en-US/docs/MDN/Contribute/Tasks /en-US/docs/MDN/Community/Contributing/Getting_started
Expand Down Expand Up @@ -5585,7 +5583,7 @@
/en-US/docs/MDN/Structures/Page_types/HTML_element_page_template /en-US/docs/MDN/Writing_guidelines/Page_structures/Page_types/HTML_element_page_template
/en-US/docs/MDN/Structures/Page_types/HTTP_header_page_template /en-US/docs/MDN/Writing_guidelines/Page_structures/Page_types/HTTP_header_page_template
/en-US/docs/MDN/Structures/Page_types/SVG_element_page_template /en-US/docs/MDN/Writing_guidelines/Page_structures/Page_types/SVG_element_page_template
/en-US/docs/MDN/Structures/Quicklinks /en-US/docs/MDN/Writing_guidelines/Page_structures/Quicklinks
/en-US/docs/MDN/Structures/Quicklinks /en-US/docs/MDN/Writing_guidelines/Page_structures/Sidebars
/en-US/docs/MDN/Structures/Specification_tables /en-US/docs/MDN/Writing_guidelines/Page_structures/Specification_tables
/en-US/docs/MDN/Structures/Syntax_sections /en-US/docs/MDN/Writing_guidelines/Page_structures/Syntax_sections
/en-US/docs/MDN/Tools https://github.com/mdn/yari/tree/main/docs
Expand All @@ -5598,6 +5596,7 @@
/en-US/docs/MDN/User_guide/Troubleshooting_KumaScript_errors https://github.com/mdn/yari/tree/main/docs/kumascript/troubleshooting-errors.md
/en-US/docs/MDN/Writing_guidelines/Creating_moving_deleting /en-US/docs/MDN/Writing_guidelines/Howto/Creating_moving_deleting
/en-US/docs/MDN/Writing_guidelines/Howto/Tag /en-US/docs/MDN/Writing_guidelines/Howto
/en-US/docs/MDN/Writing_guidelines/Page_structures/Quicklinks /en-US/docs/MDN/Writing_guidelines/Page_structures/Sidebars
/en-US/docs/MDN/Writing_guidelines/Research_technology /en-US/docs/MDN/Writing_guidelines/Howto/Research_technology
/en-US/docs/MDN/Writing_guidelines/What_we_write/Inclusion_criteria /en-US/docs/MDN/Writing_guidelines/What_we_write/Criteria_for_inclusion
/en-US/docs/MDN/Yari https://github.com/mdn/yari/tree/main/docs
Expand Down
17 changes: 0 additions & 17 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -12954,10 +12954,6 @@
"aswan"
]
},
"Mozilla/Add-ons/WebExtensions/API/downloads/drag": {
"modified": "2020-10-15T21:44:35.541Z",
"contributors": ["wbamberg", "Makyen", "chrisdavidmills"]
},
"Mozilla/Add-ons/WebExtensions/API/downloads/erase": {
"modified": "2020-10-15T21:44:38.278Z",
"contributors": ["wbamberg", "Makyen", "chrisdavidmills"]
Expand Down Expand Up @@ -72661,19 +72657,6 @@
"peterbraden"
]
},
"Web/Accessibility/Architecture": {
"modified": "2019-03-24T00:11:44.656Z",
"contributors": [
"Sheppy",
"fscholz",
"badrfoot",
"Aaronlev",
"Joanmarie",
"Parente",
"Rd4Uix",
"Nickolay"
]
},
"Web/Accessibility/Cognitive_accessibility": {
"modified": "2019-11-18T16:53:41.344Z",
"contributors": ["Igor-Sangin", "ericwbailey", "estelle", "jswisher"]
Expand Down
Loading

0 comments on commit 97e65c8

Please sign in to comment.