From fa07540c735c35e5c28e0b93aad865e7e61c4856 Mon Sep 17 00:00:00 2001 From: andreykropotov Date: Mon, 27 Apr 2026 18:14:56 +0400 Subject: [PATCH 1/3] DEV-4157: add more filetypes --- .../workflows/reusable-rn-synchronization.yml | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-rn-synchronization.yml b/.github/workflows/reusable-rn-synchronization.yml index d80a1d98..bdb6eb6b 100644 --- a/.github/workflows/reusable-rn-synchronization.yml +++ b/.github/workflows/reusable-rn-synchronization.yml @@ -71,22 +71,46 @@ jobs: find . -type f -name 'package.json' -exec sed -i \ -e 's|rees46/react-native|personaclick/rn|g' \ -e 's|Rees46/react-native|PersonaClick/rn|g' \ + -e 's/REES46/PersonaClick/g' \ -e 's/Rees46/PersonaClick/g' {} + - - name: Apply changes to JavaScript files + - name: Apply changes to JavaScript and TypeScript files if: env.path_changes != '0' working-directory: repo2 run: | - find . -type f \( -name '*.js' \) -exec sed -i \ + find . -type f \( -name '*.js' -o -name '*.ts' -o -name '*.tsx' -o -name '*.d.ts' \) -exec sed -i \ -e 's|https://api.rees46.ru/|https://api.personaclick.com/|g' \ - -e 's/rees46/personaClick/g' \ - -e 's/Rees46/PersonaClick/g' {} + + -e 's/REES46/PersonaClick/g' \ + -e 's/Rees46/PersonaClick/g' \ + -e 's/rees46/personaClick/g' {} + + + - name: Apply changes to YAML files + if: env.path_changes != '0' + working-directory: repo2 + run: | + find . -type f \( -name '*.yml' -o -name '*.yaml' \) -exec sed -i \ + -e 's/REES46/PersonaClick/g' \ + -e 's/Rees46/PersonaClick/g' \ + -e 's/rees46/personaclick/g' {} + - name: Apply changes to CHANGELOG.md if: env.path_changes != '0' working-directory: repo2 run: | - find . -type f -name 'CHANGELOG.md' -exec sed -i 's|\[\([^]]*\)\]\(([^)]*)\)|\1|g' {} + + find . -type f -name 'CHANGELOG.md' -exec sed -i \ + -e 's|\[\([^]]*\)\]\(([^)]*)\)|\1|g' \ + -e 's/REES46/PersonaClick/g' \ + -e 's/Rees46/PersonaClick/g' \ + -e 's/rees46/personaclick/g' {} + + + - name: Validate PersonaClick rewrites + if: env.path_changes != '0' + working-directory: repo2 + run: | + if grep -RInE 'REES46|Rees46|rees46' . --exclude-dir='.git'; then + echo "Found unconverted REES46 references in synced repository" + exit 1 + fi - name: Create commit if: env.path_changes != '0' From c983426f3d988f0cba99874a1d8ad1af521f56dc Mon Sep 17 00:00:00 2001 From: andreykropotov Date: Mon, 27 Apr 2026 18:17:58 +0400 Subject: [PATCH 2/3] DEV-4157: fix yamllint issues --- .../workflows/reusable-rn-synchronization.yml | 44 ++++++++++++++----- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/.github/workflows/reusable-rn-synchronization.yml b/.github/workflows/reusable-rn-synchronization.yml index bdb6eb6b..700400ea 100644 --- a/.github/workflows/reusable-rn-synchronization.yml +++ b/.github/workflows/reusable-rn-synchronization.yml @@ -1,10 +1,12 @@ name: Sync Repositories -on: +"on": workflow_call: inputs: node-version: - description: 'Node version to run this workflow. Default: 18 as it is in action cache' + description: >- + Node version to run this workflow. Default: 18 as it is in action + cache default: '18' required: false type: string @@ -37,12 +39,21 @@ jobs: - name: Determine if changes are in the specified path run: | - echo "path_changes=$(echo '${{ steps.changed_files.outputs.all_changed_files }}' | grep -c '${{ inputs.changeLookUpPath }}')" >> $GITHUB_ENV + echo "path_changes=$(echo \ + '${{ steps.changed_files.outputs.all_changed_files }}' | \ + grep -c '${{ inputs.changeLookUpPath }}')" >> $GITHUB_ENV - name: Get last merged PR author login run: | - PR_NUMBER=$(gh pr list --state merged --limit 1 --json number --jq '.[0].number') - LAST_PR_AUTHOR=$(gh pr view $PR_NUMBER --json author --jq '.author.login') + PR_NUMBER=$(gh pr list \ + --state merged \ + --limit 1 \ + --json number \ + --jq '.[0].number') + LAST_PR_AUTHOR=$(gh pr view \ + "$PR_NUMBER" \ + --json author \ + --jq '.author.login') echo "LAST_PR_AUTHOR=$LAST_PR_AUTHOR" >> $GITHUB_ENV env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -78,7 +89,12 @@ jobs: if: env.path_changes != '0' working-directory: repo2 run: | - find . -type f \( -name '*.js' -o -name '*.ts' -o -name '*.tsx' -o -name '*.d.ts' \) -exec sed -i \ + find . -type f \( \ + -name '*.js' -o \ + -name '*.ts' -o \ + -name '*.tsx' -o \ + -name '*.d.ts' \ + \) -exec sed -i \ -e 's|https://api.rees46.ru/|https://api.personaclick.com/|g' \ -e 's/REES46/PersonaClick/g' \ -e 's/Rees46/PersonaClick/g' \ @@ -116,7 +132,7 @@ jobs: if: env.path_changes != '0' working-directory: repo2 run: | - git config --global user.name Jade Smith + git config --global user.name Jade Smith git config --global user.email github-bot@rees46.com git add . echo "Changes to be committed:" @@ -127,7 +143,9 @@ jobs: - name: Set branch name if: env.path_changes != '0' - run: echo "BRANCH_NAME=feat/new-release-$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV + run: | + echo "BRANCH_NAME=feat/new-release-$(date +%Y%m%d%H%M%S)" \ + >> $GITHUB_ENV - name: Checkout new branch and push if: env.path_changes != '0' @@ -143,9 +161,15 @@ jobs: working-directory: repo2 run: | PR_TITLE="Automated release" - PR_BODY="This is an automated pull request to update from branch $BRANCH_NAME" + PR_BODY="This is an automated pull request to update from branch \ + $BRANCH_NAME" echo "ASSIGNEES: $LAST_PR_AUTHOR" - gh pr create --title "$PR_TITLE" --body "$PR_BODY" --base master --head $BRANCH_NAME --assignee $MANAGER + gh pr create \ + --title "$PR_TITLE" \ + --body "$PR_BODY" \ + --base master \ + --head "$BRANCH_NAME" \ + --assignee "$MANAGER" env: GITHUB_TOKEN: ${{ secrets.token }} BRANCH_NAME: ${{ env.BRANCH_NAME }} From 56809c014a9425063f5cde52b86d860c08bae6c1 Mon Sep 17 00:00:00 2001 From: andreykropotov Date: Mon, 27 Apr 2026 18:19:29 +0400 Subject: [PATCH 3/3] DEV-4157: fix actionlint shellcheck warnings --- .github/workflows/reusable-rn-synchronization.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusable-rn-synchronization.yml b/.github/workflows/reusable-rn-synchronization.yml index 700400ea..ae51bec1 100644 --- a/.github/workflows/reusable-rn-synchronization.yml +++ b/.github/workflows/reusable-rn-synchronization.yml @@ -39,9 +39,10 @@ jobs: - name: Determine if changes are in the specified path run: | - echo "path_changes=$(echo \ + path_changes_count="$(printf '%s' \ '${{ steps.changed_files.outputs.all_changed_files }}' | \ - grep -c '${{ inputs.changeLookUpPath }}')" >> $GITHUB_ENV + grep -F -c '${{ inputs.changeLookUpPath }}')" + echo "path_changes=$path_changes_count" >> "$GITHUB_ENV" - name: Get last merged PR author login run: | @@ -54,7 +55,7 @@ jobs: "$PR_NUMBER" \ --json author \ --jq '.author.login') - echo "LAST_PR_AUTHOR=$LAST_PR_AUTHOR" >> $GITHUB_ENV + echo "LAST_PR_AUTHOR=$LAST_PR_AUTHOR" >> "$GITHUB_ENV" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -145,7 +146,7 @@ jobs: if: env.path_changes != '0' run: | echo "BRANCH_NAME=feat/new-release-$(date +%Y%m%d%H%M%S)" \ - >> $GITHUB_ENV + >> "$GITHUB_ENV" - name: Checkout new branch and push if: env.path_changes != '0'