This commit is contained in:
ellio 2025-05-05 13:27:29 +02:00
parent 0c88f916db
commit 2ffe10edbb
2 changed files with 52 additions and 0 deletions

20
.github/workflows/comment-pr.yml vendored Normal file
View file

@ -0,0 +1,20 @@
name: Comment PR with AI Review
on:
workflow_dispatch:
inputs:
pr_number:
required: true
comment_body:
required: true
jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Comment on PR with AI Review
uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ secrets.PAT_GH_ACTIONS }}
issue-number: ${{ github.event.inputs.pr_number }}
body: ${{ github.event.inputs.comment_body }}

32
.github/workflows/pr-notifier.yml vendored Normal file
View file

@ -0,0 +1,32 @@
name: PR Notifier
on:
pull_request:
types: [opened, synchronize]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Zip Repository
run: |
zip -r project.zip .
- name: Send Data to Target Repo
run: |
curl -X POST "https://api.github.com/repos/emimor-2/AICodeReviewTest/actions/workflows/process-pr.yml/dispatches" \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: Bearer ${{ secrets.PAT_GH_ACTIONS }}" \
-d '{
"ref": "main",
"inputs": {
"pr_number": "${{ github.event.pull_request.number }}",
"repo": "${{ github.repository }}",
"branch": "${{ github.event.pull_request.head.ref }}",
"zip_url": "https://github.com/${{ github.repository }}/archive/${{ github.event.pull_request.head.sha }}.zip"
}
}'