diff --git a/README.md b/README.md index 796b88e9..9e58f012 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,14 @@ We currently support the following integrations ## Features Watermelon's GitHub application allows teams to contextualize pull requests with code context from different sources. +contextualization -![watermelon-github-application](https://marketplace-screenshots.githubusercontent.com/15256/0b80188e-a25b-4fb1-946b-5320dd0f4744?auto=webp&format=jpeg&width=670&dpr=2) +Our GitHub application also identifies errors in your codebase. Beginning with the detection of console logs (and their equivalents across various major programming languages), Watermelon comments PR line diffs whenever an error is detected. Expanded capabilities in identifying a broader range of errors soon. +linediff + + +Finally, our GitHub app uses "LLMs as Reviewer Zero". Watermelon evaluates the traced code context against the intent of the Pull Request. Based on these insights, it labels them as "🍉 Safe To Merge", "👀 Take a Deeper Dive", or "🚨 Don't Merge". +prereview ## Requirements diff --git a/app/api/actions/github/route.ts b/app/api/actions/github/route.ts index 0bcf297e..22a04e28 100644 --- a/app/api/actions/github/route.ts +++ b/app/api/actions/github/route.ts @@ -101,6 +101,10 @@ export async function POST(request: Request) { "as", "at", "better", + "bug", + "bugs", + "bugfix", + "bugfixes", "build", "bump dependencies", "bump version", diff --git a/pull_request_template.md b/pull_request_template.md index f72eb87c..0f1a8325 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -7,7 +7,8 @@ - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation update - [ ] Chore: cleanup/renaming, etc -- [ ] RFC +- [ ] RFC +- [ ] Test ## Notes @@ -15,4 +16,4 @@ ## Acceptance - [ ] I have read [the Contributing guidelines](CONTRIBUTING.md) -- [ ] I have read the [Code of Conduct](CODE_OF_CONDUCT.md) \ No newline at end of file +- [ ] I have read the [Code of Conduct](CODE_OF_CONDUCT.md) diff --git a/utils/actions/detectConsoleLogs.ts b/utils/actions/detectConsoleLogs.ts index 22dc94ee..25731932 100644 --- a/utils/actions/detectConsoleLogs.ts +++ b/utils/actions/detectConsoleLogs.ts @@ -113,7 +113,7 @@ export default async function detectConsoleLogs({ try { return await openai .createChatCompletion({ - model: "gpt-3.5-turbo-16k", + model: "gpt-4-1106-preview", messages: [ { role: "system", diff --git a/utils/api/updateGitHubCounts.ts b/utils/api/updateGitHubCounts.ts new file mode 100644 index 00000000..92b3fa68 --- /dev/null +++ b/utils/api/updateGitHubCounts.ts @@ -0,0 +1,16 @@ +import type { NextApiRequest, NextApiResponse } from 'next' +import updateGitHubQueryCounts from '../../utils/db/github/updateGitHubQueryCounts' + +export default async function handler( + req: NextApiRequest, + res: NextApiResponse +) { + + try { + const data = await updateGitHubQueryCounts() + res.status(200).json(data) + } catch (error) { + console.error(error) + res.status(500).json({error: 'Error updating GitHub counts'}) + } +} \ No newline at end of file diff --git a/utils/db/github/updateGitHubQueryCounts.ts b/utils/db/github/updateGitHubQueryCounts.ts index a644e13b..8d513763 100644 --- a/utils/db/github/updateGitHubQueryCounts.ts +++ b/utils/db/github/updateGitHubQueryCounts.ts @@ -2,7 +2,7 @@ import executeRequest from "../azuredb"; export default async function updateGitHubQueryCounts(): Promise { try { - let data = await executeRequest(`EXEC dbo.update_git_query_counts`); + let data = await executeRequest(`EXEC dbo.update_github_query_counts`); return { data }; } catch (err) { console.error(err); diff --git a/utils/db/teams/addActionCount.ts b/utils/db/teams/addActionCount.ts index 0819ef80..c6b6586b 100644 --- a/utils/db/teams/addActionCount.ts +++ b/utils/db/teams/addActionCount.ts @@ -2,7 +2,7 @@ import executeRequest from "../azuredb"; export default async ({ owner }) => { let query = await executeRequest( - `EXEC dbo.increment_owner_github_app_uses @watermelon_user = '${owner}'` + `EXEC dbo.increment_owner_github_app_uses @owner = '${owner}'` ); return query; }; diff --git a/vercel.json b/vercel.json new file mode 100644 index 00000000..f520843b --- /dev/null +++ b/vercel.json @@ -0,0 +1,8 @@ +{ + "crons": [ + { + "path": "/api/cron", + "schedule": "0 0 1 * *" + } + ] + } \ No newline at end of file