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 75717a0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 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,11 @@ jobs:
env:
TARGET_BRANCH: ${{ github.base_ref }}
run: |
for changed_file in $(git diff --name-only $TARGET_BRANCH); do
# 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
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 @@ -55,7 +59,7 @@ jobs:
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
with:
script: |
const body = "This PR touches files which probably affect the outcome of the tests of an exercise. If this is not the case, please add the following to the merge commit message. Copy-paste to avoid typos. This will prevent tests from rerunning unnecessarily. For more information, refer to the [documentation](https://exercism.org/docs/building/tracks#h-avoiding-triggering-unnecessary-test-runs).\n```\n[no important files changed]\n```"
const body = "This PR touches files which probably affect the outcome of the tests of an exercise. If this is not the case, please add the following to the merge-commit message. Copy-paste to avoid typos. This will prevent tests from rerunning unnecessarily. For more information, refer to the [documentation](https://exercism.org/docs/building/tracks#h-avoiding-triggering-unnecessary-test-runs).\n```\n[no important files changed]\n```"
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
Expand Down

0 comments on commit 75717a0

Please sign in to comment.