Skip to content

Knowledge Share

Require the reviewer as a previous contributor with code expertise between set thresholds when PR contains Share Knowledge label.

Knowledge Share

Configuration Description

Conditions (all must be true):

  • A Share Knowledge label has been applied to the PR

Automation Actions:

  • Choose a previous contributor between specified expertise thresholds and assign them as a reviewer.
  • Post a comment explaining why this action was taken.

Knowledge Share

# -*- mode: yaml -*-

manifest:
  version: 1.0

automations:
  share_knowledge:
    if:
      - {{ pr.labels | match(term='Share Knowledge') | some }}
    run:
      - action: add-reviewers@v1
        args:
          reviewers: {{ repo | codeExperts(gt=30, lt=60) | random }}
      - action: add-comment@v1
        args:
          comment: |
            gitStream has assigned a reviewer to increase knowledge sharing on this PR.

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.