Skip to content

Commit

Permalink
Merge pull request #2067 from hydephp/retain-authors-in-split-monorep…
Browse files Browse the repository at this point in the history
…o-commits

Internal: Retain commit authors for split monorepo packages
  • Loading branch information
caendesilva authored Dec 21, 2024
2 parents 0d1280c + ddc98b6 commit 6df11e2
Showing 1 changed file with 35 additions and 21 deletions.
56 changes: 35 additions & 21 deletions .github/workflows/split-monorepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,21 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd hyde
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/hyde.git
git add .
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git commit --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git push upstream develop
echo "No changes to this package. Exiting gracefully."
Expand Down Expand Up @@ -114,19 +116,21 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd framework
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/framework.git
git add .
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git commit --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git push upstream develop
echo "No changes to this package. Exiting gracefully."
Expand Down Expand Up @@ -163,19 +167,21 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd realtime-compiler
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/realtime-compiler.git
git add .
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git commit --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git push upstream master
Expand Down Expand Up @@ -211,19 +217,21 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd hydefront
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/hydefront.git
git add .
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git commit --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git push upstream master
Expand Down Expand Up @@ -263,19 +271,21 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd website
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/hydephp.com.git
git add .
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git commit --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git push upstream upcoming
echo "No changes to this package. Exiting gracefully."
Expand Down Expand Up @@ -312,19 +322,21 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd testing
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/testing.git
git add .
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git commit --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git push upstream master
Expand Down Expand Up @@ -360,6 +372,8 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd ui-kit
Expand All @@ -368,11 +382,11 @@ jobs:
exit 0;
fi
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/ui-kit.git
git add .
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git commit --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
git push upstream master

0 comments on commit 6df11e2

Please sign in to comment.