Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github integration stuff #1

Merged
merged 8 commits into from
Aug 23, 2024
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 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 @@
?.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 All @@ -104,7 +106,7 @@
<Avatar className="h-6 w-6">
<AvatarImage src={avatar_url} />
<AvatarFallback>
{login.slice(0, 2)}

Check failure on line 109 in apps/nextjs/src/app/[workspaceSlug]/(job)/job-agents/add/GithubConfig.tsx

View workflow job for this annotation

GitHub Actions / lint

Unsafe call of an `error` type typed value
</AvatarFallback>
</Avatar>
{login}
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
Loading