Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom committed Feb 23, 2024
1 parent 2778e27 commit 2afee93
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/no-important-files-changed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: No important files changed

on:
pull_request_target:
types: [opened, reopened]
types: [opened]
branches: [main]
paths:
- "exercises/concept/**"
Expand Down Expand Up @@ -42,18 +42,12 @@ jobs:
path_after_slug="$( echo "${changed_file}" | sed --regexp-extended "s#.*/${slug}/(.*)#\\1#" )"
config_json_file="${path_before_slug}/${slug}/.meta/config.json"
echo "slug: $slug"
echo "path_before_slug: $path_before_slug"
echo "path_after_slug: $path_after_slug"
echo "config_json_file: $config_json_file"
if ! [ -f "${config_json_file}" ]; then
# cannot determine if important files changed without .meta/config.json
continue
fi
changed=$(jq --arg path "${path_after_slug}" '[.files.test, .files.invalidator, .files.editor] | flatten | index($path) != null' "${config_json_file}")
echo "changed: $changed"
echo "important_files_changed=${changed}" >> "$GITHUB_OUTPUT"
done
Expand Down

0 comments on commit 2afee93

Please sign in to comment.