diff --git a/.github/workflows/sync-devchat.yml b/.github/workflows/sync-devchat.yml index da4ec97..3b6bbac 100644 --- a/.github/workflows/sync-devchat.yml +++ b/.github/workflows/sync-devchat.yml @@ -51,6 +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) 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 @@ -71,6 +72,7 @@ jobs: echo "DEVCHAT_HEXSHA=$DEVCHAT_HEXSHA" >> $GITHUB_ENV echo "DEVCHAT_BRANCH=$DEVCHAT_BRANCH" >> $GITHUB_ENV + echo "DEVCHAT_MESSAGE=$DEVCHAT_MESSAGE" >> $GITHUB_ENV - name: Commit, Push and Create PR run: | @@ -81,13 +83,13 @@ jobs: git checkout -b $BRANCH_NAME git diff --stat git add ./site-packages - git commit -m "Sync up site-packages to devchat[$DEVCHAT_BRANCH]($DEVCHAT_HEXSHA)" + git commit -m "Sync: devchat[$DEVCHAT_BRANCH]($DEVCHAT_HEXSHA) $DEVCHAT_MESSAGE" git status git push origin $BRANCH_NAME - echo -e "This PR is auto-generated by GitHub Action. \n- devchat branch: \`$DEVCHAT_BRANCH\` \n- devchat hexsha: \`$DEVCHAT_HEXSHA\` \n- actor: ${{ github.triggering_actor }}" > pr_body + 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 "Sync up site-packages to devchat[$DEVCHAT_BRANCH]($DEVCHAT_HEXSHA) $TIMESTAMP" \ + --title ":arrows_counterclockwise: Sync: devchat[$DEVCHAT_BRANCH]($DEVCHAT_HEXSHA) $TIMESTAMP" \ --body "$PR_BODY" \ --draft \ --base main \