Skip to content

Commit

Permalink
Merge branch 'main' into spec-url-validator
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner authored Dec 10, 2024
2 parents 7be9f82 + 39638bb commit a512cd7
Show file tree
Hide file tree
Showing 2,653 changed files with 84,831 additions and 31,192 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/data-problem.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "Data problem"
title: "<NAME THE FEATURE> - <SUMMARIZE THE PROBLEM>"
description: Report incorrect, incomplete, or missing data
labels: ["needs-triage"]
body:
- type: markdown
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "Enhancement"
description: An enhancement to BCD's infrastructure
labels: ["enhancement :1st_place_medal:"]
labels: ["needs-triage", "enhancement"]
body:
- type: markdown
attributes:
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/infra-problem.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: "Infrastructure/Linter Problem"
description: Report issues with infrastructure, including scripts and linters
labels: ["needs-triage"]
body:
- type: markdown
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ updates:
time: "11:00"
open-pull-requests-limit: 10
labels:
- "infra :building_construction:"
- "dependencies :chains:"
- "infra"
- "dependencies"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
30 changes: 30 additions & 0 deletions .github/issue-regex-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
data:api:
- 'api\.'
- '\/docs\/Web\/API'
data:css:
- 'css\.'
- '\/docs\/Web\/CSS'
data:html:
- 'html\.'
- '\/docs\/Web\/HTML'
data:http:
- 'http\.'
- '\/docs\/Web\/HTTP'
data:js:
- 'js\.'
- '\/docs\/Web\/JavaScript'
data:mathml:
- 'mathml\.'
- '\/docs\/Web\/MathML'
data:svg:
- 'svg\.'
- '\/docs\/Web\/SVG'
data:wasm:
- 'webassembly\.'
- '\/docs\/WebAssembly'
data:webdriver:
- 'webdriver\.'
- '\/docs\/Web\/WebDriver'
data:webext:
- 'webextensions\.'
- '\/docs\/Mozilla\/Add-ons'
36 changes: 18 additions & 18 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
# This file is used by .github/workflows/labeler.yml to label pull requests based on the files changed in the PR.
# Object matching syntax: https://github.com/actions/labeler/blob/main/README.md#match-object
bulk_update :package::
bulk_update:
- changed-files:
- any-glob-to-any-file:
- "scripts/migrations/**"
data:api :rabbit2::
data:api:
- changed-files:
- any-glob-to-any-file:
- "api/**"
data:browsers :earth_africa::
data:browsers:
- changed-files:
- any-glob-to-any-file:
- "browsers/**"
data:css :art::
data:css:
- changed-files:
- any-glob-to-any-file:
- "css/**"
data:html :page_facing_up::
data:html:
- changed-files:
- any-glob-to-any-file:
- "html/**"
data:http :mountain_cableway::
data:http:
- changed-files:
- any-glob-to-any-file:
- "http/**"
data:js :pager::
data:js:
- changed-files:
- any-glob-to-any-file:
- "javascript/**"
data:mathml :heavy_division_sign::
data:mathml:
- changed-files:
- any-glob-to-any-file:
- "mathml/**"
data:svg :paintbrush::
data:svg:
- changed-files:
- any-glob-to-any-file:
- "svg/**"
data:wasm :mechanical_arm::
data:wasm:
- changed-files:
- any-glob-to-any-file:
- "webassembly/**"
data:webdriver :racing_car::
data:webdriver:
- changed-files:
- any-glob-to-any-file:
- "webdriver/**"
data:webext :game_die::
data:webext:
- changed-files:
- any-glob-to-any-file:
- "webextensions/**"
dependencies :chains::
dependencies:
- changed-files:
- any-glob-to-any-file:
- "package-lock.json"
docs :writing_hand::
docs:
- changed-files:
- any-glob-to-any-file:
- "**/*.md"
infra :building_construction::
infra:
- changed-files:
- any-glob-to-any-file:
- ".*"
Expand All @@ -69,15 +69,15 @@ infra :building_construction::
- ".github/**"
- ".husky/**"
- ".vscode/**"
linter :house_with_garden::
linter:
- changed-files:
- any-glob-to-any-file:
- "lint/**"
scripts :scroll::
scripts:
- changed-files:
- any-glob-to-any-file:
- "scripts/**"
schema :gear::
schema:
- changed-files:
- any-glob-to-any-file:
- "schemas/**"
4 changes: 2 additions & 2 deletions .github/workflows/close-incomplete-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
close-issues-if-invalid:
runs-on: ubuntu-latest
steps:
- uses: queengooborg/invalid-issue-closer@v1.4.0
- uses: queengooborg/invalid-issue-closer@v1.5.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
labels: "invalid :no_entry_sign:"
labels: "invalid"
comment: |
This issue was automatically closed because the title was left as the default, and a summary was not added.
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/issue-regex-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Labels issues by BCD key, MDN URL or other regex match in issue description.
name: Issue Labeler
on:
issues:
types: [opened]

