From eddaf3ddea72e39a02d59819dd07931102542d14 Mon Sep 17 00:00:00 2001 From: SquidSpirit Date: Sat, 26 Jul 2025 05:40:39 +0800 Subject: [PATCH] BLOG-79 build: auto comment `/improve` command --- .gitea/workflows/pr_agent.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .gitea/workflows/pr_agent.yaml diff --git a/.gitea/workflows/pr_agent.yaml b/.gitea/workflows/pr_agent.yaml new file mode 100644 index 0000000..d2231eb --- /dev/null +++ b/.gitea/workflows/pr_agent.yaml @@ -0,0 +1,18 @@ +name: Auto Comment On PR + +on: + pull_request: + types: + - opened + +jobs: + add_improve_comment: + runs-on: ubuntu-latest + steps: + - name: Add '/improve' comment to PR + run: | + 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.owner }}/${{ gitea.repository.name }}/issues/${{ gitea.pull_request.number }}/comments"