Skip to content

2115 feature create a new storage module for each studio #2511

2115 feature create a new storage module for each studio

2115 feature create a new storage module for each studio #2511

Workflow file for this run

name: PR Checks
on:
pull_request:
branches:
- main
- develop
push:
branches:
- main
- develop
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout PR code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
fetch-depth: 0
- name: Install dependencies
run: npm ci
- name: Get changed files
id: files
uses: actions/github-script@v7
with:
script: |
const pr = context.payload.pull_request;
let changed = [];
if (pr) {
const files = await github.paginate(
github.rest.pulls.listFiles,
{
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number,
}
);
changed = files.map(f => f.filename);
} else {
const { execSync } = require('child_process');
const diff = execSync('git diff --name-only HEAD~1 HEAD').toString();
changed = diff.split('\n').filter(Boolean);
}
const filtered = changed.filter(
f => f.endsWith('.js') || f.endsWith('.vue')
);
core.setOutput('files', filtered.join(' '));
- name: Run ESLint
run: |
if [ -z "${{ steps.files.outputs.files }}" ]; then
echo "No JS/Vue files changed. Skipping lint."
exit 0
fi
echo "Linting:"
echo "${{ steps.files.outputs.files }}"
npx eslint ${{ steps.files.outputs.files }}