JACoB PR for Issue Add Skip Build functionality #95
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes Performed:
Step 1: Add Skip Build Flag in checkAndCommit
Files:
/src/server/code/checkAndCommit.ts
Details:
Modify the checkAndCommit function to accept a skipBuild parameter. Add conditional logic to check this parameter before executing the build process. If skipBuild is true, log that the build is skipped and proceed without calling buildAndTest.
Exit Criteria
The checkAndCommit function should skip the build process when the skipBuild flag is set to true.
Step 2: Update runBuildCheck for Skip Build Flag
Files:
/src/server/build/node/check.ts
Details:
Update the runBuildCheck function to accept a skipBuild parameter. Add logic to bypass the build process if skipBuild is true. Ensure that the function returns a success result when skipping the build.
Exit Criteria
The runBuildCheck function should respect the skipBuild flag and bypass the build process when it's true.
Step 3: Parse Skip Build Flag from Issue Body
Files:
/src/server/github/issue.ts
Details:
Enhance the getIssue function to parse the issue body for the --skip-build flag. Extract this flag and include it in the returned issue data structure so it can be used in subsequent processes.
Exit Criteria
The getIssue function should correctly parse and return the skipBuild flag from the issue body.
Step 4: Handle Skip Build Flag in createIssue
Files:
/src/server/api/routers/github.ts
Details:
Update the createIssue procedure to handle the skipBuild flag. Ensure that the flag is extracted from the issue text and passed to the relevant functions that initiate the build process.
Exit Criteria
The createIssue procedure should correctly handle and pass the skipBuild flag from the issue text.
Step 5: Add BuildOptions Type Definition for Skip Build
Files:
/src/types.ts
Details:
Add a new type definition for BuildOptions in types.ts. Include a skipBuild boolean flag to be used across the codebase for skipping the build process.
Exit Criteria
The BuildOptions type should include a skipBuild flag that can be used throughout the codebase.
Step 6: Extract Skip Build Flag from GitHub Event
Files:
/src/server/messaging/queue.ts
Details:
Modify the onGitHubEvent function to extract the skipBuild flag from the GitHub event data. Ensure that this flag is passed along with other event data to be used in the build process.
Exit Criteria
The onGitHubEvent function should correctly extract and pass the skipBuild flag from the GitHub event data.