Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
VercelProjectIntegrationDataSchema,
buildVercelDeploymentUrl,
} from "~/v3/vercel/vercelProjectIntegrationSchema";
import { isBillingConfigured } from "~/services/platform.v3.server";
import { resolveRedeploySource } from "~/v3/redeploy";

const pageSize = 20;
Expand Down Expand Up @@ -225,13 +226,15 @@ LIMIT ${pageSize} OFFSET ${pageSize * (page - 1)};`;
currentPage: page,
totalPages: Math.ceil(totalCount / pageSize),
hasVercelIntegration,
connectedGithubRepository: project.connectedGithubRepository ?? undefined,
environmentGitHubBranch,
connectedGithubRepository: isBillingConfigured()
? (project.connectedGithubRepository ?? undefined)
: undefined,
environmentGitHubBranch: isBillingConfigured() ? environmentGitHubBranch : undefined,
deployments: deployments.map((deployment, index) => {
const label = labeledDeployments.find(
(labeledDeployment) => labeledDeployment.deploymentId === deployment.id
);
const redeploySource = resolveRedeploySource(deployment);
const redeploySource = isBillingConfigured() ? resolveRedeploySource(deployment) : null;

let vercelDeploymentUrl: string | null = null;
if (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { type PrismaClient } from "@trigger.dev/database";
import { fromPromise, ok, ResultAsync } from "neverthrow";
import { env } from "~/env.server";
import { isBillingConfigured } from "~/services/platform.v3.server";
import { BranchTrackingConfigSchema } from "~/v3/github";
import { BasePresenter } from "./basePresenter.server";

Expand All @@ -11,7 +12,7 @@ type GitHubSettingsOptions = {

export class GitHubSettingsPresenter extends BasePresenter {
public call({ projectId, organizationId }: GitHubSettingsOptions) {
const githubAppEnabled = env.GITHUB_APP_ENABLED === "1";
const githubAppEnabled = env.GITHUB_APP_ENABLED === "1" && isBillingConfigured();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 Git settings section remains visible on self-hosted instances

With GITHUB_APP_ENABLED=1, the integrations page still renders Git settings through ProjectSettingsPresenter. The nested panel now renders nothing, leaving an empty section. Align the parent gate if the entire section must disappear.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.


if (!githubAppEnabled) {
return ok({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ import { findEnvironmentBySlug } from "~/models/runtimeEnvironment.server";
import { env } from "~/env.server";
import { GitHubSettingsPresenter } from "~/presenters/v3/GitHubSettingsPresenter.server";
import { logger } from "~/services/logger.server";
import { triggerInitialDeployment } from "~/services/platform.v3.server";
import { isBillingConfigured, triggerInitialDeployment } from "~/services/platform.v3.server";
import { marketplaceInitialDeploymentOptions } from "~/v3/services/marketplaceInitialDeploymentOptions.server";
import { ProjectSettingsService } from "~/services/projectSettings.server";
import { rbac } from "~/services/rbac.server";
Expand Down Expand Up @@ -241,6 +241,13 @@ export const action = dashboardAction(
throw new Response("Not Found", { status: 404 });
}

if (env.GITHUB_APP_ENABLED !== "1" || !isBillingConfigured()) {
return json(
{ ok: false, error: "Native GitHub deployments are not available on self-hosted instances." },
{ status: 403 }
);
}
Comment on lines +244 to +249

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 Deploy-now endpoint retains its separate availability gate

The new GitHub action gate does not cover deploy-now. With onboarding enabled and an existing repository, that endpoint still reaches the platform trigger on self-hosted instances. Check whether it needs an explicit unavailable response.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.


const formData = await request.formData();
const submission = parseWithZod(formData, { schema: GitHubActionSchema });

Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/app/services/platform.v3.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ export async function enqueueBuild(
fromBundle?: boolean;
}
) {
if (!client) return undefined;
if (!client) throw new Error("Platform client not configured");
const result = await client.enqueueBuild(projectId, { deploymentId, artifactKey, options });
if (!result.success) {
recordPlatformFailure("enqueueBuild", "no_success");
Expand Down
8 changes: 8 additions & 0 deletions apps/webapp/app/v3/services/initializeDeployment.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { resolveDeployBaseImages } from "../deployBaseImages.server";
import { getDeploymentImageRef } from "../getDeploymentImageRef.server";
import { tryCatch } from "@trigger.dev/core";
import { getRegistryConfig } from "../registryConfig.server";
import { isBillingConfigured } from "~/services/platform.v3.server";
import { DeploymentService } from "./deployment.server";
import { recordDeploymentInitialized } from "./recordDeploymentFinished.server";
import { buildEnvVarsEnvelope } from "./initializeDeployment/buildEnvVarsEnvelope.server";
Expand Down Expand Up @@ -149,6 +150,13 @@ export class InitializeDeploymentService extends BaseService {
throw new ServiceValidationError("UNMANAGED deployments are not supported");
}

if (payload.isNativeBuild && !isBillingConfigured()) {
throw new ServiceValidationError(
"Native builds are not supported on self-hosted instances. Deploy with the CLI or GitHub Actions instead.",
400
);
}
Comment on lines +153 to +158

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Self-hosted deployment fix lacks release note

When self-hosted users upgrade, isBillingConfigured() now blocks native builds without a server change note. They receive no release notice explaining the new deployment restriction.

Learn more

The repository requires a .server-changes/ entry for user-facing, server-only behavior changes. This change rejects native deployment requests on self-hosted instances and directs users to other deployment methods. Without an entry, that upgrade behavior is absent from the published release notes. The PR changes only webapp files, so a server change note is the required format.

Example: A self-hosted user upgrades and runs trigger deploy --native-build. The API now rejects the request, but the release notes do not warn them to switch deployment methods.

Recommended fix: Add a .server-changes/ Markdown file with area: webapp, type: fix, and a one-line user-facing description of the self-hosted native deployment change.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.


const requiredBaseImages = resolveDeployBaseImages(runtime, {
base: env.DEPLOY_BASE_IMAGES,
buildBase: env.DEPLOY_BUILD_BASE_IMAGES,
Expand Down