summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/request-dataplane-review.yml
blob: 7ca3b98022ce7c7ccdc0c1802ec83e6bc5380cbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: request-dataplane-review

on:
  pull_request:
    types: [ opened, synchronize, reopened, ready_for_review ]
    paths:
      - ".github/workflows/request-dataplane-review.yml"
      - "**/*derp*"
      - "**/derp*/**"
      - "!**/depaware.txt"

jobs:
  request-dataplane-review:
    if: github.event.pull_request.draft == false
    name: Request Dataplane Review
    runs-on: ubuntu-latest
    steps:
      - name: Check out code
        uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
      - name: Get access token
        uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
        id: generate-token
        with:
          # Get token for app: https://github.com/apps/change-visibility-bot
          app-id: ${{ secrets.VISIBILITY_BOT_APP_ID }}
          private-key: ${{ secrets.VISIBILITY_BOT_APP_PRIVATE_KEY }}
      - name: Add reviewers
        env:
          GH_TOKEN: ${{ steps.generate-token.outputs.token }}
          url: ${{ github.event.pull_request.html_url }}
        run: |
          gh pr edit "$url" --add-reviewer tailscale/dataplane