Do you need help with your code? ChatGPT can give you a hand! If you have a project on GitHub and you want someone to check your code and give you feedback, ChatGPT can do a pull request review for you.
A pull request is a way to suggest changes to someone else’s code on GitHub. ChatGPT can look at your code and give you suggestions on how to make it better. This can help you learn and improve your coding skills.
To get started, you just need to create a pull request on GitHub and ask ChatGPT to review it. ChatGPT will then look at your code and give you feedback on what you did well and what you can improve.
With ChatGPT pull request review, you can get help from a knowledgeable AI model without the need for human intervention. It can help you catch mistakes, improve code quality, and make your project more successful.
So, if you need code review assistance, just create a pull request on GitHub and ask ChatGPT to review it!
Do you know about Popular ChatGPT, AI and GPT-3 Apps?
What is Pull Request?
A pull request review is a process where collaborators can review and comment on code changes proposed in a pull request before it is merged into the main branch of a repository. The review process allows team members to provide feedback, identify potential issues, and approve or request changes to the proposed code. This helps ensure that code is thoroughly reviewed and of high quality before it is integrated into the main project. Additionally, repository administrators can set the requirement for approval on all pull requests for added security.
Github Actions
GitHub Actions is a powerful tool that allows developers to automate various tasks within their workflow, including the review process for pull requests. By setting up actions, developers can streamline the review process and ensure that code is thoroughly reviewed and of high quality before it is integrated into the main project. Additionally, repository administrators can set the requirement for approval on all pull requests for added security. This not only saves time but also increases efficiency and reduces human error. With GitHub Actions, developers can focus on writing code and let the automation handle the rest.
Integrate [email protected] To Get Assistance

Github Action Marketplace Link
The below configuration is used to setup GitHub action in GitHub workflow
on: [pull_request] name: ChatGPT CodeReview jobs: chatgpt_comment: runs-on: ubuntu-latest name: Let chatgpt comment on your PR. steps: - name: ChatGPT comment uses: kxxt/[email protected] id: chatgpt with: number: ${{ github.event.pull_request.number }} sessionToken: ${{ secrets.CHATGPT_SESSION_TOKEN }} split: 'yolo' # Use true to enable the unstable
split feature. env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Let ChatGPT on GitHub review it


How does it work behind the scene?
The idea of using AI to review pull requests is impressive. I am curious about the mechanics of how it operates. The plugin’s creator, Levi Zim, ingeniously employed GPT prompts to perform the review of pull requests.
function genReviewPRPrompt(title, body, diff) { const prompt = `Can you tell me the problems with the following pull request and describe your suggestions? title: ${title} body: ${body} The following diff is the changes made in this PR. ${diff}`; return prompt; } function genReviewPRSplitedPrompt(title, body, diff, limit) { let splits = []; diff .split(/(diff --git .+\n)/g) .slice(1) .reduce((prev, cur, i) => { if (i % 2 == 1) { let dif = prev + cur; if (dif.length > limit) { const header = diff.split("\n", 1)[0]; const info = "This diff is too large so
I omitted it for you.";
splits.push(`${header}\n${info}`); } else splits.push(dif); } return cur; }); return { welcomePrompts: [ `Here is a pull request. Please assume you are a reviewer of this PR. First I will tell you the title and body of the PR. Please greet the PR author if you have done reading.
The title is ${title} The remaining part is the body. ${body}`, `Now I will give you the changes made in this PR one file at a time. When a diff is too large, I will omit it and tell you about that.`, ], diffPrompts: splits, endPrompt: `Based on your existing knowledge, can you tell me the problems with the above pull request and your suggestions for this PR?`, }; } module.exports = { genReviewPRPrompt, genReviewPRSplitedPrompt };
It appears that the application of ChatGPT is similar to that of STARTS in space.
you can also Integrate ChatGPT with WhatsApp and enjoy.
2 Comments
An outstanding share! I have just forwarded this onto a friend who had been doing a little research on this. And he actually bought me lunch simply because I discovered it for him… lol. So allow me to reword this…. Thank YOU for the meal!! But yeah, thanks for spending the time to discuss this subject here on your web page.
Thank you so much for your kind words and for sharing your positive experience with your friend. I’m glad to hear that our blog post was helpful and that it led to a delicious lunch for you! It’s always great to hear that our content is making a difference for readers. Please feel free to share our blog with anyone who may find it useful – I appreciate your support!