Skip to content

On-demand report generation docs #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Ondemand report input schema format
  • Loading branch information
Spikatrix committed Jul 8, 2024
commit cfcd6b52205040f28fe1fcc37ecea4ed8e0ef620
29 changes: 29 additions & 0 deletions docs/guides/ondemand-reports.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: On-demand Reports
sidebar_label: On-demand Reports (Beta)
description:
CodeRabbit offers a way to generate on-demand reports using a simple API request
sidebar_position: 5
---

```mdx-code-block
import ReportSchema from "@site/src/components/ReportSchema";
```

:::info

This feature is in beta

:::

CodeRabbit offers a way to generate on-demand reports using the [API](https://api.coderabbit.ai/api/swagger/).
You will be able to use the API by creating an [API key](https://app.coderabbit.ai/settings/api-keys).


On-demand report input schema:

```mdx-code-block
<ReportSchema />
```

[API Reference](https://api.coderabbit.ai/api/swagger/)
6 changes: 6 additions & 0 deletions src/components/ReportSchema.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Schema from "@site/static/schema/reporting.json";
import JSONSchemaViewer from "@theme/JSONSchemaViewer";

export default function Viewer(): JSX.Element {
return <JSONSchemaViewer schema={Schema} />;
}
93 changes: 93 additions & 0 deletions static/schema/reporting.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"type": "object",
"properties": {
"scheduleRange": {
"type": "string",
"enum": [
"Dates"
]
},
"from": {
"type": "string",
"format": "date"
},
"to": {
"type": "string",
"format": "date"
},
"prompt": {
"type": "string"
},
"promptTemplate": {
"type": "string",
"enum": [
"Daily Standup Report",
"Sprint Report",
"Release Notes",
"Custom"
]
},
"parameters": {
"type": "array",
"items": {
"type": "object",
"properties": {
"parameter": {
"type": "string",
"enum": [
"REPOSITORY",
"LABEL",
"TEAM",
"USER"
]
},
"operator": {
"type": "string",
"enum": [
"IN",
"ALL"
]
},
"values": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"parameter",
"operator",
"values"
],
"additionalProperties": false
}
},
"groupBy": {
"type": "string",
"enum": [
"NONE",
"REPOSITORY",
"LABEL",
"TEAM",
"USER"
]
},
"subgroupBy": {
"type": "string",
"enum": [
"NONE",
"REPOSITORY",
"LABEL",
"TEAM",
"USER"
]
}
},
"required": [
"from",
"to"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}