Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion list_secret_scanning_alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def make_result(
if alert.get("commit") is not None:
commit_info = alert["commit"]
result["first_commit_date"] = commit_info["committer"]["date"]
result["first_commit_author"] = f"{commit_info["author"]["name"]} <{commit_info["author"]["email"]}>"
result["first_commit_author"] = f"{commit_info['author']['name']} <{commit_info['author']['email']}>"

if include_locations:
# use decorated alert info, if it's there
Expand Down
6 changes: 5 additions & 1 deletion test_tls_cert_support.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def test_github_verify_default():
from githubapi import GitHub

gh = GitHub()
gh = gh # to avoid unused variable warning
Comment thread
aegilops marked this conversation as resolved.
Outdated

# Verify that session.verify is set to True by default
assert mock_session.verify == True
Expand All @@ -30,6 +31,7 @@ def test_github_verify_false():
from githubapi import GitHub

gh = GitHub(verify=False)
gh = gh # to avoid unused variable warning
Comment thread
aegilops marked this conversation as resolved.
Outdated

# Verify that session.verify is set to False
assert mock_session.verify == False
Expand All @@ -46,6 +48,7 @@ def test_github_verify_cert_bundle():

cert_path = "/path/to/cert.pem"
gh = GitHub(verify=cert_path)
gh = gh # to avoid unused variable warning
Comment thread
aegilops marked this conversation as resolved.
Outdated

# Verify that session.verify is set to the certificate path
assert mock_session.verify == cert_path
Expand All @@ -57,6 +60,7 @@ def test_github_token_required():
with pytest.raises(ValueError, match="GITHUB_TOKEN environment variable must be set"):
from githubapi import GitHub
gh = GitHub()
gh = gh # to avoid unused variable warning
Comment thread
aegilops marked this conversation as resolved.
Outdated


def test_github_hostname_validation():
Expand All @@ -65,7 +69,7 @@ def test_github_hostname_validation():
with pytest.raises(ValueError, match="Invalid server hostname"):
from githubapi import GitHub
gh = GitHub(hostname="invalid hostname with spaces")

gh = gh # to avoid unused variable warning
Comment thread
aegilops marked this conversation as resolved.
Outdated

if __name__ == "__main__":
pytest.main([__file__, "-v"])
Loading