Skip to content

Commit

Permalink
fix issue with github events no longer sending forkee html url
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Sep 30, 2024
1 parent 2fac615 commit ad4cb04
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
11 changes: 2 additions & 9 deletions app/feed/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,8 @@ import octokit from "@/lib/octokit";

const GITHUB_ORG: string = env.NEXT_PUBLIC_GITHUB_ORG;

export const revalidate = 600;

type Props = {
searchParams: {
page?: string;
};
};

export default async function FeedPage({ searchParams }: Props) {
export default async function FeedPage() {
console.log(GITHUB_ORG);
const events = await octokit.paginate(
"GET /orgs/{org}/events",
{
Expand Down
6 changes: 5 additions & 1 deletion components/gh_events/GitHubEvent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,11 @@ export default function GitHubEvent({ event }: { event?: IGitHubEvent }) {
/>
</div>
);
body = <OpenGraphImage url={event.payload.forkee.html_url} />;
body = (
<OpenGraphImage
url={`https://github.com/${event.payload.forkee.full_name}`}
/>
);
break;

case "ReleaseEvent":
Expand Down
1 change: 0 additions & 1 deletion lib/gh_events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ interface Repo {
full_name: string;
owner: Actor;
url: string;
html_url: string;
fork: boolean;
}

Expand Down

0 comments on commit ad4cb04

Please sign in to comment.