Skip to content

Commit 2edb903

Browse files
committed
Fix AI Agent and add PR workflow
1 parent 70565a2 commit 2edb903

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

.github/workflows/dagger-fraud-sim.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
permissions:
99
contents: write
10+
pull-requests: write
1011

1112
jobs:
1213
run-fraud-simulation:
@@ -35,10 +36,12 @@ jobs:
3536
echo "Generating fraud summary insights via AI Agent"
3637
dagger call analyze-results --summary dashboard/summary.json > dashboard/insights.txt
3738
38-
- name: Commit and push
39-
run: |
40-
git config user.name "github-actions"
41-
git config user.email "github-actions@github.com"
42-
git add dashboard/
43-
git commit -m "Update fraud dashboard with AI insights"
44-
git push
39+
- name: Create Pull Request
40+
uses: peter-evans/create-pull-request@v5
41+
with:
42+
commit-message: "Update fraud dashboard with AI insights"
43+
title: "Update Fraud Dashboard"
44+
body: "Automated update of fraud simulation results and AI insights."
45+
branch: "fraud-dashboard-update"
46+
base: "main"
47+
delete-branch: true

dagger/src/fraud_simulation/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ async def analyze_results(self, summary: dagger.File) -> str:
5151
dag.llm()
5252
.with_env(
5353
dag.env()
54-
.with_file_input("summary", summary)
55-
.with_string_output("insights")
54+
.with_file_input("summary", summary, description="Fraud summary file")
55+
.with_string_output("insights", description="AI generated insights")
5656
)
5757
.with_prompt("""
5858
Review this fraud summary:

0 commit comments

Comments
 (0)