diff --git a/.github/workflows/qodo_review.yml b/.github/workflows/qodo_review.yml index d458aac..4e9cc20 100644 --- a/.github/workflows/qodo_review.yml +++ b/.github/workflows/qodo_review.yml @@ -1,37 +1,26 @@ -name: Qodo PR Agent (Gemini) +name: PR Agent (Gemini) on: pull_request: - types: [opened, reopened, synchronize] - # Allows you to trigger commands like /review or /improve by commenting on the PR + types: [opened, reopened, ready_for_review] 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' }} - + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + contents: write steps: - - name: Qodo PR Agent - uses: Codium-ai/pr-agent@main + - name: PR Agent action step + uses: qodo-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 }} + GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} + config.model: "gemini/gemini-1.5-flash" + config.fallback_models: '["gemini/gemini-1.5-flash"]' + GOOGLE_AI_STUDIO.GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} + github_action_config.auto_review: "true" + github_action_config.auto_describe: "true" + github_action_config.auto_improve: "true"