Skip to content
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

Arihan/mar 8 ability to comment by line of code in pr #55

Merged
Merged
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
48df5f7
Specify Weaviate schema (#49)
arihanv Nov 29, 2023
88e74d3
dispatch coding agent
DexterStorey Nov 30, 2023
80ce114
Setup commands for sandbox
arihanv Nov 30, 2023
5088ffa
dispatch engineer instructions
DexterStorey Dec 1, 2023
5b1cef8
fix: sandbox clone repo
arihanv Dec 1, 2023
49d3193
fix: add git access token to sandbox
arihanv Dec 1, 2023
c01b888
fix: process.env usage
arihanv Dec 1, 2023
5f0696c
engineer prompt
DexterStorey Dec 1, 2023
5ddc312
Add reviewer agent for pull request
arihanv Dec 1, 2023
3f8b119
feat: add error handling to reviewer
arihanv Dec 3, 2023
72074e9
feat: create specific function for PR comments
arihanv Dec 3, 2023
0da48d1
feat: turn code reviewer into an agent
arihanv Dec 3, 2023
484e2f9
Fix labelling regression
tedspare Dec 5, 2023
f9092cc
Lint and minor refactors
tedspare Dec 5, 2023
4a651be
Fix instruction updater
tedspare Dec 5, 2023
707aac3
Merge branch 'staging' of https://github.com/RubricLab/maige into ari…
tedspare Dec 5, 2023
eea274f
Comment out dispatcher for now
tedspare Dec 5, 2023
fba6cfc
dep: install parse-diff
arihanv Dec 6, 2023
54179b8
feat: remove severity from prComment
arihanv Dec 6, 2023
4e34447
feat: create function for inline comments
arihanv Dec 6, 2023
836883e
feat: reviewer can use prComment & codeComment
arihanv Dec 6, 2023
2b5384e
feat: automatically review PRs and commits
arihanv Dec 6, 2023
9b6b922
fix: remove custom OctokitReqType
arihanv Dec 6, 2023
cd7d978
Merge branch 'staging' of https://github.com/RubricLab/maige into ari…
tedspare Dec 6, 2023
482f313
Add newline
tedspare Dec 6, 2023
6666976
Lint package.json
tedspare Dec 6, 2023
a009c12
Address 'pull_request of undefined' error
tedspare Dec 6, 2023
7eec620
Use camelCase
tedspare Dec 6, 2023
d291152
add filePath filter to code search function
arihanv Dec 7, 2023
d909615
improved agent tooling, prompting, and inputs
arihanv Dec 7, 2023
a1016db
refactor webhook route and add cleaner PR review
arihanv Dec 7, 2023
8a86bad
prompt engineering
arihanv Dec 7, 2023
a20406d
more prompt engineering
arihanv Dec 7, 2023
be974c6
Merge branch 'staging' of https://github.com/RubricLab/maige into ari…
tedspare Dec 7, 2023
b1626ed
Clarify repoFullName var name
tedspare Dec 7, 2023
a05c2b6
Comment out verbose param
tedspare Dec 7, 2023
3bd0960
Move footer to constants file
tedspare Dec 7, 2023
78ad53a
Use implied fields
tedspare Dec 7, 2023
16729c8
Shorten prompts. Refactor.
tedspare Dec 7, 2023
101df88
Rename commitId
tedspare Dec 8, 2023
b27846f
Trigger build
tedspare Dec 8, 2023
f429951
Trigger webhook
tedspare Dec 8, 2023
57bbc1e
Trigger webook again
tedspare Dec 8, 2023
10dde12
Remove unused type
tedspare Dec 8, 2023
b6e26e2
Allow synchronize event
tedspare Dec 8, 2023
6e8691e
Iterate review prompt
tedspare Dec 8, 2023
54dbda1
Parametrize code comment filepath
tedspare Dec 8, 2023
169e35d
Trigger webhook
tedspare Dec 8, 2023
9aaf357
Trigger webhook
tedspare Dec 8, 2023
2b592dd
Update Weaviate test
tedspare Dec 8, 2023
058459e
Trigger webhook
tedspare Dec 8, 2023
949214a
Call review agent once per diff
tedspare Dec 8, 2023
086083a
Update vector search test
tedspare Dec 8, 2023
9887f0e
Fix codesearch for reviewer
tedspare Dec 8, 2023
2462800
Trigger webhook
tedspare Dec 8, 2023
8b5dde6
Trigger webhook
tedspare Dec 8, 2023
4160457
Fix weaviate test
tedspare Dec 8, 2023
a9534f0
Add comment
tedspare Dec 8, 2023
c2e2a2e
Iterate prompt
tedspare Dec 8, 2023
0c4b925
Clean diff before passing to GPT
tedspare Dec 8, 2023
2f9e7f2
Avoid clogging agent with tool output
tedspare Dec 8, 2023
73b29f5
Trigger webhook
tedspare Dec 8, 2023
61631e0
Format whitespace in codesearch
tedspare Dec 8, 2023
129f403
Undo formatting changes
tedspare Dec 8, 2023
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
Prev Previous commit
Next Next commit
fix: remove custom OctokitReqType
  • Loading branch information
arihanv committed Dec 6, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 9b6b922b18e4c0212895b2178c5e654aaa32d980
3 changes: 1 addition & 2 deletions lib/agents/reviewer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {OctokitReqType} from '@octokit/app'
import {initializeAgentExecutorWithOptions} from 'langchain/agents'
import {ChatOpenAI} from 'langchain/chat_models/openai'
import {SerpAPI} from 'langchain/tools'
@@ -25,7 +24,7 @@ export default async function reviewer({
head
}: {
input: string
octokit: OctokitReqType
octokit: any
pullId?: string
owner?: string
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The owner, repo, and pull_number parameters should be marked as required if they are necessary for the codeComment function to work. If they are optional, there should be a fallback or error handling mechanism in place.

By Maige. How's my driving?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a really good point (I think) @arihanv. Wdyt?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The owner, repo, and pullNumber parameters should be marked as required if they are necessary for the codeComment function to work. If they are optional, there should be a check to ensure they are provided before calling codeComment to avoid runtime errors.

By Maige. How's my driving?

repo?: string