From 47a867a5374b88159263791834a77dff32d8e581 Mon Sep 17 00:00:00 2001 From: Hayden Hargreaves Date: Fri, 3 Apr 2026 14:26:51 -0700 Subject: [PATCH] fix: gemini pro attempt --- .github/workflows/qodo_review.yml | 45 ++++++++++++++++--------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/.github/workflows/qodo_review.yml b/.github/workflows/qodo_review.yml index 69b14dd..d458aac 100644 --- a/.github/workflows/qodo_review.yml +++ b/.github/workflows/qodo_review.yml @@ -1,34 +1,37 @@ -name: Qodo AI PR Reviewer +name: Qodo PR Agent (Gemini) on: pull_request: - types: [opened, synchronize, reopened] + types: [opened, reopened, synchronize] + # Allows you to trigger commands like /review or /improve by commenting on the PR + issue_comment: + types: [created] jobs: - qodo_review: + pr_agent_job: + # Make sure this matches the label of your self-hosted Gitea act_runner runs-on: ubuntu-latest + name: Run PR Agent + # Prevent infinite loops if the bot comments on its own reviews + if: ${{ github.event.sender.type != 'Bot' }} + steps: - - name: Run Qodo Merge - uses: https://github.com/Codium-ai/pr-agent@main + - name: Qodo PR Agent + uses: Codium-ai/pr-agent@main env: - # --- 1. Git Provider Setup --- + # --- 1. Gitea Configuration --- CONFIG__GIT_PROVIDER: "gitea" - GITEA__URL: "https://git.gophernest.net" + + # Automatically pulls your self-hosted Gitea URL + GITEA__URL: ${{ github.server_url }} + + # Gitea Actions automatically provide this token for repository access GITEA__PERSONAL_ACCESS_TOKEN: ${{ secrets.GIT_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} - # --- 2. AI Provider Setup (Gemini 3) --- - CONFIG__MODEL_PROVIDER: "google" - GOOGLE_AI_STUDIO__GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} + # --- 2. Gemini Configuration --- + # Specify the Gemini model (e.g., gemini-1.5-pro or gemini-1.5-flash) CONFIG__MODEL: "gemini/gemini-1.5-pro" + CONFIG__FALLBACK_MODELS: '["gemini/gemini-1.5-flash"]' - # --- 3. THE FIX: Force the bot to stop skipping 'synchronize' --- - # This variable explicitly adds 'synchronize' to the allowed triggers - GITHUB_ACTION_CONFIG__PR_ACTIONS: '["opened", "reopened", "synchronize"]' - - # Tell it what to do when those events happen - GITEA__PR_OPENED_COMMANDS: '["/review", "/describe"]' - GITEA__PR_SYNCHRONIZED_COMMANDS: '["/review"]' - - # --- 4. Extra Context for your Go project --- - PR_REVIEWER__EXTRA_INSTRUCTIONS: "This is a Go-based vim-like text editor. Focus on concurrency safety and efficient TUI rendering logic." + # Provide your API key from Gitea Secrets + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}