Refactor logic out of YAML/Bash and into a TypeScript package
評価
この issue はまだ評価されていません。
説明
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).
- 主要言語
- TypeScript
- スター
- 2.1k
- フォーク
- 288
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
google-github-actions/run-gemini-cli のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
Security: fixed EOF heredoc delimiter in action.yml enables step output injection対応中かも @fg0x0 が 124 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
-
Pin transitive actions auth@v3 and upload-artifact@v6 to commit SHAs対応中かも @zerone0x が 154 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
google-github-actions/run-gemini-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
cockpit-project/cockpit-machines#2835 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cloudflare/kumo#866 ·
メンテナーはふだん 1 日以内に返信
-
area:connector bug
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
environment: OPENCODE_API_KEY is described as a Console service account key, but a Go subscription key works対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tester-army/e2e#1015 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信