<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pankaj Kumar</title>
    <description>The latest articles on DEV Community by Pankaj Kumar (@pankaj_kumar_6c2cb4ab0f96).</description>
    <link>https://dev.to/pankaj_kumar_6c2cb4ab0f96</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3838476%2Fbb103792-1f0f-493c-88a7-1a9afb815985.png</url>
      <title>DEV Community: Pankaj Kumar</title>
      <link>https://dev.to/pankaj_kumar_6c2cb4ab0f96</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pankaj_kumar_6c2cb4ab0f96"/>
    <language>en</language>
    <item>
      <title>I built an AI code review bot because I was mass-approving PRs at work.</title>
      <dc:creator>Pankaj Kumar</dc:creator>
      <pubDate>Thu, 28 May 2026 08:30:40 +0000</pubDate>
      <link>https://dev.to/pankaj_kumar_6c2cb4ab0f96/i-built-an-ai-code-review-bot-because-i-was-mass-approving-prs-at-work-3234</link>
      <guid>https://dev.to/pankaj_kumar_6c2cb4ab0f96/i-built-an-ai-code-review-bot-because-i-was-mass-approving-prs-at-work-3234</guid>
      <description>&lt;p&gt;I'll be honest — I was &lt;em&gt;that&lt;/em&gt; reviewer. The one who opens a PR, skims the diff, leaves a "looks good 👍", and hits approve. Forty files? LGTM. Friday afternoon? Definitely LGTM.&lt;/p&gt;

&lt;p&gt;It worked right up until it didn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bug that convinced me to build this
&lt;/h2&gt;

&lt;p&gt;A teammate's PR shipped a hardcoded database password in a config file. It sailed through &lt;em&gt;my&lt;/em&gt; review and two others. We caught it days later — after it was already in our git history, which meant rotating the credential and rewriting history. A ten-second mistake turned into an afternoon-long incident.&lt;/p&gt;

&lt;p&gt;That's when it clicked: humans are &lt;em&gt;bad&lt;/em&gt; at the boring, mechanical parts of review — secrets, injection patterns, null checks, the off-by-one in the diff hunk you scrolled past. We're great at architecture and intent. We're terrible at vigilance at 5pm.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;MicroReview&lt;/strong&gt; — a bot that does the mechanical review on every PR so humans can focus on the parts that actually need a brain.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it actually does
&lt;/h2&gt;

&lt;p&gt;On every pull request it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scores the PR 0–100 for risk&lt;/strong&gt; — you set thresholds to auto-approve low-risk PRs and block high-risk ones&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Detects hardcoded secrets&lt;/strong&gt; across 13 patterns (AWS keys, DB URLs, tokens, private keys…)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flags real bugs with AI&lt;/strong&gt; — not style nits; logic errors, null risks, injection, unhandled rejections&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Posts inline comments&lt;/strong&gt; on the exact line, plus a plain-English PR walkthrough&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blocks the merge&lt;/strong&gt; via the GitHub Checks API when something critical slips through&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It works on &lt;strong&gt;GitHub and GitLab&lt;/strong&gt;, and setup is one click — no YAML required.&lt;/p&gt;

&lt;p&gt;![MicroReview flagging a hardcoded password]&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuqqh0511cj1f7k4ieola.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuqqh0511cj1f7k4ieola.png" alt=" " width="799" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;![Inline AI bug detection with a suggested fix]&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7qu5kpnqy5exv2rndx7c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7qu5kpnqy5exv2rndx7c.png" alt=" " width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it's different from CodeRabbit
&lt;/h2&gt;

