From 4ccb05cab7757dd754605fb71dca22dc5ab8a1dd Mon Sep 17 00:00:00 2001 From: zugdev Date: Fri, 8 Nov 2024 17:24:41 -0300 Subject: [PATCH] feat: add files changed list to the sync pr --- .github/workflows/sync-template.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync-template.yml b/.github/workflows/sync-template.yml index cc51f2f..1ecfa1d 100644 --- a/.github/workflows/sync-template.yml +++ b/.github/workflows/sync-template.yml @@ -65,9 +65,15 @@ jobs: cp -f "template-repo/$file" "$file" done + # Prepare a formatted file list for the PR body + file_list="" + for file in $WHITELIST_FILES "${additional_files[@]}"; do + file_list+="\n- \`${file}\`" + done + # Clean up rm -rf template-repo/ git add . git commit -m "chore: sync template" git push "$original_remote" "$pr_branch" - gh pr create --title "Sync branch to template" --body "This pull request merges changes from the template repository, overwriting only files in the whitelist and specified files." --head "$pr_branch" --base "$branch_name" \ No newline at end of file + gh pr create --title "Sync branch to template" --body "This pull request merges changes from the template repository, overwriting the following files:${file_list}" --head "$pr_branch" --base "$branch_name" \ No newline at end of file