Skip to content

Commit

Permalink
Add option to pass GitHub token via CLI arg (#99)
Browse files Browse the repository at this point in the history
and make use of it in CI

Co-authored-by: Barnaby <[email protected]>
  • Loading branch information
GeckoEidechse and barnabwhy authored Aug 18, 2024
1 parent 3da4a36 commit 4cc52cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/periodic-scrape.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion scripts/scrape-for-contributors.py
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down

0 comments on commit 4cc52cc

Please sign in to comment.