Merge pull request #60 from devchat-ai/improve-msg

Improve sync message
This commit is contained in:
kagami 2024-05-15 13:55:32 +08:00 committed by GitHub
commit 501b7ff4ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,7 +51,7 @@ jobs:
cd ./temp/devchat-repo
DEVCHAT_HEXSHA=$(git rev-parse HEAD | cut -c 1-8)
DEVCHAT_BRANCH=$(git branch --show-current)
DEVCHAT_MESSAGE_=$(git log -1 --pretty=%s)
DEVCHAT_MESSAGE=$(git log -1 --pretty=%s)
pip install --no-binary :all: "pydantic==1.10.14"
pip install charset-normalizer --no-binary :all:
pip install git+https://github.com/devchat-ai/tiktoken.git
@ -77,9 +77,9 @@ jobs:
- name: Commit, Push and Create PR
run: |
git config --local user.email "mingjing@merico.dev"
git config --local user.name "Update-Packages Action"
TIMESTAMP=$(date +'%Y%m%d-%H%M%S')
BRANCH_NAME=update-packages-$TIMESTAMP
git config --local user.name "Sync-Packages Action"
TIMESTAMP=$(date +'%y%m%d-%H%M%S')
BRANCH_NAME=sync-$TIMESTAMP
git checkout -b $BRANCH_NAME
git diff --stat
git add ./site-packages
@ -89,7 +89,7 @@ jobs:
echo -e "This PR is auto-generated by GitHub Action. \n- devchat branch: \`$DEVCHAT_BRANCH\` \n- devchat hexsha: \`$DEVCHAT_HEXSHA\` \n- message: $DEVCHAT_MESSAGE \n- actor: ${{ github.triggering_actor }}" > pr_body
PR_BODY=$(cat pr_body)
gh pr create \
--title ":arrows_counterclockwise: Sync: devchat[$DEVCHAT_BRANCH]($DEVCHAT_HEXSHA) $TIMESTAMP" \
--title ":arrows_counterclockwise: Sync: [$DEVCHAT_BRANCH]($DEVCHAT_HEXSHA) $DEVCHAT_MESSAGE ($TIMESTAMP)" \
--body "$PR_BODY" \
--draft \
--base main \