Skip to content

Label the Number of Approvals

Automatically label PRs with the number of completed reviews that approve the PR.

Label the Number of Approvals

Configuration Description

Conditions (all must be true):

  • A PR is created or updated.

Automation Actions:

  • Apply or update a label that indicates how many merge approvals have been granted.

Label the Number of Approvals

# -*- mode: yaml -*-
manifest:
  version: 1.0
automations:
  label_approvals: 
    if:  
      - {{ pr.approvals | length > 0 }}
    run:
      - action: add-label@v1
        args:
          label: {{ pr.approvals | length }} Approved Review(s)

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.