Open jacob-local-kevin[bot] opened 3 months ago
Hello human! đŸ‘‹
This PR was created by JACoB to address the issue Add Skip Build functionality
Please review the PR carefully. Auto-generated code can and will contain subtle bugs and mistakes.
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.
Once the code looks good, approve the PR and merge the code.
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 thegetIssue
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 thecheckAndCommit
function to accept a new parameterskipBuild
. Before callingbuildAndTest
, add a conditional check for thisskipBuild
flag. Iftrue
, skip the call tobuildAndTest
and proceed with the rest of the function's logic.Exit Criteria
The
checkAndCommit
function conditionally skips the build process based on theskipBuild
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 thecheckAndCommit
function. Ensure that the flag is correctly passed through all function calls leading tocheckAndCommit
.Exit Criteria
The
editFiles
function correctly passes the--skip-build
flag to thecheckAndCommit
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 aseditFiles
andcheckAndCommit
. 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 interfaceBuildOptions
that includes askipBuild
boolean property. Extend the existing parameter interfaces for functions likecheckAndCommit
to include this newBuildOptions
interface, allowing them to accept theskipBuild
flag.Exit Criteria
A
BuildOptions
interface is defined, and relevant function parameter interfaces are extended to include theskipBuild
flag.