Skip to content

fix: checkout merge base for cherry diff #80

fix: checkout merge base for cherry diff

fix: checkout merge base for cherry diff #80

Workflow file for this run

name: Prevent new violations
on:
pull_request:
jobs:
cherry_diff:
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0 # fetches all commits from all branches
ref: ${{ github.head_ref }} # checks out the branch that triggered the workflow
- name: Install dependencies
run: npm install
- name: Raise if new JavaScript code is added
run: ./bin/cherry.js diff --metric='[loc] JavaScript' --error-if-increase --quiet