Skip to content

fix: BROS-109: Import Dropzone content area moved beyond fold if JSON preview is too large #567

fix: BROS-109: Import Dropzone content area moved beyond fold if JSON preview is too large

fix: BROS-109: Import Dropzone content area moved beyond fold if JSON preview is too large #567

name: "Check"
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
- ready_for_review
branches:
- develop
- 'ls-release/**'
merge_group:
env:
ACTIONS_STEP_DEBUG: '${{ secrets.ACTIONS_STEP_DEBUG }}'
jobs:
version:
name: "Poetry Lock Change Size"
runs-on: ubuntu-latest
steps:
- uses: hmarr/debug-action@v3.0.0
- name: Validate
uses: actions/github-script@v7
env:
BASE_REF: "${{ github.event.merge_group.base_sha || github.event.pull_request.base.sha || github.event.before }}"
HEAD_REF: "${{ github.event.merge_group.head_sha || github.event.pull_request.head.sha || github.event.after }}"
with:
github-token: ${{ secrets.GIT_PAT }}
script: |
const {repo, owner} = context.repo;
const base_ref = process.env.BASE_REF;
const head_ref = process.env.HEAD_REF;
const {data: compare} = await github.rest.repos.compareCommits({
owner,
repo,
base: base_ref,
head: head_ref,
});
const poetry_locks = compare.files.filter(e => e.filename.endsWith('poetry.lock'));
if (poetry_locks.length === 0) {
core.notice('No poetry.lock changes');
} else {
for (const poetry_lock of poetry_locks) {
core.startGroup(`${poetry_lock.filename}`);
core.info(`${poetry_lock.filename} changed`);
console.log(poetry_lock);
if (poetry_lock.changes > 50) {
core.setFailed(`${poetry_lock.filename} has too many changes: ${poetry_lock.changes}`);
}
core.endGroup();
}
}