Compare commits

..

2 Commits

Author SHA1 Message Date
7e29ade13f BLOG-79 fix: gitea context
Some checks failed
Frontend CI / build (push) Successful in 1m8s
Auto Comment On PR / add_improve_comment (pull_request) Failing after 16s
PR Title Check / pr-title-check (pull_request) Failing after 13s
2025-07-26 06:09:13 +08:00
bb9d7b3dea BLOG-79 build: auto comment /improve command
Some checks failed
Frontend CI / build (push) Successful in 1m20s
PR Title Check / pr-title-check (pull_request) Failing after 13s
Auto Comment On PR / add_improve_comment (pull_request) Failing after 17s
2025-07-26 05:53:40 +08:00

View File

@ -4,7 +4,6 @@ on:
pull_request:
types:
- opened
- reopened
jobs:
add_improve_comment:
@ -12,9 +11,10 @@ jobs:
steps:
- name: Add '/improve' comment to PR
run: |
echo "Target URL: ${{ vars.GIT_PROVIDER_URL }}/api/v1/repos/${{ gitea.repository }}/pulls/${{ gitea.ref_name }}/reviews"
echo "${{ github.ref_name }}"
echo "${{ vars.GIT_PROVIDER_URL }}/api/v1/repos/${{ gitea.repository }}/pulls/${{ gitea.pull_request.number }}/reviews"
curl --fail -X POST \
-H "Authorization: token ${{ secrets.BOT_PAT }}" \
-H "Content-Type: application/json" \
-d '{"body": "/improve"}' \
"${{ vars.GIT_PROVIDER_URL }}/api/v1/repos/${{ gitea.repository }}/pulls/${{ gitea.ref_name }}/reviews"
"${{ vars.GIT_PROVIDER_URL }}/api/v1/repos/${{ gitea.repository }}/pulls/${{ gitea.pull_request.number }}/reviews"