We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1afbff3 commit 9e2431fCopy full SHA for 9e2431f
1 file changed
src/scripts/generate_page.py
@@ -29,6 +29,15 @@ def get_total_commits(repo):
29
return counts
30
31
32
+def get_total_deployments(repo):
33
+ """Get total deployments in a repository."""
34
+ try:
35
+ counts = repo.get_deployments().totalCount
36
+ except:
37
+ counts = 0
38
+ return counts
39
+
40
41
def get_commit_history(repo):
42
"""Get commit history for a repository."""
43
total = get_total_commits(repo)
@@ -123,7 +132,7 @@ def get_config_readme(repo_name):
123
132
else None
124
133
),
125
134
"contributors": repo.get_contributors().totalCount,
126
- "deployments": repo.get_deployments().totalCount,
135
+ "deployments": get_total_deployments(repo),
127
136
"downloads": sum(
128
137
asset.download_count
129
138
for release in repo.get_releases()
0 commit comments