Skip to content

fix(top-blocks): lower severity gates so real findings surface #72

fix(top-blocks): lower severity gates so real findings surface

fix(top-blocks): lower severity gates so real findings surface #72

name: Sync Behavior Coverage
on:
pull_request:
branches: [main]
permissions:
contents: write
jobs:
sync:
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository
env:
MIX_ENV: dev
steps:
- name: Checkout PR branch
uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Elixir with shared cache
uses: ./.github/actions/setup-elixir
with:
mix-env: dev
- name: Compile
run: mix compile --warnings-as-errors
- name: Regenerate language coverage
run: mix codeqa.sample_report --apply-languages
- name: Regenerate scalar vectors
run: mix codeqa.sample_report --apply-scalars
- name: Check for YAML drift
id: diff
run: |
if git diff --quiet priv/combined_metrics/; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Commit and push updated YAMLs
if: steps.diff.outputs.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add priv/combined_metrics/*.yml
git commit -m "chore(combined-metrics): sync language coverage and scalar vectors [skip ci]"
git push