&lt;p&gt;Two things I cared about:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Per-repo pricing, not per-seat.&lt;/strong&gt; Most tools charge per developer — so the more your team grows, the more you pay for the &lt;em&gt;same repos&lt;/em&gt;. MicroReview is &lt;strong&gt;$19/repo/month&lt;/strong&gt;, flat, for your whole team. 10 devs on 3 repos: ~$57/mo here vs $720/mo per-seat. (And it's free for 2 repos, forever — not a 14-day trial.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. A risk score, not just comments.&lt;/strong&gt; Comments get ignored. A 0–100 number that can &lt;em&gt;block the merge button&lt;/em&gt; doesn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned building it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI is non-deterministic, and that's a UX problem.&lt;/strong&gt; Two runs on the same diff find different bugs. I had to build dedup + "resolved" tracking so it doesn't spam or cry wolf.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost control matters from day one.&lt;/strong&gt; Batching diffs into fewer model calls + caching unchanged files cut the AI bill dramatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The hard part isn't the AI — it's the plumbing.&lt;/strong&gt; Webhooks, idempotency, two platform APIs behind one interface, encrypting tokens at rest. The model is maybe 20% of the work.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;If you want it to review your next PR: &lt;strong&gt;&lt;a href="https://microreview.dev" rel="noopener noreferrer"&gt;microreview.dev&lt;/a&gt;&lt;/strong&gt; — free for your first 2 repos, no credit card.&lt;/p&gt;




&lt;p&gt;Be honest with me: how many PRs have you "LGTM'd" without really reading? And how does your team fight review fatigue? 👇&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>ai</category>
      <category>devtool</category>
    </item>
    <item>
      <title>I was spending 2 hours a day reviewing PRs. Then I found this tool.</title>
      <dc:creator>Pankaj Kumar</dc:creator>
      <pubDate>Sun, 22 Mar 2026 14:35:53 +0000</pubDate>
      <link>https://dev.to/pankaj_kumar_6c2cb4ab0f96/i-was-spending-2-hours-a-day-reviewing-prs-then-i-found-this-tool-2moj</link>
      <guid>https://dev.to/pankaj_kumar_6c2cb4ab0f96/i-was-spending-2-hours-a-day-reviewing-prs-then-i-found-this-tool-2moj</guid>
      <description>&lt;p&gt;Let me be honest.&lt;/p&gt;

&lt;p&gt;I used to spend a significant chunk of my day reviewing pull requests.&lt;/p&gt;

&lt;p&gt;Not the interesting parts — not the architecture decisions or the tricky business&lt;br&gt;
logic. The &lt;em&gt;repetitive&lt;/em&gt; parts. The same comments, over and over, on every PR:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"You forgot &lt;code&gt;@Valid&lt;/code&gt; on this &lt;code&gt;@RequestBody&lt;/code&gt;"&lt;/p&gt;

&lt;p&gt;"Don't inject the repository directly into the controller, use a service"&lt;/p&gt;

&lt;p&gt;"This &lt;code&gt;catch (Exception e)&lt;/code&gt; has no logging — how are we supposed to debug&lt;br&gt;
this in production?"&lt;/p&gt;

&lt;p&gt;"This service method writes to the database but has no &lt;code&gt;@Transactional&lt;/code&gt;"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Every. Single. PR.&lt;/p&gt;

&lt;p&gt;I knew these rules by heart. My team knew these rules by heart. And yet, every&lt;br&gt;
week, the same issues kept slipping in. Because humans get tired. Humans miss&lt;br&gt;
things. And nobody wants to be &lt;em&gt;that&lt;/em&gt; reviewer who leaves 15 comments on a&lt;br&gt;
junior developer's first PR.&lt;/p&gt;




&lt;h2&gt;
  
  
  I started looking for a solution
&lt;/h2&gt;

&lt;p&gt;I tried a few generic linting tools. They caught style issues and basic syntax&lt;br&gt;
problems, but nothing Spring Boot specific. Nothing that understood the patterns&lt;br&gt;
we actually cared about as a microservices team.&lt;/p&gt;

&lt;p&gt;I wanted something that would:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand Java Spring Boot patterns specifically&lt;/li&gt;
&lt;li&gt;Review only what changed in the PR, not the entire codebase&lt;/li&gt;
&lt;li&gt;Not just flag issues, but &lt;strong&gt;explain why they matter&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Do it automatically on every PR, without me having to think about it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I couldn't find exactly what I was looking for. So I built it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Introducing MicroReview
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;MicroReview&lt;/strong&gt; is a GitHub App that automatically reviews every pull request&lt;br&gt;
on your Java Spring Boot microservice repos.&lt;/p&gt;

&lt;p&gt;Install it once. Open a PR. Get a review instantly.&lt;/p&gt;

&lt;p&gt;No configuration required. No CI pipeline changes. No new tools to learn.&lt;/p&gt;




&lt;h2&gt;
  
  
  What it actually catches
&lt;/h2&gt;

&lt;p&gt;After installing MicroReview, here is what started showing up automatically&lt;br&gt;
on my team's PRs — the exact issues I used to catch manually:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What it catches&lt;/th&gt;
&lt;th&gt;Severity&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;@RequestBody&lt;/code&gt; missing &lt;code&gt;@Valid&lt;/code&gt; — invalid data reaches your service unchecked&lt;/td&gt;
&lt;td&gt;🔴 Critical&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Controller directly using &lt;code&gt;@Repository&lt;/code&gt; — skipping the service layer entirely&lt;/td&gt;
&lt;td&gt;🔴 Critical&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;@ExceptionHandler&lt;/code&gt; missing &lt;code&gt;@ResponseStatus&lt;/code&gt; — returning 200 OK on errors&lt;/td&gt;
&lt;td&gt;🔴 Critical&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Feign client missing fallback/circuit breaker — no resilience on downstream calls&lt;/td&gt;
&lt;td&gt;🟡 Warning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hardcoded HTTP/HTTPS URLs — should be config-driven&lt;/td&gt;
&lt;td&gt;🟡 Warning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bare &lt;code&gt;catch(Exception)&lt;/code&gt; with &lt;code&gt;printStackTrace&lt;/code&gt; — swallowing errors silently&lt;/td&gt;
&lt;td&gt;🟡 Warning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DTO missing field-level validation — &lt;code&gt;@NotNull&lt;/code&gt;, &lt;code&gt;@NotBlank&lt;/code&gt; etc.&lt;/td&gt;
&lt;td&gt;🟡 Warning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Service write method missing &lt;code&gt;@Transactional&lt;/code&gt; — risk of partial updates&lt;/td&gt;
&lt;td&gt;🟡 Warning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No logger declared in the class — can't log anything properly&lt;/td&gt;
&lt;td&gt;🟡 Warning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;ResponseEntity.ok()&lt;/code&gt; wrapping a service call with no null check&lt;/td&gt;
&lt;td&gt;🟡 Warning&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Critical issues &lt;strong&gt;block PR approval&lt;/strong&gt;. Warning issues are posted as advisory&lt;br&gt;
comments — visible but not blocking.&lt;/p&gt;




&lt;h2&gt;
  
  
  But here is the part I really love
&lt;/h2&gt;

&lt;p&gt;Most linting tools just say &lt;em&gt;what&lt;/em&gt; is wrong. MicroReview tells you &lt;em&gt;why&lt;/em&gt; it&lt;br&gt;
matters.&lt;/p&gt;

&lt;p&gt;Every inline comment is AI-enriched and looks like this:&lt;/p&gt;

&lt;p&gt;🔴 CRITICAL&lt;/p&gt;

&lt;p&gt;Problem (CRITICAL): Request body parameter is annotated with @RequestBody&lt;br&gt;
but not &lt;a class="mentioned-user" href="https://dev.to/valid"&gt;@valid&lt;/a&gt;. Bean Validation will not run on this input.&lt;/p&gt;

&lt;p&gt;Why it matters (AI):&lt;br&gt;
Without &lt;a class="mentioned-user" href="https://dev.to/valid"&gt;@valid&lt;/a&gt;, Spring skips all Bean Validation constraints on the DTO,&lt;br&gt;
allowing malformed or malicious data to reach your service layer unchecked.&lt;br&gt;
This increases the risk of runtime errors and inconsistent data being persisted.&lt;/p&gt;

&lt;p&gt;Suggested fix (AI):&lt;br&gt;
Add &lt;a class="mentioned-user" href="https://dev.to/valid"&gt;@valid&lt;/a&gt; alongside @RequestBody on the method parameter and ensure the DTO&lt;br&gt;
fields have constraint annotations such as @NotNull or &lt;a class="mentioned-user" href="https://dev.to/notblank"&gt;@notblank&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And if the AI is confident enough, it adds a one-click &lt;strong&gt;Apply suggestion&lt;/strong&gt;&lt;br&gt;
button right in the GitHub review UI — so the developer can fix it with a&lt;br&gt;
single click.&lt;/p&gt;




&lt;h2&gt;
  
  
  The PR summary
&lt;/h2&gt;

&lt;p&gt;At the end of every review, MicroReview posts a summary comment showing&lt;br&gt;
the full picture at a glance:&lt;/p&gt;

&lt;p&gt;🔍 MicroReview Summary — PR #14&lt;br&gt;
Rule    New Existing    Severity    Status&lt;br&gt;
Rule    New Existing    Severity    Status&lt;br&gt;
REQUEST_BODY_MISSING_VALID  1   0   🔴 critical   🆕 New&lt;br&gt;
CONTROLLER_REPOSITORY_COUPLING  1   0   🔴 critical   🆕 New&lt;br&gt;
EXCEPTION_LOGGING_BEST_PRACTICES    1   0   🟡 warning    🆕 New&lt;br&gt;
SERVICE_WRITE_MISSING_TRANSACTIONAL 1   0   🟡 warning    🆕 New&lt;br&gt;
MISSING_LOGGER_DECLARATION  0   0   🟡 warning    ✅ OK&lt;br&gt;
Total new issues: 4 | 🤖 AI enrichment applied to 4 finding(s).&lt;/p&gt;

&lt;p&gt;🤖 AI Review Notes (advisory)&lt;br&gt;
Request body validation is missing on at least one endpoint, allowing&lt;br&gt;
invalid data to reach the service layer unchecked.&lt;/p&gt;

&lt;p&gt;Service write methods have no transactional boundary, risking partial&lt;br&gt;
updates if an error occurs mid-operation.&lt;/p&gt;

&lt;p&gt;A bare catch block is swallowing exceptions silently — add proper&lt;br&gt;
logging before this goes to production.&lt;/p&gt;




&lt;h2&gt;
  
  
  What changed for me
&lt;/h2&gt;

&lt;p&gt;Before MicroReview, I was the one catching these issues. Every time.&lt;/p&gt;

&lt;p&gt;After MicroReview, these issues get caught automatically — with an explanation&lt;br&gt;
that teaches the developer &lt;em&gt;why&lt;/em&gt; it matters, not just &lt;em&gt;what&lt;/em&gt; to fix.&lt;/p&gt;

&lt;p&gt;My code reviews became shorter. My feedback became more focused on what&lt;br&gt;
actually needs a human eye — architecture, business logic, edge cases.&lt;/p&gt;

&lt;p&gt;And my team started writing better code, because the bot was teaching them&lt;br&gt;
the right patterns on every PR, consistently, without judgment.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try it yourself
&lt;/h2&gt;

&lt;p&gt;MicroReview is a GitHub App. Installation takes about 30 seconds:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click install&lt;/li&gt;
&lt;li&gt;Select your repo&lt;/li&gt;
&lt;li&gt;Open a PR&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔗 &lt;strong&gt;Install MicroReview&lt;/strong&gt;: &lt;a href="https://github.com/apps/microservices-code-review-dev" rel="noopener noreferrer"&gt;https://github.com/apps/microservices-code-review-dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🌐 &lt;strong&gt;Learn more&lt;/strong&gt;: &lt;a href="https://microreview.dev/#" rel="noopener noreferrer"&gt;https://microreview.dev/#&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's free during beta. No credit card. No signup form.&lt;/p&gt;




&lt;p&gt;If you try it and have feedback, drop a comment below. I read every one.&lt;/p&gt;

&lt;p&gt;And if you have been spending your afternoons leaving the same review comments&lt;br&gt;
over and over — I hope this saves you some time.&lt;/p&gt;

</description>
      <category>java</category>
      <category>springboot</category>
      <category>ai</category>
      <category>github</category>
    </item>
  </channel>
</rss>
