Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# Request review from original author
/plugins/Algolia/ @andrewmumblebee
/plugins/AutoTask/ @TimWheeler-SQUP
/plugins/CodeRabbit/ @TimWheeler-SQUP
/plugins/DattoRMM/ @TimWheeler-SQUP
/plugins/DigiCert/ @shaswot77
/plugins/FantasyPremierLeague/ @TimWheeler-SQUP
Expand Down
18 changes: 18 additions & 0 deletions plugins/CodeRabbit/v1/configValidation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"steps": [
{
"displayName": "Authenticate",
"dataStream": { "name": "organizations" },
"required": true,
"success": "Connected to CodeRabbit.",
"error": "Could not connect. Check the API key is valid and the organization is on the CodeRabbit Enterprise plan."
},
{
"displayName": "Check seat access",
"dataStream": { "name": "licenses" },
"required": false,
"success": "Seat and license data is accessible.",
"error": "Seat and license data is unavailable. Create the API key as an organization admin to see seat usage."
}
]
}
23 changes: 23 additions & 0 deletions plugins/CodeRabbit/v1/custom_types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
{
"name": "Organization",
"sourceType": "Organization",
"icon": "building",
"singular": "Organization",
"plural": "Organizations"
},
{
"name": "Repository",
"sourceType": "Repository",
"icon": "code-branch",
"singular": "Repository",
"plural": "Repositories"
},
{
"name": "User",
"sourceType": "User",
"icon": "user",
"singular": "User",
"plural": "Users"
}
]
52 changes: 52 additions & 0 deletions plugins/CodeRabbit/v1/dataStreams/auditLogs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": "auditLogs",
"displayName": "Audit logs",
"description": "Organization audit log entries for administrative actions",
"tags": ["Activity", "Security"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "/v1/audit-logs",
"pathToData": "data",
"expandInnerObjects": true,
"getArgs": [
{ "key": "date_from", "value": "{{timeframe.start}}" },
{ "key": "date_to", "value": "{{timeframe.end}}" },
{ "key": "search", "value": "{{search || null}}" }
],
"paging": {
"mode": "offset",
"pageSize": { "realm": "queryArg", "path": "page_size", "value": "100" },
"offset": {
"mode": "page",
"rowCountIn": { "realm": "payloadArraySize", "path": "data" },
"base": 1
},
"out": { "realm": "queryArg", "path": "page" }
},
"errorHandling": { "type": "path", "realm": "payload", "path": "error.message" }
},
"matches": "none",
"ui": [
{
"type": "text",
"name": "search",
"label": "Search user name",
"placeholder": "Enter a user name",
"help": "Supports partial or full name matching"
}
],
"metadata": [
{ "name": "createdAt", "displayName": "Time", "shape": "date", "role": "timestamp" },
{ "name": "actionLabel", "displayName": "Action", "shape": "string", "role": "label" },
{ "name": "action", "displayName": "Action key", "shape": "string", "visible": false },
{ "name": "actor.name", "displayName": "Actor", "shape": "string" },
{ "name": "actor.subtitle", "displayName": "Actor role", "shape": "string" },
{ "name": "actor.isBot", "displayName": "Bot", "shape": "boolean", "visible": false },
{ "name": "resourceTypeLabel", "displayName": "Resource type", "shape": "string" },
{ "name": "resourceSummary", "displayName": "Resource", "shape": "string" },
{ "name": "ipAddress", "displayName": "IP address", "shape": "string" },
{ "name": "id", "displayName": "ID", "shape": "string", "role": "id", "visible": false }
],
"timeframes": true
}
37 changes: 37 additions & 0 deletions plugins/CodeRabbit/v1/dataStreams/licenses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "licenses",
"displayName": "Licenses",
"description": "Seats purchased, seats assigned and the seat assignment mode",
"tags": ["License"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "/v1/users",
"getArgs": [{ "key": "limit", "value": "1" }],
"paging": { "mode": "none" },
"errorHandling": { "type": "path", "realm": "payload", "path": "error.message" }
},
"matches": "none",
"metadata": [
{ "name": "seats_purchased", "displayName": "Seats purchased", "shape": "number" },
{ "name": "seats_assigned", "displayName": "Seats assigned", "shape": "number", "role": "value" },
{
"name": "seatsAvailable",
"displayName": "Seats available",
"computed": true,
"valueExpression": "{{ Math.max($['seats_purchased'] - $['seats_assigned'], 0) }}",
"shape": "number"
},
{
"name": "seatUtilization",
"displayName": "Seat utilization",
"computed": true,
"valueExpression": "{{ $['seats_purchased'] > 0 ? $['seats_assigned'] / $['seats_purchased'] * 100 : null }}",
"shape": ["percent", { "decimalPlaces": 1 }]
},
{ "name": "seat_assignment_mode", "displayName": "Seat assignment mode", "shape": "string" }
],
"timeframes": ["none"],
"supportsNoneTimeframe": true,
"defaultTimeframe": "none"
}
66 changes: 66 additions & 0 deletions plugins/CodeRabbit/v1/dataStreams/mcpUsage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"name": "mcpUsage",
"displayName": "MCP usage",
"description": "Pull requests that used MCP servers during review, with insight and tool call counts per server",
"tags": ["Code Review", "Usage"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "/v1/metrics/mcp",
"pathToData": "data",
"getArgs": [
{ "key": "start_date", "value": "{{timeframe.start.slice(0, 10)}}" },
{ "key": "end_date", "value": "{{timeframe.end.slice(0, 10)}}" },
{
"key": "repository_ids",
"value": "{{repository && repository.length ? repository.map(o => [].concat(o.rawId)[0]).join(',') : null}}"
},
{
"key": "user_ids",
"value": "{{user && user.length ? user.map(o => [].concat(o.rawId)[0]).join(',') : null}}"
}
],
"paging": {
"mode": "token",
"pageSize": { "realm": "queryArg", "path": "limit", "value": "1000" },
"in": { "realm": "payload", "path": "next_cursor" },
"out": { "realm": "queryArg", "path": "cursor" }
},
"errorHandling": { "type": "script", "script": "errorHandling/mcpUsage.js" },
"postRequestScript": "mcpUsage.js"
},
"matches": "none",
"ui": [
{
"type": "objects",
"name": "repository",
"label": "Repository",
"matches": { "sourceType": { "type": "oneOf", "values": ["Repository"] } }
},
{
"type": "objects",
"name": "user",
"label": "User",
"matches": { "sourceType": { "type": "oneOf", "values": ["User"] } }
}
],
"metadata": [
{ "name": "prUrl", "displayName": "Pull request", "shape": ["url", { "label": "#{{column.prNumber}}" }], "role": "link" },
{
"name": "prNumber",
"displayName": "PR number",
"shape": ["number", { "thousandsSeparator": false }],
"visible": false
},
{ "name": "merged_at", "displayName": "Merged", "shape": "date", "role": "timestamp" },
{ "name": "serverName", "displayName": "MCP server", "shape": "string", "role": "label" },
{ "name": "insightCount", "displayName": "Insights", "shape": "number" },
{ "name": "toolCallCount", "displayName": "Tool calls", "shape": "number" },
{ "name": "tools", "displayName": "Tools", "shape": "string" },
{ "name": "repository_id", "displayName": "Repository ID", "shape": "string", "visible": false },
{ "name": "author_id", "displayName": "Author ID", "shape": "string", "visible": false },
{ "name": "repositoryName", "displayName": "Repository", "sourceId": "repository_id", "sourceType": "Repository", "objectPropertyPath": "name" },
{ "name": "authorName", "displayName": "Author", "sourceId": "author_id", "sourceType": "User", "objectPropertyPath": "name" }
],
"timeframes": ["last7days", "last30days", "thisMonth", "lastMonth", "thisQuarter", "lastQuarter"]
}
29 changes: 29 additions & 0 deletions plugins/CodeRabbit/v1/dataStreams/organizations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "organizations",
"displayName": "Organizations",
"description": "CodeRabbit organizations the API key can access",
"tags": ["Organization"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "/v1/organizations",
"pathToData": "organizations",
"paging": {
"mode": "token",
"pageSize": { "realm": "queryArg", "path": "limit", "value": "100" },
"in": { "realm": "payload", "path": "next_cursor" },
"out": { "realm": "queryArg", "path": "cursor" }
},
"errorHandling": { "type": "path", "realm": "payload", "path": "error.message" }
},
"matches": "none",
"metadata": [
{ "name": "name", "displayName": "Name", "shape": "string", "role": "label" },
{ "name": "provider", "displayName": "Git provider", "shape": "string" },
{ "name": "provider_organization_id", "displayName": "Provider organization ID", "shape": "string", "role": "id" },
{ "name": "id", "displayName": "CodeRabbit organization ID", "shape": "string", "visible": false }
],
"timeframes": ["none"],
"supportsNoneTimeframe": true,
"defaultTimeframe": "none"
}
Loading
Loading