jobs:
issue-labeler:
runs-on: ubuntu-latest
steps:
- uses: github/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/issue-regex-labeler.yml
enable-versioned-regex: 0
30 changes: 25 additions & 5 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,36 @@ on:
pull_request_target:

permissions:
contents: read
contents: read # to determine modified files
issues: write # pr-size-labeler uses the issues API until https://github.com/CodelyTV/pr-size-labeler/pull/89 is merged
pull-requests: write # to add labels to PRs

jobs:
triage:
permissions:
contents: read # for actions/labeler to determine modified files
pull-requests: write # for actions/labeler to add labels to PRs
label-py-path:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
sync-labels: true

label-by-size:
if: github.actor != 'dependabot[bot]' && !startsWith(github.event.pull_request.title, 'Release v')
needs: label-py-path
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: "6"
s_label: "size:s"
s_max_size: "24"
m_label: "size:m"
m_max_size: "100"
l_label: "size:l"
l_max_size: "1000"
xl_label: "size:xl"
fail_if_xl: "false"
message_if_xl: ""
1 change: 1 addition & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Node.js CI

on:
push:
branches: ["main"]
pull_request:

permissions:
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/pr-reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Reviewdog

on:
pull_request_target:
branches: ["main"]

jobs:
fix:
name: Fix
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: npm

- run: npm ci

- run: npm run fix
env:
FORCE_COLOR: 3

- run: git diff > diff.patch

- name: Upload diff
uses: actions/upload-artifact@v4
with:
name: diff
path: diff.patch

suggest:
name: Suggest
needs: fix
runs-on: ubuntu-latest
permissions:
pull-requests: write

steps:
- uses: actions/checkout@v4

- name: Download diff
uses: actions/download-artifact@v4
with:
name: diff

- name: Setup
uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest

- name: Suggest changes
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cat diff.patch | reviewdog \
-name="bcd-linter" \
-f=diff \
-f.diff.strip=1 \
-filter-mode=diff_context \
-reporter=github-pr-review
46 changes: 46 additions & 0 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release PR

on:
workflow_dispatch:
push:
branches:
- main

env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

concurrency:
group: ${{ github.workflow }}

jobs:
manage-release-pr:
if: github.repository == 'mdn/browser-compat-data' && github.actor != 'dependabot[bot]' && !startsWith(github.event.head_commit.message, 'Release v')
name: Manage release PR
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
token: ${{ secrets.GH_TOKEN }}

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: "https://registry.npmjs.org/"
cache: npm

- name: "Setup git"
run: |
git config user.email [email protected]
git config user.name mdn-bot
- name: Install
run: npm ci

- name: Release
run: npm run release
25 changes: 23 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,40 @@
name: Release package

on:
push:
branches:
- main
paths:
- "RELEASE_NOTES.md"
release:
types:
- published

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

permissions:
contents: write
issues: write

jobs:
build:
create-release:
if: github.repository == 'mdn/browser-compat-data' && github.event_name == 'push' && startsWith(github.event.head_commit.message, 'Release v')
name: Create release
runs-on: ubuntu-latest

steps:
- name: Checkout (BCD)
uses: actions/checkout@v4

- name: Create release
run: |
VERSION=v$(jq -r '.version' package.json)
awk '/^## /{if (p) exit; p=1; next} p' RELEASE_NOTES.md | tail -n +4 >> CURRENT_RELEASE_NOTES.md
gh release create $VERSION --title=$VERSION --target $GITHUB_SHA --notes-file CURRENT_RELEASE_NOTES.md --latest
publish-release:
if: github.event_name == 'release'
name: Publish release
runs-on: ubuntu-latest

Expand Down
Loading

0 comments on commit a512cd7

Please sign in to comment.