name: Qodo PR Agent (Gemini) on: pull_request: types: [opened, reopened, synchronize] # Allows you to trigger commands like /review or /improve by commenting on the PR issue_comment: types: [created] jobs: 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: Qodo PR Agent uses: Codium-ai/pr-agent@main env: # --- 1. Gitea Configuration --- CONFIG__GIT_PROVIDER: "gitea" # 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 }} # --- 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"]' # Provide your API key from Gitea Secrets GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}