Skip to content

Approve Expert Team

Approve PRs to a specified directory from a specific team.

Approve Expert Team

Conditions (all must be true):

  • All changed files are inside the docs directory
  • The PR author is on the tech-writers team.

Automation Actions:

  • Approve the PR
  • Post a comment that explains the approval.

Approve Expert Team

# -*- mode: yaml -*-

manifest:
  version: 1.0

automations:
  approve_team_by_directory:
    # Triggered for PRs that only include changes to files inside the docs directory,
    # and that are authored by someone on the tech-writers team.
    if:
      - {{ files | match(regex=r/docs\//) | every }}
      - {{ pr.author_teams | match(term='tech-writers') }}
    run: 
      - action: approve@v1
      - action: add-comment@v1
        args:
          comment: |
            Docs changes from the tech-writers team are automatically approved.