Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Bugfix - Multiple PR commenting #386

Merged
merged 1 commit into from
Nov 21, 2023
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Watermelon's GitHub application allows teams to contextualize pull requests with

## Installation

You can install Watermelon's GitHub Application [directly from the marketplace](https://github.com/marketplace/watermelon-context).
You can install Watermelon's GitHub Application [directly from the marketplace](https://github.com/marketplace/watermelon-copilot-for-code-review).

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion app/(loggedIn)/loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async function loading({}) {
<>
<>
<LoginGrid userEmail={userEmail} data={fakeData} />
<a href="https://github.com/apps/watermelon-context" target="_blank">
<a href="https://github.com/apps/watermelon-copilot-for-code-review" target="_blank">
<div className="Box d-flex flex-items-center flex-justify-start m-3 p-2">
<img className="avatar avatar-8" src="/logos/watermelon.svg" />
<div className="p-2">
Expand Down
2 changes: 1 addition & 1 deletion app/(notLogged)/auth/verify/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function verify() {
</div>
</div>

<a href="https://github.com/apps/watermelon-context" target="_blank">
<a href="https://github.com/apps/watermelon-copilot-for-code-review" target="_blank">
<div
className="Box d-flex flex-items-center flex-justify-center flex-column p-4 p-4 m-2"
style={{ maxWidth: "80ch" }}
Expand Down
6 changes: 4 additions & 2 deletions app/api/actions/github/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import randomText from "../../../../utils/actions/markdownHelpers/randomText";
import createTeamAndMatchUser from "../../../../utils/db/teams/createTeamAndMatchUser";
import sendUninstall from "../../../../utils/sendgrid/sendUninstall";



const app = new App({
appId: process.env.GITHUB_APP_ID!,
privateKey: process.env.GITHUB_PRIVATE_KEY!,
Expand Down Expand Up @@ -545,7 +547,7 @@ export async function POST(request: Request) {

// Find our bot's comment
let botComment = comments.data.find((comment) => {
return comment?.user?.login.includes("watermelon-context");
return comment?.user?.login.includes("watermelon-copilot-for-code-review");
});

// Update the existing comment
Expand Down Expand Up @@ -595,7 +597,7 @@ export async function POST(request: Request) {
const userLogin = comment.user.login;
let botComment = comment.body;
if (
userLogin === "watermelon-context[bot]" &&
userLogin === "watermelon-copilot-for-code-review[bot]" &&
botComment.includes("WatermelonAI Summary")
) {
// extract the business logic summary, it's always the first paragraph under the title
Expand Down
2 changes: 1 addition & 1 deletion app/github-app/page.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { redirect } from 'next/navigation';
export default async function GHApp({ params }) {
redirect('https://github.com/marketplace/watermelon-context');
redirect('https://github.com/marketplace/watermelon-copilot-for-code-review');
}
2 changes: 1 addition & 1 deletion components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function Header({ userEmail, userToken }) {
<li>
<a
className="dropdown-item block px-4 py-2 text-gray-800 hover:bg-gray-200 transition-colors duration-200"
href="https://github.com/apps/watermelon-context"
href="https://github.com/apps/watermelon-copilot-for-code-review"
>
GitHub App
</a>
Expand Down
2 changes: 1 addition & 1 deletion components/login-btn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function LogInBtn() {
</button>
</div>

<a href="https://github.com/apps/watermelon-context" target="_blank">
<a href="https://github.com/apps/watermelon-copilot-for-code-review" target="_blank">
<div
className="Box d-flex flex-items-center flex-justify-center flex-column p-4 p-4 m-2"
style={{ maxWidth: "80ch" }}
Expand Down