Skip to content

chore: let Qodo auto-approve PRs after self-review#2463

Merged
naorpeled merged 1 commit into
mainfrom
chore/enable-qodo-pr-auto-approval
Jun 21, 2026
Merged

chore: let Qodo auto-approve PRs after self-review#2463
naorpeled merged 1 commit into
mainfrom
chore/enable-qodo-pr-auto-approval

Conversation

@naorpeled

Copy link
Copy Markdown
Member

What

Enable Qodo's review agent to approve a PR once the author completes the self-review checkbox, mirroring the setup used in the typeorm/typeorm repository.

Changes to .pr_agent.toml:

  • [review_agent] demand_self_review = true — adds a self-review checkbox the author must tick
  • [review_agent] approve_pr_on_self_review = true — Qodo submits an approval once that box is checked

Note on this file

Added a header comment clarifying that .pr_agent.toml in this repo is consumed by Qodo's hosted "free for open source" agent (the qodo-free-for-open-source-projects bot) — a separate, closed-source service. It is not read by the open-source pr-agent in this repository; keys like the [review_agent] section only exist in that hosted agent.

Enable Qodo's review agent to approve a PR once the author completes the
self-review checkbox, mirroring the setup used in the typeorm/typeorm repo:

- demand_self_review = true
- approve_pr_on_self_review = true

Also document that .pr_agent.toml here is consumed by Qodo's hosted
'free for open source' agent (closed source), not by the open-source
pr-agent in this repository.
@github-actions github-actions Bot added the chore label Jun 21, 2026
@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Enable Qodo auto-approval after author self-review
⚙️ Configuration changes 📝 Documentation 🕐 Less than 5 minutes

Grey Divider

Description

• Require authors to complete a self-review checkbox before approval.
• Configure Qodo to auto-approve PRs after self-review is confirmed.
• Document that this config is for Qodo’s hosted bot, not the OSS pr-agent.
Diagram

graph TD
  A["Author"] --> B["Self-review checkbox"] --> C["Qodo hosted agent"] --> D["GitHub PR"]
  C --> E["Approval review"]
  subgraph Legend
    direction LR
    _u[User] ~~~ _cfg[Config] ~~~ _svc[Service] ~~~ _api[GitHub PR]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. GitHub Actions auto-approve after checklist gate
  • ➕ Fully transparent, versioned automation in-repo
  • ➕ No dependency on a hosted/closed-source agent behavior
  • ➖ Requires workflow authoring/maintenance and appropriate permissions
  • ➖ Can be harder to integrate cleanly with review policies and branch protections
2. Enforce self-review via PR template + branch protections (no auto-approval)
  • ➕ Simpler governance model; avoids automated approvals
  • ➕ Keeps human review signals more meaningful
  • ➖ Relies on manual enforcement; doesn’t reduce reviewer workload
  • ➖ No guarantee the checklist is respected without additional automation

Recommendation: The PR’s approach is reasonable if the goal is to reduce reviewer overhead while still forcing an explicit author self-check. The added header comment is important given the hosted-agent vs OSS pr-agent distinction. Consider the GitHub Actions alternative only if you want auditable, provider-native automation without relying on Qodo’s hosted implementation details.

Files changed (1) +7 / -0

Other (1) +7 / -0
.pr_agent.tomlAdd self-review gate and auto-approval for Qodo review agent +7/-0

Add self-review gate and auto-approval for Qodo review agent

• Adds documentation clarifying this config is consumed by Qodo’s hosted bot, not the OSS pr-agent. Enables a required self-review checkbox and configures Qodo to auto-approve once the author completes it.

.pr_agent.toml

@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Misleading config header 🐞 Bug ⚙ Maintainability
Description
The new header comment says .pr_agent.toml is "NOT read" by the open-source PR-Agent in this
repository, but PR-Agent explicitly fetches and applies repo-local .pr_agent.toml by default. This
can mislead contributors into thinking changes here won’t affect PR-Agent behavior when
running/using the open-source agent on this repo.
Code

.pr_agent.toml[R1-4]

+# NOTE: This file is consumed by Qodo's "free for open source" agent
+# (the `qodo-free-for-open-source-projects` bot) — a separate, hosted, closed-source
+# service. It is NOT read by the open-source pr-agent in this repository; some keys
+# below (e.g. the [review_agent] section) only exist in that hosted agent.
Evidence
The docs explicitly describe .pr_agent.toml as the repo-local config file PR-Agent reads from the
default branch. The GitHub provider fetches .pr_agent.toml, and apply_repo_settings() applies it
when config.use_repo_settings_file is enabled (default true).

docs/docs/usage-guide/configuration_options.md[41-58]
pr_agent/git_providers/github_provider.py[737-745]
pr_agent/git_providers/utils.py[256-319]
pr_agent/settings/configuration.toml[22-24]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The header comment claims `.pr_agent.toml` is not read by the open-source PR-Agent in this repository, which contradicts both this repo’s documentation and the PR-Agent codepath that fetches and applies `.pr_agent.toml`.

## Issue Context
It may be true that *your deployed bot* for this repo is Qodo’s hosted service, but the comment as written suggests the open-source PR-Agent codebase does not consume `.pr_agent.toml` here, which is incorrect and may confuse contributors running PR-Agent locally or using PR-Agent against this repo.

## Fix Focus Areas
- .pr_agent.toml[1-4]

## Suggested change
Rewrite the header to distinguish between:
- what service reviews PRs in *this repo’s GitHub setup* (hosted Qodo bot), and
- the fact that the open-source PR-Agent software still reads `.pr_agent.toml` as the repo-local configuration file (even if some keys/sections are ignored by OSS).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@naorpeled naorpeled merged commit 4b00f3d into main Jun 21, 2026
6 checks passed
@naorpeled naorpeled deleted the chore/enable-qodo-pr-auto-approval branch June 21, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant