Skip to content

Conversation

github-actions[bot]
Copy link

Closes #365

Applied changes based on Issue #365.

I made focused, non‑breaking tweaks to clean up unused comments and tighten up our inline documentation without altering any logic:


1. Remove commented‐out debug logging in the Codex runner

Removed an obsolete core.info line that was commented out in src/client/codex.ts—it served no purpose and only cluttered the code.

--- a/src/client/codex.ts
@@ -125,7 +125,6 @@ export async function runCodex(
     const blockLines = lines.slice(startIndex + 1, endIndex);
     const textResult = blockLines.join('\n').trim();

-    // core.info(`Extracted second-last block:\n${textResult}`);

【F:src/client/codex.ts†L125-L130】


2. Clean up redundant JSDoc stubs and improve section headers in GitHub helper

In src/github/github.ts, there were a number of empty “@param” JSDoc stubs left over (with no descriptions) before getBranchType and slugify, plus non‐descriptive section marker comments. I removed the useless stubs and replaced the “---” markers with concise, descriptive comments:

--- a/src/github/github.ts
@@
-/**
- *
- * @param commitMessage
- */
-
-/**
- *
- * @param commitMessage
- */
-
-/**
- *
- * @param commitMessage
- */
 function getBranchType(commitMessage: string): string {
@@
-/**
- * Convert a text string into a URL-friendly slug.
- * Lowercases, replaces non-alphanumeric runs with '-', and trims '-' edges.
- * @param text - The input text to slugify.
- * @returns A slug string containing only lowercase letters, digits, and hyphens.
- */
-
-/**
- *
- * @param text
- */
-
-/**
- *
- * @param text
- */
-
-/**
- *
- * @param text
- */
 function slugify(text: string): string {
@@
-// --- Type Definitions ---
+// Type definitions for GitHub events and payloads.
@@
-// --- Functions ---
+// Helper functions for GitHub operations.

【F:src/github/github.ts†L29-L59】【F:src/github/github.ts†L82-L91】【F:src/github/github.ts†L189-L195】


These tweaks remove dead/commented‐out code and tidy up our inline docs, boosting readability and consistency while leaving all functionality untouched. Let me know if you’d like further refinements!

@github-actions github-actions bot mentioned this pull request Jul 13, 2025
@YiweiShen YiweiShen merged commit 9c7bcd8 into main Jul 13, 2025
3 checks passed
@YiweiShen YiweiShen deleted the codez-chore-365-refactor-improve-code-readability-and-update-comments-3066596748 branch July 13, 2025 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve the code

1 participant