Skip to content

Commit

Permalink
cp
Browse files Browse the repository at this point in the history
  • Loading branch information
slavingia committed Sep 25, 2024
1 parent 4a097ad commit debbaaf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/(dashboard)/dashboard/pull-request.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { useState, useEffect } from "react";
import { useState } from "react";
import { Button } from "@/components/ui/button";
import {
GitPullRequestDraft,
Expand All @@ -14,7 +14,6 @@ import {
} from "lucide-react";
import Link from "next/link";
import { Checkbox } from "@/components/ui/checkbox";
import { Badge } from "@/components/ui/badge";
import dynamic from "next/dynamic";
import { PullRequest, TestFile } from "./types";
import { generateTestsResponseSchema } from "@/app/api/generate-tests/schema";
Expand Down
3 changes: 1 addition & 2 deletions lib/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ export async function commitChangesToPullRequest(
sha: newCommit.sha,
});

// Return the commit URL
return `https://github.com/${owner}/${repo}/commit/${newCommit.sha}`;
} catch (error) {
console.error("Error committing changes to pull request:", error);
Expand Down Expand Up @@ -299,7 +298,7 @@ export async function getPullRequestInfo(
queue.push(...(dirContents.data as { path: string; type: string }[]));
} else if (
item.type === "file" &&
item.path.toLowerCase().includes("test.tsx")
item.path.toLowerCase().includes(".test.")
) {
const fileContent = await octokit.rest.repos.getContent({
owner,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"react-beautiful-dnd": "^13.1.1",
"react-diff-viewer": "^3.1.1",
"react-dom": "19.0.0-rc-7771d3a7-20240827",
"run": "^1.5.0",
"server-only": "^0.0.1",
"stripe": "^16.10.0",
"tailwind-merge": "^2.5.2",
Expand Down
12 changes: 12 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit debbaaf

Please sign in to comment.