I was using the Code by Zapier function, I was running a python script which calls a GitHub api to get contributors from a repo, but the response I’m getting is only of one of the contributors, am I doing something wrong, here’s the script attached below
import requests
def get_contributors(repo_url):
parts = repo_url.strip('/').split('/')
owner = partsp-2]
repo = partsp-1]
url = f'https://api.github.com/repos/{owner}/{repo}/contributors'
headers = {'Accept': 'application/vnd.github.v3+json'}
response = requests.get(url, headers=headers)
if response.status_code == 200:
contributors = response.json()
return contributors
else:
print(f"Failed to retrieve contributors. Status code: {response.status_code}")
return None
repo_url = input_data_'repo_url']
contributors = get_contributors(repo_url)
return contributors