2022-01-06 02:30:30 +08:00
|
|
|
name: Issue Subscriber
|
|
|
|
|
|
|
|
on:
|
|
|
|
issues:
|
|
|
|
types:
|
|
|
|
- labeled
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
auto-subscribe:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.repository == 'llvm/llvm-project'
|
|
|
|
steps:
|
2022-05-09 09:02:26 +08:00
|
|
|
- name: Setup Automation Script
|
|
|
|
run: |
|
|
|
|
curl -O -L https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_SHA/llvm/utils/git/github-automation.py
|
|
|
|
curl -O -L https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_SHA/llvm/utils/git/requirements.txt
|
|
|
|
chmod a+x github-automation.py
|
|
|
|
pip install -r requirements.txt
|
2022-01-15 09:08:01 +08:00
|
|
|
|
2022-05-09 09:02:26 +08:00
|
|
|
- name: Update watchers
|
|
|
|
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
|
|
|
|
env:
|
|
|
|
LABEL_NAME: ${{ github.event.label.name }}
|
|
|
|
run: |
|
|
|
|
./github-automation.py \
|
|
|
|
--token '${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}' \
|
|
|
|
issue-subscriber \
|
|
|
|
--issue-number '${{ github.event.issue.number }}' \
|
|
|
|
--label-name "$LABEL_NAME"
|