Skip to content

Amazon Q Developer bot fails to complete code review on GitHub with "unable to finalize my review" error

0

I'm experiencing an issue with Amazon Q Developer for GitHub where the bot starts a code review but fails to complete it.

What's happening:

The bot posts a comment saying "Code review in progress. Analyzing for code quality issues and best practices. Detailed findings will be posted upon completion." After some time , it posts another comment stating: "Something went wrong and I was unable to finalize my review. This may be because of review guidelines that I cannot comply with." No actual code review findings are ever posted.

Questions:

  • What could be causing Amazon Q Developer to fail with this error message?
  • What are the "review guidelines" that might be preventing the bot from completing the review?
  • Are there specific repository settings, file types, or code patterns that could cause this issue?
  • How can I troubleshoot or resolve this problem?

Additional context:

This always occurs The bot has the necessary permissions to access the repository

Has anyone else encountered this issue? Any suggestions would be appreciated.

Error Message

asked a year ago532 views

1 Answer
0

This error typically occurs when Amazon Q Developer cannot meet your repository's review guidelines or branch protection requirements. The bot is trying to submit its code review but is being blocked by repository policies.

Common Causes and Solutions:

  1. Repository permissions issue- the most common cause is insufficient permissions. Amazon Q Developer requires specific GitHub repository permissions to complete code reviews:
  • You need Write, Maintain, or Admin role on the repository
  • Users with only Triage role can view reviews but cannot initiate or finalize them
  • Check your repository permissions in GitHub settings
  1. Branch protection rules- if your repository has branch protection rules enabled, Amazon Q Developer might be blocked from finalizing reviews:
  • Add the Amazon Q Developer app to the allow list in your branch protection settings
  • Go to your repository Settings → Branches → Branch protection rules
  • Add "Amazon Q Developer" to the allowed apps list
  1. Missing labels - Amazon Q Developer requires specific labels to function properly:
  • Ensure you have the "Amazon Q development agent" label in your repository
  • Ensure you have the "Amazon Q transform agent" label in your repository
  • If missing, manually create these labels in your GitHub repository
  1. Technical difficulties- if Amazon Q Developer is experiencing technical issues, you'll see error messages. The solution is:
  • Create a new issue and apply the appropriate Amazon Q Developer agent label
  • Use the /q review command again in a new comment
  • Wait a few minutes as the process can take time to complete

Troubleshooting Steps:

  1. Check repository access: Verify you have Write, Maintain, or Admin permissions
  2. Verify app installation: Ensure Amazon Q Developer app is properly installed and authorized for your GitHub organization
  3. Review branch protection: Add Amazon Q Developer to branch protection allow lists if applicable
  4. Try manual trigger: Use the /q review command in a pull request comment to manually initiate the review
  5. Check labels: Ensure the required Amazon Q Developer labels exist in your repository

Additional Notes

  • Automatic code reviews are only triggered for new or reopened pull requests
  • Subsequent commits to existing pull requests don't trigger automatic reviews
  • You can initiate additional reviews using the /q review slash command
  • The review process can take several minutes to complete

For more information please see the following guides:

  1. Troubleshooting issues for Amazon Q Developer for GitHub - https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/github-troubleshooting.html
  2. Reviewing code with Amazon Q Developer in GitHub - https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/github-code-reviews.html
  3. Amazon Q Developer in GitHub (in preview) accelerates code generation - https://aws.amazon.com/blogs/aws/amazon-q-developer-in-github-now-in-preview-with-code-generation-review-and-legacy-transformation-capabilities/
  4. Amazon Q Developer for GitHub (Preview) - https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/amazon-q-for-github.html
  5. Developing features and iterating with Amazon Q Developer in GitHub - https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/github-feature-development.html

If these solutions don't resolve the issue, you may need to reinstall the Amazon Q Developer app or contact AWS Support for further assistance.

answered a year ago

AWS
SUPPORT ENGINEER

revised a year ago

AWS
SUPPORT ENGINEER

revised a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.