mirror of
https://github.com/MonsterDruide1/OdysseyDecomp.git
synced 2024-11-26 23:00:25 +00:00
Fix author information on PR branch of OdysseyHeaders
This commit is contained in:
parent
6ef7f34c47
commit
b2a5c1870b
6
.github/scripts/push-headers.sh
vendored
6
.github/scripts/push-headers.sh
vendored
@ -12,9 +12,9 @@ cd "./OdysseyHeaders"
|
||||
echo "Open root of OdysseyHeaders repo"
|
||||
|
||||
git add -A .
|
||||
git config user.name $COMMIT_AUTHOR_NAME
|
||||
git config user.email $COMMIT_AUTHOR_MAIL
|
||||
git commit -am "$COMMIT_MESSAGE"
|
||||
git config user.name $AUTHOR_NAME
|
||||
git config user.email $AUTHOR_MAIL
|
||||
git commit -am "$MESSAGE"
|
||||
git push -f -u origin $HEADER_BRANCH
|
||||
|
||||
echo "Updated headers successfully pushed to OdysseyHeaders repo"
|
||||
|
29
.github/workflows/copy-headers.yml
vendored
29
.github/workflows/copy-headers.yml
vendored
@ -35,12 +35,35 @@ jobs:
|
||||
if [[ $GITHUB_EVENT_NAME == 'pull_request_target' ]]
|
||||
then
|
||||
echo "HEADER_BRANCH=pr-$PR_NUM" >> "$GITHUB_ENV"
|
||||
if [[ $PR_AUTHOR_NAME != '' ]]
|
||||
then
|
||||
echo "AUTHOR_NAME=$PR_AUTHOR_NAME" >> "$GITHUB_ENV"
|
||||
else
|
||||
echo "AUTHOR_NAME=$PR_AUTHOR_LOGIN" >> "$GITHUB_ENV"
|
||||
fi
|
||||
if [[ $PR_AUTHOR_MAIL != '' ]]
|
||||
then
|
||||
echo "AUTHOR_MAIL=$PR_AUTHOR_MAIL"
|
||||
else
|
||||
echo "AUTHOR_MAIL=$PR_AUTHOR_LOGIN@noreply.github.com" >> "$GITHUB_ENV"
|
||||
fi
|
||||
echo "MESSAGE=$PR_TITLE"
|
||||
else
|
||||
echo "HEADER_BRANCH=$DELETED_BRANCH" >> "$GITHUB_ENV"
|
||||
echo "AUTHOR_NAME=$COMMIT_AUTHOR_NAME" >> "$GITHUB_ENV"
|
||||
echo "AUTHOR_MAIL=$COMMIT_AUTHOR_MAIL" >> "$GITHUB_ENV"
|
||||
echo "MESSAGE=$COMMIT_MESSAGE" >> "$GITHUB_ENV"
|
||||
fi
|
||||
env:
|
||||
DELETED_BRANCH: ${{ github.event.ref }}
|
||||
PR_NUM: ${{ github.event.number }}
|
||||
PR_NUM: ${{ github.event.pull_request.number }}
|
||||
COMMIT_AUTHOR_NAME: ${{ github.event.commits[0].author.name }}
|
||||
COMMIT_AUTHOR_MAIL: ${{ github.event.commits[0].author.email }}
|
||||
COMMIT_MESSAGE: ${{ github.event.commits[0].message }}
|
||||
PR_AUTHOR_NAME: ${{ github.event.pull_request.user.name }}
|
||||
PR_AUTHOR_LOGIN: ${{ github.event.pull_request.user.login }}
|
||||
PR_AUTHOR_MAIL: ${{ github.event.pull_request.user.email }}
|
||||
PR_TITLE: ${{ github.event.pull_request.title }}
|
||||
- name: Move to correct branch of OdysseyHeaders and reset history
|
||||
run: |
|
||||
cd OdysseyHeaders
|
||||
@ -52,7 +75,3 @@ jobs:
|
||||
DESTINATION_PATH: ./OdysseyHeaders
|
||||
- name: Push to OdysseyHeaders repo
|
||||
run: bash ./.github/scripts/push-headers.sh
|
||||
env:
|
||||
COMMIT_AUTHOR_NAME: ${{ github.event.commits[0].author.name }}
|
||||
COMMIT_AUTHOR_MAIL: ${{ github.event.commits[0].author.email }}
|
||||
COMMIT_MESSAGE: ${{ github.event.commits[0].message }}
|
||||
|
Loading…
Reference in New Issue
Block a user