Skip to content

Update close-incomplete-issues.yml #1432

Update close-incomplete-issues.yml

Update close-incomplete-issues.yml #1432

Workflow file for this run

name: Reviewdog
on:
pull_request_target:
branches: ["main"]
jobs:
fix:
name: Fix
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Checkout BASE
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: npm
- run: npm ci
- name: Checkout HEAD
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
path: pr_head
- name: Merge HEAD changes into BASE
run: |
dirs=(api browsers css docs html http javascript mathml schemas svg webassembly webdriver webextensions)
rm -r "${dirs[@]}" *.md
cd pr_head
mv "${dirs[@]}" *.md ..
cd ..
rm -r pr_head
# Avoids PR changes from getting into the diff.
git config --global user.email "[email protected]"
git config --global user.name "mdn-bot"
git add .
git commit -m "Code from PR head" --no-verify
- 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:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Download diff
uses: actions/download-artifact@v4
with:
name: diff
path: result
- name: Setup
uses: reviewdog/action-setup@3f401fe1d58fe77e10d665ab713057375e39b887 # v1.3.0
with:
reviewdog_version: latest
- name: Suggest changes
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cat result/diff.patch | reviewdog \
-name="bcd-linter" \
-f=diff \
-f.diff.strip=1 \
-filter-mode=diff_context \
-reporter=github-pr-review