-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (39 loc) · 1.25 KB
/
Copy pathagentdiff-consolidate.yml
File metadata and controls
47 lines (39 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Consolidate Agent Traces
on:
pull_request:
types: [closed]
permissions:
contents: write
pull-requests: write
jobs:
consolidate:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch agentdiff refs
run: |
git fetch origin '+refs/agentdiff/*:refs/agentdiff/*' || true
- name: Install agentdiff
run: |
curl -fsSL https://raw.githubusercontent.com/codeprakhar25/agentdiff/main/install.sh | bash
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Configure git identity
run: |
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
- name: Consolidate traces
env:
GH_TOKEN: ${{ github.token }}
run: |
BRANCH="${{ github.head_ref }}"
agentdiff consolidate --branch "$BRANCH" --push
- name: Post attribution comment
if: success()
env:
GH_TOKEN: ${{ github.token }}
run: |
PR="${{ github.event.pull_request.number }}"
agentdiff report --format markdown --post-pr-comment "$PR" || true