Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
senekor committed Nov 25, 2023
1 parent df8e297 commit d29b009
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/no-important-files-changed.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: No important files changed

on:
pull_request_target:
pull_request:
types: [opened]
paths:
- "exercises/*/*/tests/**"
Expand All @@ -22,7 +22,14 @@ jobs:
env:
TARGET_BRANCH: ${{ github.base_ref }}
run: |
for changed_file in $(git diff --name-only $TARGET_BRANCH); do
set -x
# fetch a ref to the target branch so we can diff against it
git remote set-branches origin '*'
git fetch --depth 1 origin $TARGET_BRANCH
git log --oneline --graph --all -n10
git diff --name-only $TARGET_BRANCH || true
git diff --name-only origin/$TARGET_BRANCH || true
for changed_file in $(git diff --name-only origin/$TARGET_BRANCH); do
if ! echo "$changed_file" | grep --quiet --extended-regexp 'exercises/(practice|concept)' ; then
continue
fi
Expand Down Expand Up @@ -62,3 +69,7 @@ jobs:
repo: context.repo.repo,
body: body
})
- name: Sanity check
if: steps.check.outputs.important_files_changed == 'false'
run: echo "No important files changed"

0 comments on commit d29b009

Please sign in to comment.