Skip to content
Open
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: 2 additions & 0 deletions src/server/api/issues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export async function getExtractedIssues(req: Request, res: Response) {
issueData.map(async ({ data: issue }) => {
const issueBody = issue.body ? `\n${issue.body}` : "";
const issueText = `${issue.title}${issueBody}`;
const skipBuild = issueText.includes("--skip-build");

const extractedIssueTemplateParams = {
sourceMap,
Expand Down Expand Up @@ -89,6 +90,7 @@ export async function getExtractedIssues(req: Request, res: Response) {
return {
issueNumber: issue.number,
...extractedIssue,
skipBuild,
};
}),
);
Expand Down
5 changes: 5 additions & 0 deletions src/server/build/node/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ export function getEnv(repoSettings?: RepoSettings) {
export interface RunBuildCheckParams extends BaseEventData {
path: string;
afterModifications: boolean;
skipBuild?: boolean;
repoSettings?: RepoSettings;
}

export async function runBuildCheck({
path,
afterModifications,
repoSettings,
skipBuild = false,
...baseEventData
}: RunBuildCheckParams): ExecPromise {
const env = getEnv(repoSettings);
Expand Down Expand Up @@ -107,6 +109,9 @@ export async function runBuildCheck({
);
}
}
if (skipBuild) {
return { stdout: "Build skipped", stderr: "" };
}
const buildResult = await executeWithLogRequiringSuccess({
...baseEventData,
directory: path,
Expand Down
1 change: 1 addition & 0 deletions src/server/code/extractedIssue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { z } from "zod";
export const ExtractedIssueInfoSchema = z.object({
stepsToAddressIssue: z.string().nullable().optional(), // a step-by-step plan of how a developer would address the given issue
issueQualityScore: z.number().nullable().optional(), // a score from 0 to 5 indicating the quality of the GitHub issue and the confidence that a large language model can generate the correct code to address this issue on its first attempt. Use the evaluation criteria to determine the score.
skipBuild: z.boolean().optional(), // a flag indicating whether to skip the build process
commitTitle: z.string().nullable().optional(), // a brief git commit title no longer than 50 characters explaining the changes that need to be made
filesToCreate: z.array(z.string()).nullable().optional(), // an array of file paths that will be created by the developer. The paths CANNOT be in the source map's list of valid file names.
filesToUpdate: z.array(z.string()).nullable().optional(), // an array of file paths that will be updated by the developer. The paths MUST be in the source map's list of valid file names.
Expand Down
2 changes: 2 additions & 0 deletions src/server/messaging/queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ async function onReposAdded(
isNodeRepo = await isNodeProject(repository, installationAuthentication);
const project = await addProjectToDB(repo, event.id, event.name);
const baseEventData = {
skipBuild: false,
projectId: project.id,
repoFullName: repo.full_name,
userId: distinctId,
Expand Down Expand Up @@ -345,6 +346,7 @@ export async function onGitHubEvent(event: WebhookQueuedEvent) {
: "";

const baseEventData = {
skipBuild: body?.includes("--skip-build") ?? false,
projectId: project.id,
repoFullName: repository.full_name,
userId: distinctId,
Expand Down
2 changes: 2 additions & 0 deletions src/server/utils/todos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const createTodo = async (

const issueBody = issue.body ? `\n${issue.body}` : "";
const issueText = `${issue.title}${issueBody}`;
const skipBuild = issueText.includes("--skip-build");

let cleanupClone: (() => Promise<void>) | undefined;
try {
Expand Down Expand Up @@ -75,6 +76,7 @@ export const createTodo = async (
newTodo?.id,
issueNumber,
rootPath,
skipBuild,
);
}

Expand Down