Skip to content

GitHub Action example should use concurrency to limit review cascades #58

@mogul

Description

@mogul

OpenCodeReview Version

latest, installed in CI/CD

Operating System

Linux (ARM64)

Installation Method

npm (global)

LLM Provider

Other OpenAI-compatible endpoint

Bug Description

If you use the GitHub Action workflow example as-is, every sync of commits to a PR results in a report from OCR, whether or not that's helpful or spammy.

Steps to Reproduce

Install the example GitHub workflow as-is, then open a PR and make a quick succession of commits to the branch, eg via the GitHub web interface. You'll notice have many OCR reviews in flight in parallel, and when they complete they'll all pile up repetitive posts on the PR.

Expected Behavior

If there is any OCR action in progress, it should be canceled before it has a change to complete and post on the PR. The review should include everything from the root of the branch, not just the commits that trigger the review.

Logs / Error Output

Additional Context

You can implement the desired behavior by putting this above your triggers:

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions