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

fix: Init redeploy #25

Merged
merged 10 commits into from
Sep 12, 2024
Merged

fix: Init redeploy #25

merged 10 commits into from
Sep 12, 2024

Conversation

adityachoudhari26
Copy link
Contributor

No description provided.

Comment on lines 176 to 182
Promise.all(
(input as string[]).map((releaseId) =>
canUser
.perform(Permission.ReleaseGet)
.on({ type: "release", id: releaseId }),
),
).then((results) => results.every(Boolean)),
Copy link
Member

@jsbroks jsbroks Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Promise.all(
(input as string[]).map((releaseId) =>
canUser
.perform(Permission.ReleaseGet)
.on({ type: "release", id: releaseId }),
),
).then((results) => results.every(Boolean)),
canUser
.perform(Permission.ReleaseGet)
.on(...input.map(t => ({ type: "release", id: r }))
.then((results) => results.every(Boolean)),

import { cn } from "@ctrlplane/ui";
import { Button } from "@ctrlplane/ui/button";

import { api } from "../../../../../trpc/react";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use proper imports
~/

variant="outline"
size="sm"
onClick={(e) => {
e.preventDefault();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure you need to do this?

Comment on lines 38 to 45
release: {
id: string;
name: string;
};
environment: {
id: string;
name: string;
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
release: {
id: string;
name: string;
};
environment: {
id: string;
name: string;
};
release: {
id: string;
name: string;
};
environment: {
id: string;
name: string;
};

I think you can one liner this :)

.take(showPreviousReleaseDistro)
.value();
const distroPadding = _.range(
0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can drop 0

@@ -20,7 +20,7 @@ type FilterFunc = (
insertJobConfigs: JobConfigInsert[],
) => Promise<JobConfigInsert[]>;

type ThenFunc = (tx: Tx, jobConfigs: JobConfig[]) => Promise<void>;
type ThenFunc = (tx: Tx, jobConfigs: JobConfig[]) => Promise<void> | void;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this replated to this pr?

@adityachoudhari26 adityachoudhari26 merged commit 561fab2 into main Sep 12, 2024
5 checks passed
@adityachoudhari26 adityachoudhari26 deleted the redeploy-init branch September 12, 2024 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants