BLOG-79 build: auto comment /improve
command
#81
20
.gitea/workflows/pr_agent.yaml
Normal file
20
.gitea/workflows/pr_agent.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
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: |
|
||||
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.pull_request.number }}/reviews"
|
Loading…
x
Reference in New Issue
Block a user