Created
April 21, 2023 18:53
-
-
Save castrojo/1b5f221d6b1d9fedeb0a8c7fe29fa2f8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import requests | |
ignore_list = { | |
'flathubbot' | |
} | |
def main(): | |
parser = argparse.ArgumentParser(description='Process github contributor stats') | |
parser.add_argument('organization', metavar='ORGANIZATION', type=str, help='Github organization') | |
parser.add_argument('-t', '--token', metavar='TOKEN', type=str, required=True, help='API token') | |
args = parser.parse_args() | |
headers = { | |
'Accept': 'application/vnd.github+json', | |
'Authorization': f'Bearer {args.token}', | |
'X-GitHub-Api-Version': '2022-11-28' | |
} | |
url = f'https://api.github.com/orgs/{args.organization}/outside_collaborators' | |
req = requests.get(url, headers=headers) | |
print(req.json()) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment