kleneway / jacob

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

JACoB PR for Issue Add Skip Build functionality #94

Open jacob-local-kevin[bot] opened 3 months ago

jacob-local-kevin[bot] commented 3 months ago

Changes Performed:

Step 1: Parse GitHub Issue for Skip Build Flag

Files:

/src/server/github/issue.ts

Details:

In src/server/github/issue.ts, modify the getIssue function to parse the issue body for the --skip-build flag. Extract this flag and include it in the issue data returned by the function. This will allow other parts of the application to check if the build process should be skipped based on the issue's content.

Exit Criteria

The getIssue function successfully parses the --skip-build flag from the issue body and includes it in the returned issue data.

Step 2: Update checkAndCommit to Skip Build Based on Flag

Files:

/src/server/code/checkAndCommit.ts

Details:

In src/server/code/checkAndCommit.ts, update the checkAndCommit function to accept a new parameter skipBuild. Before calling buildAndTest, add a conditional check for this skipBuild flag. If true, skip the call to buildAndTest and proceed with the rest of the function's logic.

Exit Criteria

The checkAndCommit function conditionally skips the build process based on the skipBuild flag.

Step 3: Pass Skip Build Flag in editFiles Function

Files:

/src/server/code/editFiles.ts

Details:

Modify src/server/code/editFiles.ts to extract the --skip-build flag from the issue data and pass it to the checkAndCommit function. Ensure that the flag is correctly passed through all function calls leading to checkAndCommit.

Exit Criteria

The editFiles function correctly passes the --skip-build flag to the checkAndCommit function.

Step 4: Handle Skip Build Flag in GitHub Router

Files:

/src/server/api/routers/github.ts

Details:

Update src/server/api/routers/github.ts to ensure that when GitHub issues are processed, the --skip-build flag is correctly identified and passed along to the relevant functions, such as editFiles and checkAndCommit. This might involve parsing the issue body within the router or ensuring that the flag is included in the data passed to these functions.

Exit Criteria

The GitHub router correctly handles the --skip-build flag, ensuring it is passed to functions that require it.

Step 5: Define BuildOptions Interface to Include Skip Build Flag

Files:

/src/types.ts

Details:

In src/types.ts, define a new interface BuildOptions that includes a skipBuild boolean property. Extend the existing parameter interfaces for functions like checkAndCommit to include this new BuildOptions interface, allowing them to accept the skipBuild flag.

Exit Criteria

A BuildOptions interface is defined, and relevant function parameter interfaces are extended to include the skipBuild flag.

jacob-local-kevin[bot] commented 3 months ago

Hello human! đŸ‘‹

This PR was created by JACoB to address the issue Add Skip Build functionality

Next Steps

  1. Please review the PR carefully. Auto-generated code can and will contain subtle bugs and mistakes.

  2. If you identify code that needs to be changed, please reject the PR with a specific reason. Be as detailed as possible in your comments. JACoB will take these comments, make changes to the code and push up changes. Please note that this process will take a few minutes.

  3. Once the code looks good, approve the PR and merge the code.