Skip to content

Commit

Permalink
Use explicit upstream branch (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom authored Oct 21, 2024
1 parent d0bc927 commit ab845c4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/check-no-important-files-changed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ jobs:
run: |
set -exo pipefail
git remote set-branches origin main
git fetch --depth 1 origin main
git remote add upstream "https://github.com/${GITHUB_REPOSITORY}.git"
git fetch --depth 1 upstream main
git diff --diff-filter=M --name-only origin/main
git diff --diff-filter=M --name-only upstream/main
for changed_file in $(git diff --diff-filter=M --name-only origin/main); do
for changed_file in $(git diff --diff-filter=M --name-only upstream/main); do
slug="$(echo "${changed_file}" | sed --regexp-extended 's#exercises/[^/]+/([^/]+)/.*#\1#' )"
path_before_slug="$(echo "${changed_file}" | sed --regexp-extended "s#(.*)/${slug}/.*#\\1#" )"
path_after_slug="$( echo "${changed_file}" | sed --regexp-extended "s#.*/${slug}/(.*)#\\1#" )"
Expand Down

0 comments on commit ab845c4

Please sign in to comment.