From 5384c8945d549f915f3602f8633c79a3243cb1b9 Mon Sep 17 00:00:00 2001 From: aidenvaines-bjss Date: Mon, 9 Sep 2024 14:52:14 +0100 Subject: [PATCH] CCM-6405 fix script repo checkout --- .../scheduled-repository-template-sync.yaml | 12 ++++-------- scripts/githooks/sync-template-repo.sh | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/scheduled-repository-template-sync.yaml b/.github/workflows/scheduled-repository-template-sync.yaml index 7eea6e6..a227476 100644 --- a/.github/workflows/scheduled-repository-template-sync.yaml +++ b/.github/workflows/scheduled-repository-template-sync.yaml @@ -27,11 +27,10 @@ jobs: - name: Run syncronisation script run: | - set -x - ls -la nhs-notify-repository-template/ ./scripts/githooks/sync-template-repo.sh - name: Create Pull Request + if: ${{ !env.ACT }} uses: peter-evans/create-pull-request@v7.0.1 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -43,15 +42,12 @@ jobs: # Resultant drift from repository template ## Who should respond to this PR? - The team which owns the responsibility for the services the repository maintains + The team which owns the responsibility for this component repository. You may want to consult other contributors. ## How to progress this PR - The repositories guardians should review the contents of the PR and decide - how to proceed, you may wish to back-out certain changes or accept them from the upstream - `nhsdigital/nhs-notify-repository-template` repository. + The repositories guardians should review the contents of the PR and decide how to proceed, you may wish to back-out certain changes or accept them from the upstream `nhsdigital/nhs-notify-repository-template` repository. - If there are changes you do not wish to see again, it is recommended you add exclusions to - `scripts/config/.repository-template-sync-ignore` + If there are changes you do not wish to see again, it is recommended you add exclusions to `scripts/config/.repository-template-sync-ignore`. labels: | template automation diff --git a/scripts/githooks/sync-template-repo.sh b/scripts/githooks/sync-template-repo.sh index 994d430..060aaa4 100755 --- a/scripts/githooks/sync-template-repo.sh +++ b/scripts/githooks/sync-template-repo.sh @@ -49,7 +49,7 @@ is_ignored() { fi for ignored in "${IGNORED_PATHS[@]}"; do - if [[ "$file" =~ $ignored ]]; then + if [[ -n "$ignored" && "$file" =~ $ignored ]]; then return 0 fi done