TL;DR
Hello everyone! Today, we can no longer imagine modern application development without artificial intelligence. Every day, thanks to GPT or Claude, we write thousands of lines of code.
And AI agents can now do more than just write code. They can work on tasks, make changes in a repository and even open pull requests. It feels a bit like a software factory: you give an agent a task, and it comes back with a PR.
But there is still one step where a person usually has to get involved: someone needs to review and approve that PR. And when agents can create changes much faster, the approval process can become a bottleneck.
So what should you do? Can we automatically approve simple changes without letting every PR through? In this article, I want to test Qodo's approval workflows on a real repository. We'll look at both sides: a PR that can be automatically approved and a PR that should stay with a human reviewer.
Well then, let’s begin! 🏎️
🔎 The idea is simple
Yes, I may be stating the obvious, but using artificial intelligence to check code can help a reviewer spot things they might otherwise miss.
Yes, but you might object to this and say, why would AI need to check what AI has written? Well, an agent can make mistakes too, and the person who gave it the task still needs a way to check the result. Let me give you a simple example: an agent might use class instead of className in JSX.
<div class="myClass"></div>
Depending on your project's configuration, a linter may catch this. But not every issue is as simple as a typo, and a reviewer still has to look at the change and decide what to do with it.
Now let's think about this problem on a larger scale. Whether you work at a company or maintain an open-source project, you may have many PRs coming in from both people and agents. Some are small and routine, while others need a closer look from a person.
So, in the next chapter, I would like to test a way to handle both!
🔗 Integrating AI into the PR review process for a project
Today, it’s as simple as it gets, especially considering how much the industry has evolved recently. There are many companies that provide AI code review services.
In my recent article, I already looked at the popular services available for this purpose and explained why I chose Qodo.
In it, I examined all aspects in detail and compared the services based on what I consider to be the main selection criteria in this field. You can also take a look at it.
In short, Qodo goes beyond ordinary AI code review: it's a Code Governance platform that combines review, standards, cross-repo analysis and agentic workflows in one product.
Once you've set it up for your repository, Qodo can review your PRs. But what happens after that review? Let's find out!
💻 Configuring Policy-Driven Approval on a real repository
Installing Qodo is extremely simple and won’t take much time. Just go to this page and connect the app to your repository.
After that, all that remains is to register on the website. The registration process there is as simple as can be.
After that, you can choose a plan or opt for a trial. I won’t be covering that process in this article; let’s move on to the features.
I set it up on my repository:
✅ Policy-Driven Approval feature
If you’ve worked with tools like these, you know that they simply generate a report on what’s in the code and what could be improved. This is helpful for a reviewer, but a significant gap remains: someone still has to approve the pull request so that a maintainer can merge it. And that’s where things get really interesting.
If you have ever worked on a project or are currently working on one, you’ve probably noticed that the Approve process often repeats itself. As a reviewer, you follow the same verification script, whether you think about it or not.
So, the main idea is that you can define rules for when a PR can be automatically approved. For example, a small change might be a good candidate, while a change in a sensitive part of the project might still need a person to look at it.
It is important to note that an approval is not the same as an auto-merge. Whether a PR can be merged also depends on the repository's settings and other required checks.
🧪 Test 1: a PR that can be automatically approved
If you’ve done everything correctly, then by navigating to the Workflows tab, you’ll see a list of your workflows (what a surprise). Let’s add our first workflow here:
I’ll call it simply "My new workflow", but you can name it whatever you like. Next, I’ll add the conditions under which my pull request will be automatically approved. To do this, I’ll click the Add condition button and set up my own rules for GitHub.
Once configured, simply click the Create workflow button. Note that there is also an active toggle; if enabled, your workflow will immediately begin running for all subsequent pull requests.
Now that our workflow has been created, we can activate it and check whether Qodo is able to approve it.
I will create a simple pull request as a test, adding social media links to the website.
After that, Qodo, which we added earlier, will start working for me, and if everything is fine with the code, it will let me know that it’s ready for merging.
And hurray, our code was approved! But that doesn't mean the PR has been merged or that other repository checks can be ignored.
🗝️ Test 2: keeping a PR with a human reviewer
Okay, but what if a PR shouldn't be automatically approved? This is just as important as the first test. We don't want to set up a workflow that treats every change in the same way.
For the second test, I'll configure a Guard for a case that should require a person to review the PR. Then I'll create another test PR that matches that case.
To begin, let’s create a Guard. To do this, click the Approval guards button:
Now, let’s configure Guard. There are only a few settings, so the whole process takes just about five minutes. You can select the scope for your repositories and, if you wish, specify certain users whose contributions should never be subject to Auto Approve by Qodo, even when the code is perfectly fine. This can be particularly useful when dealing with code generated by an AI bot.
If everything is done correctly, the following will appear:
Now, let’s try applying these changes to the pull request I created earlier. Qodo has approved it, but what happens if I add further changes in a subsequent commit using my own account?
I added the changes (just changed “twitter” to “x”); there’s no error in them. Since I'd added a Guard for my account after the first approval, the new commit triggered a re-check, and the PR now matched the Guard:
Qodo withdrew its approval, even though the code is fine, and that’s because I’ve now configured it so that it no longer happens from my account.
And in the future, my pull requests will no longer be auto-approved. This is a very useful feature, let's say, when configuring it for code generated by bots, or when a new employee joins the company.
And that’s not all! If someone commits an incorrect code, the approval will also be removed, for example.
🏭 Why this matters for a software factory
I was thinking about how this could work in a software factory, where AI agents work on tasks, write code and open pull requests. That's great, but someone still needs to approve those PRs. Approval workflows and Guards can help make that process more manageable:
- Handle routine PRs: Changes that meet your conditions can be approved automatically.
- Keep a person involved: Guards can exclude certain contributors from automatic approval, so their PRs need a human reviewer.
- Apply the same rules: You define the conditions once and use them across matching pull requests.
- Keep your merge checks: An approval doesn't replace the other checks and requirements configured for your repository.
So, instead of checking every PR in exactly the same way, you can decide which changes need your attention and which ones can follow the rules you've already set.
🖋️ Conclusion
In this article, we tried out Qodo's approval workflows on a real repository. For the first test, I created a simple PR that added social media links to the website, and Qodo approved it based on the workflow conditions.
But automatic approval isn't something I'd want to use for every PR. I sometimes use AI agents to help me write code, and even when the result looks good at first glance, I still want to check what the agent has actually changed. That's why I also configured an Approval Guard for contributions from a specific user.
Of course, the result depends on the rules you configure. An approval also doesn't mean that a PR has been merged or that other required checks have passed. So before relying on a workflow, it's worth testing both the cases you want to approve automatically and the ones you want to keep for a human reviewer.
For me, that's the most interesting part: you can automate some of the routine without giving up control over the changes that you want to review yourself.
🔗 Links:
- Qodo Site: https://qodo.ai
- Qodo Docs: https://docs.qodo.ai
- Code Review Academy: https://www.qodo.ai/academy
- Code review tools: https://www.qodo.ai/academy/ai-code-review-tools-comparison-and-benchmarks
Thanks for reading this article! ❤️
I'd love to hear your thoughts on this plugin in the comments!




















Top comments (1)
What do you think about the article?