This means that if we try to download a missing file, we do not get a document with the same file name, but containing only the http response code. ``` $ curl -O -L --fail https://raw.githubusercontent.com/llvm/llvm-project/main/.github/workflows/not-a-file.py % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (22) The requested URL returned error: 404 $ $? 22: command not found ``` Which will be less confusing than python complaining about the file contents.
30 lines
885 B
YAML
30 lines
885 B
YAML
name: PR Subscriber
|
|
|
|
on:
|
|
pull_request_target:
|
|
types:
|
|
- labeled
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
auto-subscribe:
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'llvm/llvm-project'
|
|
steps:
|
|
- name: Setup Automation Script
|
|
run: |
|
|
curl -O -L --fail https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/main/llvm/utils/git/github-automation.py
|
|
curl -O -L --fail https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/main/llvm/utils/git/requirements.txt
|
|
chmod a+x github-automation.py
|
|
pip install -r requirements.txt
|
|
|
|
- name: Update watchers
|
|
run: |
|
|
./github-automation.py \
|
|
--token '${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}' \
|
|
pr-subscriber \
|
|
--issue-number "${{ github.event.number }}" \
|
|
--label-name "${{ github.event.label.name }}"
|