Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
January 11, 2023 01:02 pm GMT

ChatGPT Is Helping Me Do Code Reviews

I have a confession to make.

I'm not a big fan of doing code review. Especially not those big ones.

But lately, I've had a great idea. The idea was to ask GPT model for help.

And I can proudly say, the help I received.

Pull GPT helping me with code reviews

My Problem With Code Reviews

What I really hate about code reviews is looking at a completely new file with undocumented code.

I have no idea what is going on there.

And this is exactly where GPT model comes into play.

Pull GPT overview

I built a simple Github bot that do the following:

  • Analyze new pull requests
  • Process newly added files
  • Write brief description of the code
  • Add description as a comment to pull request

I tested this whole flow on one of my projects, and I was very satisfied with the result.

Pull GPT in action

Here's a brief description that the model wrote.

This code is a React functional component that renders an affiliate ad using a combination of React hooks and DOM manipulation.

The component uses the useAffiliateAssets hook to fetch assets for the ad, useMediaQuery to determine the device type, then it renders the ad using ReactDOM.createPortal and inserting the ad before the heading variable in the HTML document.

If any of the required assets, heading, mediumBox or mediumLandscape are not available the component returns null

My (Possible) Next Steps

I just built the prototype together to prove that the concept is working.

But I can't help to wonder.

  • Is this something that could help the others?
  • Should I build this into a fully-featured product?

I know this would be a really fun project to work on, but I'm not sure if the idea is valid.

If you think it is, please let me know in the comments. If you think it's not, let me know as well.

And if you feel like you really need this, you can pre-order a lifetime deal ($29) by using this link.

Note: You'll be redirected to Stripe checkout.


Original Link: https://dev.to/codewithbernard/chatgpt-is-helping-me-do-code-reviews-3a0o

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To