Skip to content

Commit

Permalink
Merge Use config files from develop in CI
Browse files Browse the repository at this point in the history
This merge changes our formatting CI to use the config files from develop. We already use the dev_tool scripts from develop, so this makes it more consistent.

Related PR: #1470
  • Loading branch information
MarcelKoch authored Nov 24, 2023
2 parents 5cc844f + e336b5f commit 897ec6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/bot-pr-format-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ git config user.email "[email protected]"
git config user.name "ginkgo-bot"

# save scripts from develop
cp .clang-format .pre-commit-config.yaml /tmp
pushd dev_tools/scripts || exit 1
cp add_license.sh format_header.sh update_ginkgo_header.sh /tmp
popd || exit 1
Expand All @@ -22,6 +23,8 @@ LOCAL_BRANCH=format-tmp-$HEAD_BRANCH
git checkout -b $LOCAL_BRANCH fork/$HEAD_BRANCH

# restore files from develop
cp /tmp/.clang-format .
cp /tmp/.pre-commit-config .
cp /tmp/add_license.sh dev_tools/scripts/
cp /tmp/format_header.sh dev_tools/scripts/
cp /tmp/update_ginkgo_header.sh dev_tools/scripts/
3 changes: 2 additions & 1 deletion .github/format-rebase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ DIFF_COMMAND="git diff --name-only --no-renames --diff-filter=AM HEAD~ | grep -E

# do the formatting rebase
git rebase --rebase-merges --empty=drop --no-keep-empty \
--exec "cp /tmp/add_license.sh /tmp/format_header.sh /tmp/update_ginkgo_header.sh dev_tools/scripts/ && \
--exec "cp /tmp/.clang-format /tmp/.pre-commit-config.yaml . && \
cp /tmp/add_license.sh /tmp/format_header.sh /tmp/update_ginkgo_header.sh dev_tools/scripts/ && \
dev_tools/scripts/add_license.sh && dev_tools/scripts/update_ginkgo_header.sh && \
for f in \$($DIFF_COMMAND | grep -E '$FORMAT_HEADER_REGEX'); do dev_tools/scripts/format_header.sh \$f; done && \
pipx run pre-commit run && \
Expand Down

0 comments on commit 897ec6b

Please sign in to comment.