kleneway / jacob

Just Another Coding Bot
https://jacb.ai
Apache License 2.0
0 stars 0 forks source link

Add skip build flag functionality #89

Open kleneway opened 1 month ago

kleneway commented 1 month ago

When a new request comes in, the current process runs a build, updates the code, and then runs another build to ensure nothing broke. We need to add a flag (passed via the text of the GitHub issue) that skips the build. This will speed up the process and allow users to quickly try out JACoB without worrying about the semantics of how to properly build the project.

Requirements:

  1. Modify checkAndCommit function:

    • Update the checkAndCommit function in src/server/code/checkAndCommit.ts to accept a skipBuild parameter.
    • Add logic to skip the build process if the skipBuild flag is set to true.
  2. Update editFiles function:

    • Modify the editFiles function in src/server/code/editFiles.ts to parse the issue body for the skip build flag and pass it to checkAndCommit.
  3. Update getIssue function:

    • Ensure the getIssue function in src/server/github/issue.ts retrieves the issue body correctly for parsing.
  4. Parameter Interface:

    • Update the CheckAndCommitParams interface to include the skipBuild parameter.

Files to Update:

Acceptance Criteria:

Example Code Snippet:

// src/server/code/checkAndCommit.ts
export async function checkAndCommit({
  octokit,
  owner,
  repo,
  branch,
  message,
  files,
  issueNumber,
  baseBranch,
  skipBuild, // New parameter
}: CheckAndCommitParams): Promise<CheckAndCommitResult> {
  // ... (existing code)

  if (!skipBuild) {
    const buildResult = await buildAndTest({ cwd: repoPath });

    if (!buildResult.success) {
      console.log("Build failed");
      return {
        success: false,
        error: "Build failed",
        buildErrors: buildResult.errors,
      };
    }
  } else {
    console.log("Build skipped due to skipBuild flag");
  }

  // ... (rest of the function)
}

@jacob-ai-bot

Steps to Address Issue: 1. Update CheckAndCommitParams interface in src/types.ts to include skipBuild parameter.

  1. Modify checkAndCommit function in src/server/code/checkAndCommit.ts to accept skipBuild parameter and implement logic to skip build process when flag is true.
  2. Update editFiles function in src/server/code/editFiles.ts to parse issue body for skip build flag and pass it to checkAndCommit.
  3. Ensure getIssue function in src/server/github/issue.ts correctly retrieves the issue body for parsing.
  4. Add tests to verify the skip build functionality works as expected.

Files to Update: src/server/code/checkAndCommit.ts, src/server/code/editFiles.ts, src/server/github/issue.ts, src/types.ts

task assigned to: @jacob-ai-bot

jacob-local-kevin[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-local-kevin[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-local-kevin[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-local-kevin[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-local-kevin[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-local-kevin[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-local-kevin[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-local-kevin[bot] commented 1 month ago

Unfortunately, I ran into trouble working on this.

Here is some error information:

Max retries exceeded for GPT request: 
    ## USER PROMPT
    You are an AI coding assistant tasked with creating a detailed plan for addressing a specific GitHub issue within a codebase. Your goal is to analyze the provided information a
jacob-local-kevin[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-local-kevin[bot] commented 1 month ago

Unfortunately, I ran into trouble working on this.

Here is some error information:

Command failed: git log -n 1 --format="%H" /src/server/code/checkAndCommit.ts
fatal: ambiguous argument '/src/server/code/checkAndCommit.ts': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
jacob-local-kevin[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-local-kevin[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-local-kevin[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-local-kevin[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-local-kevin[bot] commented 1 month ago

Unfortunately, I ran into trouble working on this.

Here is some error information:

Max retries exceeded for GPT request: 
    ## USER PROMPT
    You are an AI coding assistant tasked with creating a detailed plan for addressing a specific GitHub issue within a codebase. Your goal is to analyze the provided information a
jacob-local-kevin[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-local-kevin[bot] commented 1 month ago

Update

I've completed my initial work on this issue and have created a pull request: JACoB PR for Issue Add skip build flag functionality.

The changes currently result in an error, so I'll be making some additional changes before it is ready to merge.

jacob-local-kevin[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-local-kevin[bot] commented 1 month ago

Unfortunately, I ran into trouble working on this.

Here is some error information:

Command failed: git log -n 1 --format="%H" -- /src/server/code/checkAndCommit.ts
fatal: Invalid path '/src': No such file or directory
jacob-local-kevin[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-local-kevin[bot] commented 1 month ago

Update

I've completed my initial work on this issue and have created a pull request: JACoB PR for Issue Add skip build flag functionality.

The changes currently result in an error, so I'll be making some additional changes before it is ready to merge.