Skip to content

Commit

Permalink
adding debugging statements
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishkurmi committed Apr 2, 2024
1 parent 6bcdc0d commit 11d640c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/no-dist-changes-in-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,21 @@ jobs:
- name: Check for changes in dist
run: |
# Fetch the base branch
echo "Fetching origin/${{ github.base_ref }}"
git fetch origin ${{ github.base_ref }}
# Get the merge base between the base and the head of the PR
MERGE_BASE=$(git merge-base FETCH_HEAD ${{ github.sha }})
echo "Merge base: $MERGE_BASE"
# Echo the diff to see what changes are detected
echo "Differences:"
git diff --name-only $MERGE_BASE ${{ github.sha }}
# Check specifically for 'dist/' changes
if git diff --name-only $MERGE_BASE ${{ github.sha }} | grep -q 'dist/'; then
echo "Manual changes to the 'dist/' folder are not allowed. Please remove these changes from your pull request."
exit 1
else
echo "No changes detected in 'dist/' folder."
fi

0 comments on commit 11d640c

Please sign in to comment.