diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9a60e240cb5c89..b29c0114306a65 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -3,10 +3,12 @@ name: Node.js CI on: push: branches: ["main"] - pull_request: + pull_request_target: + branches: ["main"] permissions: contents: read + pull-requests: write jobs: test: @@ -22,3 +24,29 @@ jobs: - run: npm test env: FORCE_COLOR: 3 + + - name: Reviewdog - Apply fixes + if: failure() && github.event_name == 'pull_request_target' + run: | + npm run fix + if ! git diff --quiet; then + echo "HAS_FIXES=true" >> $GITHUB_ENV + fi + + - name: Reviewdog - Setup + if: failure() && github.event_name == 'pull_request_target' && env.HAS_FIXES == 'true' + uses: reviewdog/action-setup@v1 + with: + reviewdog_version: latest + + - name: Reviewdog - Suggest changes + if: failure() && github.event_name == 'pull_request_target' && env.HAS_FIXES == 'true' + env: + REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git diff | reviewdog \ + -name="bcd-linter" \ + -f=diff \ + -f.diff.strip=1 \ + -filter-mode=diff_context \ + -reporter=github-pr-review diff --git a/api/AbortController.json b/api/AbortController.json index ba3cab3b626880..96f01a84eae63c 100644 --- a/api/AbortController.json +++ b/api/AbortController.json @@ -54,8 +54,8 @@ }, "AbortController": { "__compat": { - "description": "`AbortController()` constructor", - "mdn_url": "https://developer.mozilla.org/docs/Web/API/AbortController/AbortController", + "description": "`AbortController()` constructor", + "spec_url": "https://dom.spec.whatwg.org/#ref-for-dom-abortcontroller-abortcontrollerâ‘ ", "tags": [ "web-features:aborting" diff --git a/http/headers/Content-Security-Policy.json b/http/headers/Content-Security-Policy.json index 64dc4a85df7bdc..6c1ee46a99cd45 100644 --- a/http/headers/Content-Security-Policy.json +++ b/http/headers/Content-Security-Policy.json @@ -746,7 +746,7 @@ "report-sample": { "__compat": { "description": "`report-sample` source value", - "mdn_url": "https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy#fetch_directive_syntax", + "mdn_url": "https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/Sources#report-sample", "support": { "chrome": { "version_added": "59" @@ -1152,7 +1152,7 @@ "strict-dynamic": { "__compat": { "description": "`strict-dynamic` source value", - "mdn_url": "https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy#fetch_directive_syntax", + "mdn_url": "https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/Sources#strict-dynamic", "support": { "chrome": { "version_added": "52" @@ -1338,7 +1338,7 @@ "unsafe-hashes": { "__compat": { "description": "`unsafe-hashes` source value", - "mdn_url": "https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy#fetch_directive_syntax", + "mdn_url": "https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/Sources#unsafe-hashes", "support": { "chrome": { "version_added": "69"