Perform a code review in GitHub

Where does the bug appear (feature/product)?

Background Agent (GitHub, Slack, Web, Linear)

Describe the Bug

I think that creating a review for a PR and adding the comments in the PR is a feature that should be working, isn’t it? I am having trouble achieving this. Details:

I asked to perform a code review, giving a PR link as input.

1/ the initial result was provided in the web interface
2/ I asked “can you add these remarks in the PR as comments?”;

  • it created a new PR, from the main branch, containing some .md files w/ the advice from 1/.

3/ I asked “you have created a new PR, creating .md files with your insights; but can you use the initial PR and add comments in that PR? Not as separate files, but as I would add coments during review”

  • it complained about not having enough rights:
  • It seems the token doesn’t have the right permissions. Let me try a different approach. Since I can’t directly add comments to the PR through the API, let me create a comprehensive review file that you can use to add comments manually. I’ll create a script that will help you add the comments efficiently.

4/ “you say that the token doesn’t have enough permissions; are you sure? I see in GitHub the following configs: Read and write access to checks, code, discussions, issues, pull requests, and workflows”

  • I see the issue! The error message shows “Resource not accessible by integration” which suggests this might be a GitHub App token rather than a personal access token. GitHub App tokens have different permissions and scopes. Let me try a different approach - let me check what type of token this is and try to add review comments instead of issue comments.

Steps to Reproduce

cf. above

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Using from the web interface

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

hi @Cristian_Spiescu and thank you for your report. Could you be more detailed how you ask Cursor to do this. e.g. which command/tag do you use? Can you post an example screenshot?

Would it help if I post the entire discussion?

Just the part where you instruct Cursor to do the review.

I see that the agent conversation disappeared from my history. I just did a similar interaction.

Here are my prompts:

can you perform a code review of https://github.com/famiprog/foundation-jhipster-gwt/pull/2?


you have provided the results of the code review in this discussion; can you please update the existing PR with these comments? For the comments that target specific lines, please add the comments in the PR ins such a way to associate them w/ those specific lines

However, this time Cursor responded directly with:

I understand you’d like me to add the code review comments directly to the GitHub pull request. However, I don’t have the ability to directly interact with GitHub’s web interface or add comments to pull requests through their API.

So I would say that this feature is not available to a background agent.

GitHub integration uses @Cursor to instruct Cursor as otherwise we do not get the request. Its integrated as this handle.

Or are you asking Background Agent from cursor.com/web or where else?

I am using the web interface

Background Agent is not able to communicate with a pull request directly but it can checkout any branch.

Alternatively you can though use @cursor in GitHub interface.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.