-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples.ts
More file actions
45 lines (41 loc) · 969 Bytes
/
examples.ts
File metadata and controls
45 lines (41 loc) · 969 Bytes
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
/**
* Example usage and testing for CodeReview API
*/
// Example 1: Structured review request
const structuredReviewExample = {
method: "POST",
url: "http://localhost:8787/review",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
context_file: "review.md",
urls: [
"https://github.com/owner/repo/pull/123",
"https://github.com/owner/repo/pull/124"
],
prefer_cli: "claude",
debug: false
})
};
// Example 2: Natural language review request
const nlReviewExample = {
method: "POST",
url: "http://localhost:8787/review/nl",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
query: "Review PRs 123 and 124 from owner/repo using claude with debug mode"
})
};
// Example 3: Health check
const healthCheckExample = {
method: "GET",
url: "http://localhost:8787/health"
};
export {
structuredReviewExample,
nlReviewExample,
healthCheckExample
};