BLOG-79 build: auto comment /improve command
All checks were successful
Auto Comment On PR / add_improve_comment (pull_request) Successful in 13s
Frontend CI / build (push) Successful in 1m8s
PR Title Check / pr-title-check (pull_request) Successful in 16s

This commit is contained in:
SquidSpirit 2025-07-26 05:40:39 +08:00
parent 95fabee99d
commit 1849458b71

View File

@ -0,0 +1,20 @@
name: Auto Comment On PR
on:
pull_request:
types:
- opened
- reopened
jobs:
add_improve_comment:
runs-on: ubuntu-latest
steps:
- name: Add '/improve' comment to PR
run: |
echo "Target URL: ${{ vars.GIT_PROVIDER_URL }}/api/v1/repos/${{ gitea.repository }}/issues/${{ gitea.ref_name }}/comments"
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 }}/issues/${{ gitea.ref_name }}/comments"