1name: Issue Subscriber
2
3on:
4  issues:
5    types:
6      - labeled
7
8jobs:
9  auto-subscribe:
10    runs-on: ubuntu-latest
11    if: github.repository == 'llvm/llvm-project'
12    steps:
13    - name: Setup Automation Script
14      run:  |
15        curl -O -L https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_SHA/llvm/utils/git/github-automation.py
16        curl -O -L https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_SHA/llvm/utils/git/requirements.txt
17        chmod a+x github-automation.py
18        pip install -r requirements.txt
19
20    - name: Update watchers
21      run: |
22        ./github-automation.py \
23          --token ${{ secrets.ISSUE_SUBSCRIBER_TOKEN }} \
24          issue-subscriber \
25          --issue-number ${{ github.event.issue.number }} \
26          --label-name ${{ github.event.label.name }}
27