diff --git a/.github/workflows/AI_Agent_review.yml b/.github/workflows/AI_Agent_review.yml index f2f8cc8ef..7d4aa297e 100644 --- a/.github/workflows/AI_Agent_review.yml +++ b/.github/workflows/AI_Agent_review.yml @@ -2,15 +2,20 @@ name: Trigger Lambda on PR Events on: pull_request: - types: [opened, reopened, synchronize] # Triggers on PR open/update + types: [opened, reopened, synchronize] branches: - - main # Or whatever your base branch is + - main # Change this to your target branch if needed jobs: trigger-lambda: runs-on: ubuntu-latest steps: + - name: Extract Repo Owner + id: extract + run: | + echo "##[set-output name=owner;]$(echo '${{ github.repository }}' | cut -d'/' -f1)" + - name: Call Lambda with PR Details run: | echo "Sending PR details to Lambda..." @@ -18,7 +23,7 @@ jobs: curl -X POST "$LAMBDA_URL" \ -H "Content-Type: application/json" \ -d '{ - "action": "${{ github.event.action }}", + "repo_owner": "${{ steps.extract.outputs.owner }}", "pr_number": "${{ github.event.pull_request.number }}", "base_branch": "${{ github.event.pull_request.base.ref }}", "main_branch": "${{ github.event.pull_request.head.ref }}",