SSO protection
Browse filesFiles changed (2)
- app.py+5-7
- graphql_calls.py+13-3
19 unmodified lines2021222324252627282930313219 unmodified linesignore_dependabot: bool,ignore_direct: bool,):date = get_tag_commit_date(token, repo, tag)if date is None:return "The token was invalid or didn't have the necessary scopes."commits = get_commits(token, repo, branch, date)result = ""contributors = {}19 unmodified lines202122232425262728293019 unmodified linesignore_dependabot: bool,ignore_direct: bool,):try:date = get_tag_commit_date(token, repo, tag)commits = get_commits(token, repo, branch, date)except ValueError as e:return str(e)result = ""contributors = {}
46 unmodified lines47484950515253545537 unmodified lines93949596979846 unmodified linesresponse = call_with_query(query, token)try:committed_date = response['data']['repository']['object']['committedDate']except KeyError:committed_date = Nonereturn committed_date37 unmodified lines"""result = call_with_query(query, token)if result['data']['repository']['object'] is None:raise ValueError("Either the tag or the branch were incorrect.")46 unmodified lines4748495051525354555657585960616237 unmodified lines10010110210310410510610710846 unmodified linesresponse = call_with_query(query, token)try:repository = response['data']['repository']['object']if repository is None:if 'errors' in response:raise ValueError(response['errors'][0]['message'])raise ValueError('Invalid tag. Does this tag exist?')committed_date = repository['committedDate']except (KeyError, TypeError):raise ValueError('Invalid token. Does your token have the valid permissions?')return committed_date37 unmodified lines"""result = call_with_query(query, token)if 'data' not in result:raise ValueError(result['errors'][0]['message'])if result['data']['repository']['object'] is None:raise ValueError("Either the tag or the branch were incorrect.")
app.py+5-7
graphql_calls.py+13-3