Skip to content

Commit

Permalink
github integration stuff (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
adityachoudhari26 authored Aug 23, 2024
1 parent cbb6d08 commit 3bdaf44
Show file tree
Hide file tree
Showing 14 changed files with 639 additions and 286 deletions.
2 changes: 1 addition & 1 deletion apps/docs/pages/getting-started/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Steps } from "nextra/components";

### Create Github Workflow

### Connect Github to CtrlPlane
### Connect Github to Ctrlplane

### Run the deploy job

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ export const GithubJobAgentConfig: React.FC<{
?.filter(
(org) =>
!githubOrgsInstalled.data?.some(
(o) => o.organizationName === org.data.login,
(o) =>
o.github_organization.organizationName ===
org.data.login,
),
)
.map(({ data: { id, login, avatar_url } }) => (
Expand Down

This file was deleted.

This file was deleted.

106 changes: 0 additions & 106 deletions apps/nextjs/src/app/[workspaceSlug]/(job)/job-agents/add/page.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@ctrlplane/ui/card";
import { Separator } from "@ctrlplane/ui/separator";

import { api } from "~/trpc/react";

export const GithubConfigFileSync: React.FC<{
workspaceId?: string;
}> = ({ workspaceId }) => {
const configFiles = api.github.configFile.list.useQuery(workspaceId ?? "", {
enabled: workspaceId != null,
});

return (
<Card className="rounded-md">
<CardHeader className="space-y-2">
<CardTitle>Sync Github Config File</CardTitle>
<CardDescription>
A{" "}
<code className="rounded-md bg-neutral-800 p-1">ctrlplane.yaml</code>{" "}
configuration file allows you to manage your Ctrlplane resources from
github.
</CardDescription>
</CardHeader>

<Separator />

<CardContent className="p-4">
{configFiles.data?.map((configFile) => (
<div key={configFile.id}>{configFile.name}</div>
))}
</CardContent>
</Card>
);
};
Loading

0 comments on commit 3bdaf44

Please sign in to comment.