You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/all/track-ai-driven-pull-requests.md
+89-25Lines changed: 89 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ description: Learn how to track and monitor AI-driven pull requests in your deve
7
7
8
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.
@@ -79,36 +79,30 @@ When installing Port's GitHub app, the `Service` and `Pull request` blueprints a
79
79
"type": "boolean",
80
80
"title": "Draft",
81
81
"description": "Whether the PR is in draft mode. Draft PR usually requires more attention."
82
-
}
83
-
```
84
-
</details>
85
-
86
-
5. Add the following calculation property to the `calculationProperties` section:
87
-
88
-
<details>
89
-
<summary><b>Work status calculation property (Click to expand)</b></summary>
90
-
91
-
```json showLineNumbers
82
+
},
92
83
"workStatus": {
84
+
"type": "string",
93
85
"title": "Coding agent status",
94
-
"icon": "DefaultProperty",
95
86
"description": "The most important status definition for a PR. \"Approved\" means needs to nudge reviewers/address comments, when \"Awaiting review\" requires urgent attention.",
96
-
"calculation": "if .title | test(\"WIP\"; \"i\") then \"In Progress\" elif .properties.draft == true and (.relations.reviewers // [] | length) > 0 then \"Awaiting review\" elif .properties.draft == true and (.title | test(\"WIP\"; \"i\") | not) and (.relations.reviewers // [] | length) == 0 then \"Requested changes\" elif .properties.draft != true then \"Approved\" else \"Unknown\" end",
97
-
"type": "string"
87
+
"enum": [
88
+
"In Progress",
89
+
"Awaiting review",
90
+
"Requested changes",
91
+
"Approved",
92
+
"Unknown"
93
+
],
94
+
"enumColors": {
95
+
"In Progress": "yellow",
96
+
"Awaiting review": "orange",
97
+
"Requested changes": "turquoise",
98
+
"Approved": "green",
99
+
"Unknown": "lightGray"
100
+
}
98
101
}
99
102
```
100
103
</details>
101
104
102
-
:::tip Calculation explanation
103
-
This calculation property automatically determines the work status of a PR based on:
104
-
- **In Progress**: PR title contains "WIP" (work in progress)
105
-
- **Awaiting review**: Draft PR with assigned reviewers
106
-
- **Requested changes**: Draft PR without reviewers (likely needs changes)
107
-
- **Approved**: Non-draft PR (ready for final review)
108
-
- **Unknown**: Any other state
109
-
:::
110
-
111
-
6. Add the following relation to the `relations` section:
105
+
5. Add the following relation to the `relations` section:
112
106
113
107
<details>
114
108
<summary><b>AI coding agent relation (Click to expand)</b></summary>
@@ -123,7 +117,77 @@ When installing Port's GitHub app, the `Service` and `Pull request` blueprints a
123
117
```
124
118
</details>
125
119
126
-
7. Click `Save` to update the blueprint.
120
+
6. Click `Save` to update the blueprint.
121
+
122
+
123
+
### Update GitHub integration configuration
124
+
125
+
Now we will update the GitHub integration configuration to ensure that the new properties added to the pull requests are correctly mapped.
126
+
127
+
1. Go to the [data sources](https://app.getport.io/settings/data-sources) page of your portal.
128
+
2. Find your GitHub integration and click on it.
129
+
3. Go to the `Mapping` tab.
130
+
4. Add the following YAML block into the editor to map the pull request properties:
131
+
132
+
<details>
133
+
<summary><b>Updated GitHub integration configuration (Click to expand)</b></summary>
0 commit comments