Skip to content

Commit

Permalink
Testing delta checks
Browse files Browse the repository at this point in the history
  • Loading branch information
cybcon committed Feb 1, 2024
1 parent 4e1e48f commit 66df3e8
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,24 +89,17 @@ jobs:
echo "DEBUG Do a soft reset to revision: ${revision}"
git reset --soft ${revision}
# add the changes, so we get the differences into the commit
echo "DEBUG: Adding all changes to get the delta as pre-commit"
git add . || exit 1
git status
exit 1
# create a new, temporary branch locally
echo "DEBUG: Create a local branch: ${test_branch}"
git checkout -b ${test_branch} || exit 1
# merge the content from the branch we want to check
echo "DEBUG: Merge changes from PR Branch: ${pr_branch}"
git merge --no-ff -m "get changes from PR branch" ${pr_branch} || exit 1
# decrease HEAD revision for 1 version in past, so we have the file changes
echo "DEBUG: reset HEAD revision"
git reset HEAD~1 || exit 1
# add the changes, so we get the differences into the commit
git add . || exit 1
# validate if there are only removals inside the commit
removals_only='false'
Expand Down

0 comments on commit 66df3e8

Please sign in to comment.