diff --git a/.github/workflows/periodic-scrape.yaml b/.github/workflows/periodic-scrape.yaml index d325448..78e4d94 100644 --- a/.github/workflows/periodic-scrape.yaml +++ b/.github/workflows/periodic-scrape.yaml @@ -18,7 +18,7 @@ jobs: - name: Run Python script for scraping run: | cd scripts - python scrape-for-contributors.py + python scrape-for-contributors.py ${{ secrets.GITHUB_TOKEN }} - name: Check for changes id: git_diff diff --git a/scripts/scrape-for-contributors.py b/scripts/scrape-for-contributors.py index 7f073af..4d8479a 100644 --- a/scripts/scrape-for-contributors.py +++ b/scripts/scrape-for-contributors.py @@ -1,11 +1,16 @@ import re import requests from typing import List, Optional +import sys github_token = ( - None # supply a github token to avoid ratelimit, or don't, it's up to you + None ) +# supply a github token in an arg avoid ratelimit, or don't, it's up to you +if len(sys.argv) > 1: + github_token = sys.argv[1] + contributor_list_file = "../src/data/contributors.ts" orgs = ["R2Northstar", "R2NorthstarTools"]