Refactor logic out of YAML/Bash and into a TypeScript package
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Description:
The action.yml currently contains significant amounts of complex logic embedded directly within bash run steps. This approach makes the action difficult to test, maintain, and debug. Refactoring this logic into a dedicated TypeScript package will improve code quality, enable proper unit testing, and enhance reusability.
Specific areas for refactoring:
- Input Validation Logic: The
Validate Inputsstep contains extensive conditional logic for validating authentication methods and input combinations. This should be moved into a TypeScript module. - Gemini CLI Installation Logic: The
Install Gemini CLIstep handles different installation methods based on thegemini_cli_version. This logic, including npm and git operations, should be encapsulated in a TypeScript function. - Gemini CLI Execution and Output Handling: The
Run Gemini CLIstep manages the execution of the Gemini CLI, captures its stdout/stderr, and handles error conditions. The output parsing and error reporting could be made more robust and testable in a TypeScript module. - Telemetry Upload Logic: The
Upload Telemetry to Google Cloudstep involves Docker commands, file manipulation, and a polling mechanism. This complex sequence should be refactored into a dedicated TypeScript module for better testability and maintainability.
Acceptance Criteria:
- All identified complex bash logic is replaced with calls to functions within a new TypeScript package.
- The
action.ymlremains focused on orchestrating steps rather than implementing detailed logic. - A clear project structure for the TypeScript package is established (e.g.,
src/,dist/,package.json).
- Ngôn ngữ chính
- TypeScript
- Star
- 2.1k
- Fork
- 288
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của google-github-actions/run-gemini-cli
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Security: fixed EOF heredoc delimiter in action.yml enables step output injectionCó thể đã có người làm @fg0x0 đã nhận 132 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
Pin transitive actions auth@v3 and upload-artifact@v6 to commit SHAsCó thể đã có người làm @zerone0x đã nhận 162 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Tất cả issue của google-github-actions/run-gemini-cli
Issue tương tự
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
components-web-app/docs#260 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
521xueweihan/HelloGitHub#4025 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
ctrf-io/playwright-ctrf-json-reporter#117 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
voidzero-dev/void#478 ·
Maintainer thường phản hồi trong vòng 1 ngày