From 9acd06335db85f1176b47725c72f362f64b71d3f Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Mon, 17 Apr 2023 14:58:18 +0200 Subject: [PATCH] Update sync-to-mirrors.sh --- .github/sync-to-mirrors.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/sync-to-mirrors.sh b/.github/sync-to-mirrors.sh index 20dec806..a4cefdc3 100755 --- a/.github/sync-to-mirrors.sh +++ b/.github/sync-to-mirrors.sh @@ -41,7 +41,7 @@ COMMIT_AUTHOR=$(cd "${SOURCE_DIR:-.}" &&git show -s --format="%an <%ae>" $GITHUB if [[ -z "$COMMIT_MESSAGE" ]]; then MONOREPO_COMMIT_MESSAGE=$(cd "${SOURCE_DIR:-.}" && git show -s --format=%B $GITHUB_SHA) - COMMIT_MESSAGE=$( printf "%s\n\nCommitted via a GitHub action: https://github.com/%s/actions/runs/%s\nCo-authored-by: %s\n" "$MONOREPO_COMMIT_MESSAGE" "$GITHUB_REPOSITORY" "$GITHUB_RUN_ID" "$COMMIT_ACTOR" ) + COMMIT_MESSAGE=$( printf "%s\n\nCommitted via a GitHub action: https://github.com/%s/actions/runs/%s\n" "$MONOREPO_COMMIT_MESSAGE" "$GITHUB_REPOSITORY" "$GITHUB_RUN_ID" ) fi if [[ "$GITHUB_REF" =~ ^refs/heads/ ]]; then @@ -100,7 +100,7 @@ while read -r PLUGIN_NAME; do if [[ -n "$FORCE_COMMIT" || -n "$(git status --porcelain)" ]]; then echo "Committing to $PLUGIN_NAME" - if git commit $FORCE_COMMIT --author="${COMMIT_AUTHOR}" -m "${COMMIT_MESSAGE}" && + if git commit $FORCE_COMMIT --author="${COMMIT_AUTHOR}" -m "${COMMIT_MESSAGE}\nCo-authored-by: ${COMMIT_ACTOR}" && { [[ -z "$CI" ]] || git push origin "$BRANCH"; } # Only do the actual push from the GitHub Action then # echo "$BUILD_BASE/changes.diff" @@ -116,4 +116,4 @@ while read -r PLUGIN_NAME; do fi done < "$BUILD_BASE/mirrors.txt" -exit $EXIT \ No newline at end of file +exit $EXIT