Skip to content

Commit

Permalink
update github api limit
Browse files Browse the repository at this point in the history
  • Loading branch information
K1ngst0m committed Aug 29, 2023
1 parent 7899421 commit 1641cd6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/Awesome-Game-Analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ jobs:
- name: Execute Python scripts
id: execute-scripts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python scripts/toml_markdown.py -i data/games.toml -t toml --readme
python scripts/generate_contributors.py
Expand Down
10 changes: 9 additions & 1 deletion scripts/generate_contributors.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
import requests
import json
import sys
import os

# Replace with your repository's details
username = 'OTFCG'
repo = 'Awesome-Game-Analysis'

# Replace with your GitHub token
token = os.getenv('GITHUB_TOKEN')

headers = {
'Authorization': f'token {token}',
}

try:
# Call GitHub API for contributors
response = requests.get(f'https://api.github.com/repos/{username}/{repo}/contributors')
response = requests.get(f'https://api.github.com/repos/{username}/{repo}/contributors', headers=headers)

# If the request was successful
if response.status_code != 200:
Expand Down

0 comments on commit 1641cd6

Please sign in to comment.