Repository navigation
feat/add ci failure handling instructions #346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e3ccbee
feat: PR作成後のCI失敗対応ルールを追加
keito4 e504109
feat: PR作成時にCodexレビューを必須化
keito4 95677a7
fix: Codexレビュー指摘事項を修正
keito4 fb60327
refactor: Codex ReviewとCI CheckをSkillsに移行
keito4 e3ae4ac
fix: マージコンフリクトを解決
github-actions[bot] 2e8bce8
feat: PR作成・プラン作成時のCodexレビュー自動実行Hooksを追加
github-actions[bot] 39e9d2a
fix: Codex指摘事項を反映してhooksを改善
github-actions[bot] bfe551a
feat: AIレビューhooksをCodex+Gemini両対応に拡張
github-actions[bot] c055f51
fix: Geminiレビューでdiffを直接プロンプトに含める
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| --- | ||
| description: PR作成後にCIの結果を確認し、失敗している場合は修正する。PR作成完了後に自動的にこのスキルを適用してCIの状態を監視し、失敗時は修正を行うこと。 | ||
| --- | ||
|
|
||
| # CI Check Skill | ||
|
|
||
| PR作成後、CIの結果を確認し、失敗している場合は修正します。 | ||
|
|
||
| ## CI結果の確認 | ||
|
|
||
| ```bash | ||
| # PRのCI状態を確認 | ||
| gh pr checks | ||
|
|
||
| # 失敗したチェックの詳細を確認 | ||
| gh run list --limit 5 | ||
| gh run view <run-id> --log-failed | ||
| ``` | ||
|
|
||
| ## 失敗時の対応フロー | ||
|
|
||
| 1. **失敗原因の特定** | ||
| - CIログを確認して失敗原因を特定 | ||
| - 直接的な変更によるものか、間接的な影響かを判断 | ||
|
|
||
| 2. **修正の実施** | ||
| - そのブランチで修正可能な場合は即座に修正 | ||
| - 修正をコミットしてプッシュ | ||
| - CIが再実行されることを確認 | ||
|
|
||
| 3. **再確認** | ||
| - CIが緑になるまで監視 | ||
| - 必要に応じて追加修正を実施 | ||
|
|
||
| ## 対応パターン | ||
|
|
||
| | 失敗原因 | 対応 | | ||
| | ---------------------- | -------------------------------------------- | | ||
| | Lint/Format エラー | `npm run lint:fix` / `npm run format` で修正 | | ||
| | テスト失敗 | テストコードまたは実装を修正 | | ||
| | 型エラー | TypeScript の型定義を修正 | | ||
| | ベースブランチとの競合 | 最新のベースブランチをマージして解決 | | ||
| | 依存関係の問題 | package-lock.json を更新 | | ||
| | 環境・インフラ起因 | CI を再実行、解決しない場合は報告 | | ||
|
|
||
| ## 修正完了後の報告 | ||
|
|
||
| ``` | ||
| ## CI Status | ||
|
|
||
| - 状態: 緑(すべてのチェック通過) | ||
| - 修正内容: [修正した内容の概要] | ||
| - 修正コミット: [コミットハッシュ] | ||
| ``` | ||
|
|
||
| ## 原則 | ||
|
|
||
| - CIが緑になるまでPRを放置しない | ||
| - 修正可能な問題は自分のブランチで解決する | ||
| - 解決不能な場合は原因と状況を明記してレビュアーに報告 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| --- | ||
| description: PR作成後にOpenAI Codexによるコードレビューを実行する。Codex CLIがインストール済みの場合、PR作成完了後に自動的にこのスキルを適用してレビューを実行すること。 | ||
| --- | ||
|
|
||
| # Codex Review Skill | ||
|
|
||
| PR作成後、OpenAI Codexによるコードレビューを実行します。 | ||
|
|
||
| ## 前提条件 | ||
|
|
||
| - Codex CLIがインストール済み(`codex` コマンドが利用可能) | ||
| - PRが作成済み | ||
|
|
||
| ## レビュー実行 | ||
|
|
||
| 以下のコマンドでCodexレビューを実行: | ||
|
|
||
| ```bash | ||
| codex exec --sandbox read-only "You are acting as a reviewer for a proposed code change made by another engineer. Focus on issues that impact correctness, performance, security, maintainability, or developer experience. Flag only actionable issues introduced by the change. When you flag an issue, provide a short, direct explanation and cite the affected file and line range. Prioritize severe issues and avoid nit-level comments unless they block understanding of the diff. After listing findings, produce an overall correctness verdict ('patch is correct' or 'patch is incorrect') with a concise justification and a confidence score between 0 and 1. Review the current branch against origin/main. Use git merge-base to find the merge base, then review the diff from that merge base to HEAD." | ||
| ``` | ||
|
|
||
| ## レビュー結果の対応 | ||
|
|
||
| 1. **verdict が "patch is correct"** の場合 | ||
| - そのまま完了 | ||
|
|
||
| 2. **verdict が "patch is incorrect"** の場合 | ||
| - 指摘された問題を確認 | ||
| - 修正が必要な場合は修正してコミット・プッシュ | ||
| - 再度Codexレビューを実行 | ||
|
|
||
| 3. **重大な問題が指摘された場合** | ||
| - セキュリティ問題: 必ず修正 | ||
| - パフォーマンス問題: 影響度を評価して対応 | ||
| - 保守性の問題: 可能な範囲で対応 | ||
|
|
||
| ## レビュー結果の報告 | ||
|
|
||
| レビュー完了後、以下の形式で報告する: | ||
|
|
||
| ``` | ||
| ## Codex Review | ||
|
|
||
| - Verdict: [patch is correct / patch is incorrect] | ||
| - Confidence: [0〜1のスコア] | ||
| - 指摘事項: [件数]件(対応済み) | ||
| ``` | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Refactor embedded prompt for maintainability.
The 500+ character prompt is embedded directly in the bash command, making it difficult to maintain, version, and modify. Prompt changes require careful attention to bash escaping and quoting.
♻️ Proposed refactor using heredoc
🤖 Prompt for AI Agents