Skip to content

Provide Estimated Time to Review

Label all PRs with an estimated number of minutes it would take someone to review. gitStream will automatically update this label whenever a PR changes.

Estimated time to review

Configuration Description

Conditions (all must be true):

  • Any new PR or change to an existing PR.

Automation Actions:

  • Apply a color coded label that provides an estimated number of minutes someone will need to review the PR.

Provide Estimated Time to Review

# -*- mode: yaml -*-

manifest:
  version: 1.0

automations:
  estimated_time_to_review:
    if:
      - true
    run:
      - action: add-label@v1
        args:
          label: "{{ calc.etr }} min review"
          color: {{ colors.red if (calc.etr >= 20) else ( colors.yellow if (calc.etr >= 5) else colors.green ) }}

calc:
  etr: {{ branch | estimatedReviewTime }}


colors:
  red: 'b60205'
  yellow: 'fbca04'
  green: '0e8a16'

Additional Resources

gitStream is a workflow automation tool that enables you to use YAML configuration files to optimize your code review process. Add context to PRs, find code experts for reviews, and automate the merge process to maximize developer productivity.

Learn More about how gitStream Works.

Related Automations:

More Automations can be found on the Automation Library and Integrations pages.