Skip to content

Commit 7161d73

Browse files
Merge pull request #4 from bishalprasad321/develop
Model design releasing to main
2 parents ae718a3 + a051f55 commit 7161d73

30 files changed

Lines changed: 4387 additions & 879 deletions

.github/workflows/action-test.yml

Lines changed: 64 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Test Action - Multi-Model Consensus Review Integration
22

33
on:
44
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
59
branches:
610
- main
711
- develop
@@ -11,6 +15,16 @@ on:
1115
description: "Enable debug mode"
1216
required: false
1317
default: "true"
18+
model_preset:
19+
description: "Model configuration preset"
20+
required: false
21+
type: choice
22+
options:
23+
- default
24+
- high-capability
25+
- cost-optimized
26+
- quality-optimized
27+
default: "default"
1428

1529
# Limit concurrent runs
1630
concurrency:
@@ -50,7 +64,7 @@ jobs:
5064
- name: Generate PR Description with prpilot-summary
5165
id: generate_desc
5266
if: steps.check_secrets.outputs.has_key == 'true'
53-
uses: bishalprasad321/prpilot-summary@main
67+
uses: bishalprasad321/prpilot-summary@v1
5468
with:
5569
github_token: ${{ secrets.GITHUB_TOKEN }}
5670
llm_api_key: ${{ secrets.GEMINI_API_KEY }}
@@ -103,6 +117,33 @@ jobs:
103117
- name: Checkout code
104118
uses: actions/checkout@v4
105119

120+
- name: Determine model configuration
121+
id: model_config
122+
run: |
123+
PRESET="${{ inputs.model_preset || 'default' }}"
124+
case $PRESET in
125+
high-capability)
126+
echo "reviewer_models=gemini-2.5-pro,gemini-2.5-flash,gemini-2.5-flash-lite" >> $GITHUB_OUTPUT
127+
echo "judge_model=gemini-2.5-pro" >> $GITHUB_OUTPUT
128+
echo "preset_name=High Capability (Best Quality)" >> $GITHUB_OUTPUT
129+
;;
130+
cost-optimized)
131+
echo "reviewer_models=gemini-2.5-flash,gemini-2.5-flash-lite,gemini-2.5-flash-lite" >> $GITHUB_OUTPUT
132+
echo "judge_model=gemini-2.5-flash" >> $GITHUB_OUTPUT
133+
echo "preset_name=Cost Optimized (Lower Cost)" >> $GITHUB_OUTPUT
134+
;;
135+
quality-optimized)
136+
echo "reviewer_models=gemini-2.5-pro,gemini-2.5-flash,gemini-2.5-flash-lite" >> $GITHUB_OUTPUT
137+
echo "judge_model=gemini-2.5-pro" >> $GITHUB_OUTPUT
138+
echo "preset_name=Quality Optimized (Best Findings)" >> $GITHUB_OUTPUT
139+
;;
140+
*)
141+
echo "reviewer_models=gemini-2.5-flash,gemini-2.5-flash-lite,gemini-2.5-pro" >> $GITHUB_OUTPUT
142+
echo "judge_model=gemini-2.5-pro" >> $GITHUB_OUTPUT
143+
echo "preset_name=Default (Balanced)" >> $GITHUB_OUTPUT
144+
;;
145+
esac
146+
106147
- name: Check if GEMINI_API_KEY exists
107148
id: check_secrets
108149
run: |
@@ -119,8 +160,8 @@ jobs:
119160
with:
120161
github_token: ${{ secrets.GITHUB_TOKEN }}
121162
gemini_api_key: ${{ secrets.GEMINI_API_KEY }}
122-
reviewer_models: "gemini-2.0-flash,gemini-1.5-flash,gemini-1.5-pro"
123-
judge_model: "gemini-2.0-flash-thinking"
163+
reviewer_models: ${{ steps.model_config.outputs.reviewer_models }}
164+
judge_model: ${{ steps.model_config.outputs.judge_model }}
124165
max_consensus_rounds: "3"
125166
inline_comments_enabled: "true"
126167
max_diff_lines: "5000"
@@ -134,22 +175,32 @@ jobs:
134175
echo "=========================================="
135176
echo "Step 2: Multi-Model Consensus Review"
136177
echo "=========================================="
178+
echo "Model Configuration: ${{ steps.model_config.outputs.preset_name }}"
179+
echo "Reviewer Models: ${{ steps.model_config.outputs.reviewer_models }}"
180+
echo "Judge Model: ${{ steps.model_config.outputs.judge_model }}"
181+
echo ""
137182
echo "Status: ${{ job.status }}"
138183
echo "Outcome: ${{ steps.consensus_review.outcome }}"
139184
echo ""
140185
echo "Review Results:"
141-
echo " Decision: ${{ steps.consensus_review.outputs.review_decision }}"
142-
echo " Consensus Round: ${{ steps.consensus_review.outputs.consensus_round }}"
143-
echo " Review ID: ${{ steps.consensus_review.outputs.review_id }}"
186+
echo " Decision: ${{ steps.consensus_review.outputs.review_decision || 'N/A' }}"
187+
echo " Consensus Round: ${{ steps.consensus_review.outputs.consensus_round || 'N/A' }}"
188+
echo " Review ID: ${{ steps.consensus_review.outputs.review_id || 'N/A' }}"
144189
echo ""
145-
if [ "${{ steps.consensus_review.outcome }}" == "success" ]; then
190+
if [[ "${{ steps.consensus_review.outcome }}" == "success" ]]; then
146191
echo "✅ Consensus review completed successfully"
147192
echo "Decision: ${{ steps.consensus_review.outputs.review_decision }}"
148-
echo "Reasoning: ${{ steps.consensus_review.outputs.consensus_reasoning }}"
193+
echo ""
194+
echo "📋 Review Details:"
195+
echo " - Consensus was reached in ${{ steps.consensus_review.outputs.consensus_round }} round(s)"
196+
echo " - Review has been posted to the pull request"
197+
echo " - Inline code comments with specific findings have been added"
149198
else
150199
echo "⚠️ Consensus review encountered an error"
151200
echo "This may be expected if:"
152201
echo " - Secrets are not configured (GEMINI_API_KEY missing)"
202+
echo " - Selected models are not valid Gemini v1beta model codes"
203+
echo " - API quota exceeded (check API key billing settings)"
153204
echo " - Reviewer/judge models not available"
154205
echo " - LLM API is temporarily unavailable"
155206
fi
@@ -194,6 +245,7 @@ jobs:
194245
: '⚠️ **One or more steps encountered issues** (check logs for details)\n';
195246
196247
reportBody += '\n---\n';
248+
reportBody += '*Models Used:* Review [MODELS_AND_OPTIMIZATION.md](../../MODELS_AND_OPTIMIZATION.md) for configuration details\n';
197249
reportBody += '*This report was generated by the PR Pilot Review Integration Tests*\n';
198250
199251
console.log(reportBody);
@@ -213,4 +265,7 @@ jobs:
213265
echo " Round: ${{ needs.consensus-review.outputs.consensus_round }}"
214266
echo " Review ID: ${{ needs.consensus-review.outputs.review_id }}"
215267
echo ""
216-
echo "=========================================="
268+
echo "💡 Tips:"
269+
echo " - Run with debug_enabled=true for verbose model output"
270+
echo " - Try different model presets for cost/quality trade-offs"
271+
echo " - See MODELS_AND_OPTIMIZATION.md for detailed configuration"

.github/workflows/ci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ jobs:
4848
- name: Check formatting
4949
run: npm run format:check
5050

51-
# TODO: Re-enable tests once we have stable test cases and CI environment
52-
# - name: Run unit tests
53-
# run: npm test -- --runInBand --coverage
54-
5551
- name: Build action bundle
5652
run: npm run build
5753

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Bishal Prasad
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)