Skip to main content

Rerunning Reviews

Sometimes you need to rerun a review without changing code. This page explains how to do it.

When You Need to Rerun?

Typical Scenarios

  1. Review Failed with Error

    • Temporary GitHub API issues
    • Repository cloning timeout
    • Internal system errors
  2. Need Additional Review

    • Want to get another AI opinion
    • Guidelines changed (in future versions)
    • AI model updated
  3. Review Started Before Adding Repository

    • PR existed before connecting diffray
    • Want to get review for an old PR

Method 1: Add diffray-review Label

This is the main and recommended way to rerun a review.

Steps

  1. Open the pull request on GitHub
  2. In the right panel, find the "Labels" section
  3. Click the gear icon ⚙️
  4. Find the diffray-review label in the list
  5. Check the box next to it
  6. Close the labels menu

What Will Happen

[Label diffray-review added]

[Old status labels removed]
(diffray-review-completed or diffray-review-failed)

[diffray-review-started added]

[New review starts]

[Analysis 5-10 minutes]

[Results published]

Can You Leave the Label?

Yes! The diffray-review label is NOT removed automatically.

You can:

  • Leave it for quick reruns in the future
  • Remove it manually if not needed

Important: Re-adding the same label will NOT start a new review. You need to:

  1. Remove the label
  2. Add it again

Or use other rerun methods.

Method 2: Push Empty Commit

This method triggers review through the synchronize event.

Steps

# While on the PR branch
git commit --allow-empty -m "Trigger diffray review"
git push origin <branch-name>

When to Use

  • You have a local repository copy
  • You want to leave a trace in commit history
  • diffray-review label is unavailable or removed

Pros and Cons

Pros:

  • Doesn't require GitHub UI access
  • Can be automated via scripts
  • Works from command line

Cons:

  • Adds empty commit to history
  • Requires local copy and push permissions
  • Less obvious than label

Method 3: Close and Reopen PR

Closing and reopening PR triggers the reopened event.

Steps

  1. Open PR on GitHub
  2. Scroll down
  3. Click "Close pull request"
  4. Wait a few seconds
  5. Click "Reopen pull request"

When to Use

  • As a last resort when other methods don't work
  • If you need to "reset" PR state

Warnings

⚠️ Not recommended for regular use:

  • Creates extra events and notifications
  • Can confuse other team members
  • May affect integrations and automation

Use only if label and empty commit don't work.

Method 4: Amend and Force Push

Modifying the last commit and force pushing.

Steps

# Make a small change (e.g., a space)
echo " " >> README.md

# Amend last commit
git add README.md
git commit --amend --no-edit

# Force push
git push --force origin <branch-name>

When to Use

  • Want to fix the last commit simultaneously
  • Need a rerun but don't want to add a new commit

Warnings

⚠️ Caution:

  • Force push can cause problems for other contributors
  • Changes commit history
  • Use only on your own branches

Automatic Refund on Error

If review completed with error (diffray-review-failed):

Automatic refund of spent review occurs in these cases:

  • Timeout during execution
  • GitHub API errors (403, 404, 500)
  • Internal diffray errors
  • Repository cloning errors

Refund does NOT occur in these cases:

  • Problems in your code (e.g., syntax errors)
  • Repository unavailability due to access rights
  • Review cancellation by you

On automatic refund:

  • Your review limit is restored
  • Transaction is marked as "refunded"
  • You can restart the review for free

Rerun Limits

Trial Account

  • Daily limit: 10 reviews per day
  • Each rerun counts as a new review
  • Limit resets at 00:00 UTC

Example:

  • You have 5 reviews left for today
  • You start a review, it fails with error
  • Automatic refund occurs → 5 reviews again
  • You restart → 4 reviews left
  • Monthly limit: 100/500/1000 reviews per month
  • No daily limit
  • Limit resets every 30 days

Concurrent Reviews

  • Trial: 1 concurrent review
  • Paid: 2-5 concurrent reviews (depends on package)

If you try to start more concurrent reviews:

❌ Error: Too many concurrent reviews
Concurrent reviews running: 2/2
Please wait for existing reviews to complete.

Monitoring Reruns

In Dashboard

  1. Go to Dashboard section
  2. In "Recent Reviews" you'll see all your reviews
  3. One PR can have multiple reviews

By reviewId

Each run creates a new reviewId:

PR #123: 1st run → review_abc123
PR #123: 2nd run (rerun) → review_def456
PR #123: 3rd run → review_ghi789

All reviews are independent and have their own results.

Best Practices

  1. Use label for regular reruns
  2. Wait for completion of current review before new run
  3. Check error in Check Run before rerunning
  4. Remove label before re-adding for new run
  1. Starting multiple reviews simultaneously (wastes limits)
  2. Rerunning without reason (wastes limits)
  3. Using close/reopen for regular reruns
  4. Force push without necessity

Troubleshooting

Rerun Doesn't Work

Problem: Added label but review doesn't start

Solutions:

  1. Check limits

    • Dashboard → Billing → see remaining reviews
    • May have exceeded daily limit (trial) or concurrent limit
  2. Check repository status

    • Dashboard → Repositories → make sure repository is added
  3. Remove and re-add label

    • GitHub sometimes doesn't send webhook on re-add
  4. Try another method

    • Use empty commit instead of label

Review Starts but Fails Immediately

Problem: Status immediately becomes failed

Possible causes:

  • Repository became unavailable (permissions changed)
  • Branch was deleted
  • GitHub API issues

Solution:

  1. Check GitHub Check Run for error details
  2. Make sure branch exists
  3. Check GitHub App access rights

Next step: Limits and Billing