Skip to content

Commit bab8118

Browse files
committed
add more images and properties
1 parent 10b9131 commit bab8118

File tree

4 files changed

+93
-6
lines changed

4 files changed

+93
-6
lines changed

docs/guides/all/track-ai-driven-pull-requests.md

Lines changed: 93 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ description: Learn how to track and monitor AI-driven pull requests in your deve
55

66
# Track AI-driven pull requests
77

8-
The software engineering world has experienced a major breakthrough with AI coding agents such as GitHub Copilot, Claude, Devin, and others. Engineering teams are increasingly integrating these AI agents into their development workflows. This guide will help you create a comprehensive dashboard to bring visibility into what these AI agents are doing in your repositories.
8+
As engineering teams integrate AI coding agents like GitHub Copilot, Claude, and Devin into their workflows, they face the challenge of managing an increased volume of pull requests. Tracking and reviewing these AI-generated contributions can be overwhelming without a centralized system. Port's AI control center addresses this issue by identifying pull requests originating from coding agents and displaying them in real-time, allowing you to efficiently monitor and act upon them.
99

1010
<img src="/img/guides/ai-driven-pr-dashboard.png" border="1px" width="100%" />
11+
<img src="/img/guides/ai-driven-pr-dashboard-total-prs.png" border="1px" width="100%"/>
12+
1113

1214

1315
## Common use cases
1416

15-
- **Track AI agent contributions**: Monitor which AI coding agents are actively contributing to your codebase through pull requests.
17+
- **Act fast on AI agent contributions**: Quickly respond to pull requests from AI coding agents using your AI control center.
1618
- **Quality assurance**: Ensure AI-generated code meets your team's standards and review processes.
1719

1820

@@ -22,6 +24,10 @@ This guide assumes the following:
2224
- You have a Port account and have completed the [onboarding process](https://docs.port.io/getting-started/overview).
2325
- [Port's GitHub integration](https://docs.port.io/build-your-software-catalog/sync-data-to-catalog/git/github/) is installed in your account.
2426

27+
:::info Alternative setup
28+
This guide assumes you're using GitHub to manage your code. However, the principles and steps outlined here can be adapted to other Git platforms such as GitLab, BitBucket etc.
29+
:::
30+
2531

2632
## Data model setup
2733

@@ -52,7 +58,53 @@ This blueprint will represent all known coding agents in your system.
5258
},
5359
"mirrorProperties": {},
5460
"calculationProperties": {},
55-
"aggregationProperties": {},
61+
"aggregationProperties": {
62+
"total_p_rs_handled": {
63+
"title": "Total PRs handled",
64+
"type": "number",
65+
"target": "githubPullRequest",
66+
"calculationSpec": {
67+
"func": "count",
68+
"calculationBy": "entities"
69+
},
70+
"pathFilter": [
71+
{
72+
"fromBlueprint": "githubPullRequest",
73+
"path": [
74+
"ai_coding_agent"
75+
]
76+
}
77+
]
78+
},
79+
"total_open_p_rs": {
80+
"title": "Total open PRs",
81+
"icon": "DefaultProperty",
82+
"type": "number",
83+
"target": "githubPullRequest",
84+
"query": {
85+
"combinator": "and",
86+
"rules": [
87+
{
88+
"property": "status",
89+
"operator": "=",
90+
"value": "open"
91+
}
92+
]
93+
},
94+
"calculationSpec": {
95+
"func": "count",
96+
"calculationBy": "entities"
97+
},
98+
"pathFilter": [
99+
{
100+
"fromBlueprint": "githubPullRequest",
101+
"path": [
102+
"ai_coding_agent"
103+
]
104+
}
105+
]
106+
}
107+
},
56108
"relations": {}
57109
}
58110
```
@@ -469,6 +521,8 @@ Built with Port to bring clarity to your AI-driven SDLC.
469521

470522
3. Click `Save`.
471523

524+
<img src="/img/guides/ai-driven-pr-dashboard-info-markdown.png" border="1px" width="100%" />
525+
472526
</details>
473527

474528
<details>
@@ -510,20 +564,53 @@ Built with Port to bring clarity to your AI-driven SDLC.
510564
8. Click on the **Group by** option and select **Work Status** to group PRs by their current status.
511565
9. Click on the **save icon** in the top right corner of the widget to save the customized table.
512566

567+
<img src="/img/guides/ai-driven-pr-dashboard.png" border="1px" width="100%" />
568+
569+
</details>
570+
571+
<details>
572+
<summary><b>Open PRs assigned to agents (click to expand)</b></summary>
573+
574+
1. Click `+ Widget` and select **Number Chart**.
575+
2. Title: `Open PRs assigned to agents` (add the `AI` icon).
576+
3. Select `Aggregate by property` **Chart type** and choose **AI Coding Agent** as the **Blueprint**.
577+
4. Select `Total open PRs` as the **Property** and choose `sum` for the **Function**.
578+
5. Select `custom` as the **Unit** and input `prs` as the **Custom unit**
579+
6. Click `Save`.
580+
581+
<img src="/img/guides/ai-driven-pr-dashboard-open-pr.png" border="1px" width="70%"/>
582+
513583
</details>
514584

585+
<details>
586+
<summary><b>Total PRs assigned to agents (click to expand)</b></summary>
587+
588+
1. Click `+ Widget` and select **Line Chart**.
589+
2. Title: `PRs assigned to agents`, (add the `LineChart` icon).
590+
3. Select `Count Entities (All Entities)` **Chart type** and choose **Pull Request** as the **Blueprint**.
591+
4. Input `Total PRs` as the **Y axis** **Title** and choose `AI Coding Agent` as the breakdown **Property**.
592+
5. Set `count` as the **Function**.
593+
6. Input `Date` as the **X axis** **Title** and choose `Created At` as the **Measure time by**.
594+
7. Set **Time Interval** to `Week` and **Time Range** to `In the past 90 days`.
595+
8. Click `Save`.
596+
597+
<img src="/img/guides/ai-driven-pr-dashboard-total-prs.png" border="1px" width="100%"/>
598+
599+
</details>
515600

516601
## Test the workflow
517602

518603
Now let us test the complete workflow to ensure everything works correctly.
519604

520605
<h4>Trigger a test PR update</h4>
521606

522-
1. Go to the [software catalog](https://app.getport.io/organization/catalog) page of your portal.
523-
2. Find an existing GitHub pull request created by or commented on by an AI, or create a test PR with AI involvement.
524-
3. Update the PR to trigger the automation chain.
607+
1. In a repository integrated into Port, trigger a new coding agent to open a pull request.
608+
2. Once the PR is opened, verify that it appears in Port and check its AI work status.
609+
3. After a new commit is made, ensure the selected coding agent is correctly identified.
525610

526611
<h4>Check the dashboard</h4>
527612

528613
The AI-driven pull requests should now appear in your AI Control Center dashboard, properly categorized and grouped by work status.
529614

615+
## Related guides
616+
- [Trigger GitHub Copilot from Port](https://docs.port.io/guides/all/trigger-github-copilot-from-port)
160 KB
Loading
36 KB
Loading
73.6 KB
Loading

0 commit comments

Comments
 (0)