From ab58b1e1b9b234f5e6555d4ea2bafc60b8cc8fa0 Mon Sep 17 00:00:00 2001 From: "adamlui@protonmail.com" Date: Thu, 15 Aug 2024 20:53:33 -0700 Subject: [PATCH] Added author init, moved commiter init to env vars --- .../sync-chatgpt.js-changes-to-chrome-starter.yml | 10 ++++++---- .github/workflows/sync-chrome-starter-changes.yml | 8 ++++++-- .github/workflows/sync-en-readme-changes.yml | 8 ++++++-- .../workflows/sync-greasemonkey-starter-changes.yml | 8 ++++++-- 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/workflows/sync-chatgpt.js-changes-to-chrome-starter.yml b/.github/workflows/sync-chatgpt.js-changes-to-chrome-starter.yml index 886ba3b9b..6d4812c70 100644 --- a/.github/workflows/sync-chatgpt.js-changes-to-chrome-starter.yml +++ b/.github/workflows/sync-chatgpt.js-changes-to-chrome-starter.yml @@ -9,6 +9,12 @@ jobs: build: if: (github.repository == 'KudoAI/chatgpt.js') && (github.event.commits[0].committer.username != 'kudo-sync-bot') runs-on: ubuntu-latest + env: + GIT_AUTHOR_NAME: ${{ github.event.commits[0].author.name }} + GIT_AUTHOR_EMAIL: ${{ github.event.commits[0].author.email }} + GIT_COMMITTER_NAME: kudo-sync-bot + GIT_COMMITTER_EMAIL: auto-sync@kudoai.com + steps: - name: Checkout KudoAI/chatgpt.js uses: actions/checkout@v4 @@ -51,8 +57,6 @@ jobs: - name: Push changes to KudoAI/chatgpt.js run: | cd ${{ github.workspace }}/KudoAI/chatgpt.js - git config --global user.name "kudo-sync-bot" - git config --global user.email "auto-sync@kudoai.com" git add . git commit -n -m "$ESCAPED_MSG ↞ [auto-sync from \`KudoAI/chatgpt.js\`]" || true git push @@ -60,8 +64,6 @@ jobs: - name: Push changes to KudoAI/chatgpt.js-chrome-starter run: | cd ${{ github.workspace }}/KudoAI/chatgpt.js-chrome-starter - git config --global user.name "kudo-sync-bot" - git config --global user.email "auto-sync@kudoai.com" git add . git commit -n -m "$ESCAPED_MSG↞ [auto-sync from \`KudoAI/chatgpt.js\`]" || true git push diff --git a/.github/workflows/sync-chrome-starter-changes.yml b/.github/workflows/sync-chrome-starter-changes.yml index edca080b6..fcd335382 100644 --- a/.github/workflows/sync-chrome-starter-changes.yml +++ b/.github/workflows/sync-chrome-starter-changes.yml @@ -9,6 +9,12 @@ jobs: build: if: (github.repository == 'KudoAI/chatgpt.js') && (github.event.commits[0].committer.username != 'kudo-sync-bot') runs-on: ubuntu-latest + env: + GIT_AUTHOR_NAME: ${{ github.event.commits[0].author.name }} + GIT_AUTHOR_EMAIL: ${{ github.event.commits[0].author.email }} + GIT_COMMITTER_NAME: kudo-sync-bot + GIT_COMMITTER_EMAIL: auto-sync@kudoai.com + steps: - name: Checkout KudoAI/chatgpt.js @@ -40,8 +46,6 @@ jobs: - name: Push changes to KudoAI/chatgpt.js-chrome-starter run: | cd ${{ github.workspace }}/KudoAI/chatgpt.js-chrome-starter - git config --global user.name "kudo-sync-bot" - git config --global user.email "auto-sync@kudoai.com" git add . git commit -n -m "$ESCAPED_MSG ↞ [auto-sync from \`KudoAI/chatgpt.js\`]" || true git push diff --git a/.github/workflows/sync-en-readme-changes.yml b/.github/workflows/sync-en-readme-changes.yml index 5a46c185a..910dfbd82 100644 --- a/.github/workflows/sync-en-readme-changes.yml +++ b/.github/workflows/sync-en-readme-changes.yml @@ -11,6 +11,12 @@ jobs: build: if: (github.repository == 'KudoAI/chatgpt.js') && (github.event.commits[0].committer.username != 'kudo-sync-bot') runs-on: ubuntu-latest + env: + GIT_AUTHOR_NAME: ${{ github.event.commits[0].author.name }} + GIT_AUTHOR_EMAIL: ${{ github.event.commits[0].author.email }} + GIT_COMMITTER_NAME: kudo-sync-bot + GIT_COMMITTER_EMAIL: auto-sync@kudoai.com + steps: - name: Checkout KudoAI/chatgpt.js uses: actions/checkout@v4 @@ -41,8 +47,6 @@ jobs: - name: Push changes to KudoAI/chatgpt.js run: | cd ${{ github.workspace }}/KudoAI/chatgpt.js - git config --global user.name "kudo-sync-bot" - git config --global user.email "auto-sync@kudoai.com" git add . git commit -n -m "$ESCAPED_MSG ↞ [auto-sync from \`${{ steps.sync_readmes.outputs.sync_src }}\`]" || true git push diff --git a/.github/workflows/sync-greasemonkey-starter-changes.yml b/.github/workflows/sync-greasemonkey-starter-changes.yml index e6230e66e..2565c9a20 100644 --- a/.github/workflows/sync-greasemonkey-starter-changes.yml +++ b/.github/workflows/sync-greasemonkey-starter-changes.yml @@ -9,6 +9,12 @@ jobs: build: if: (github.repository == 'KudoAI/chatgpt.js') && (github.event.commits[0].committer.username != 'kudo-sync-bot') runs-on: ubuntu-latest + env: + GIT_AUTHOR_NAME: ${{ github.event.commits[0].author.name }} + GIT_AUTHOR_EMAIL: ${{ github.event.commits[0].author.email }} + GIT_COMMITTER_NAME: kudo-sync-bot + GIT_COMMITTER_EMAIL: auto-sync@kudoai.com + steps: - name: Checkout KudoAI/chatgpt.js @@ -40,8 +46,6 @@ jobs: - name: Push changes to KudoAI/chatgpt.js-greasemonkey-starter run: | cd ${{ github.workspace }}/KudoAI/chatgpt.js-greasemonkey-starter - git config --global user.name "kudo-sync-bot" - git config --global user.email "auto-sync@kudoai.com" git add . git commit -n -m "$ESCAPED_MSG ↞ [auto-sync from \`KudoAI/chatgpt.js\`]" || true git push