Skip to content

Commit 90f80ba

Browse files
committed
add github forks stat
1 parent a600ba4 commit 90f80ba

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/writegithubstat/githubstat.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def process_stat(data):
114114
return df
115115

116116

117-
class Stars(GithubStatType):
117+
class Cumulative(GithubStatType):
118118
@property
119119
def url(self):
120120
return f"https://api.github.com/repos/{self._auth.owner}/{self._auth.repo}"
@@ -125,12 +125,13 @@ def dimensions(self):
125125

126126
@property
127127
def measures(self):
128-
return ["stars_cumulative"]
128+
return ["stars", "forks"]
129129

130130
@staticmethod
131131
def process_stat(data):
132132
stars = data["stargazers_count"]
133-
df = pd.DataFrame({"stars_cumulative": [stars]})
133+
forks = data["forks_count"]
134+
df = pd.DataFrame({"stars": [stars], "forks": [forks]})
134135
return df
135136

136137

0 commit comments

Comments
 (0)