1
- """A script that parses all active pyOS repos and collects contributor and
2
- activity information in the form of opened issues and pull requests.
1
+ """A script that parses all active pyOS repos and collects contributor and
2
+ activity information in the form of opened issues and pull requests.
3
3
4
4
This script returns a `.csv` file that contains all issue and pr data for items:
5
5
6
- * not created by a bot
6
+ * not created by a bot
7
7
* and created in the specific current year.
8
8
9
- The one issue with this workflow is that if it doesn't run on the last day of
10
- the year, then it won't capture the last pr's that might happen on new years
11
- eve week.
9
+ The one issue with this workflow is that if it doesn't run on the last day of
10
+ the year, then it won't capture the last pr's that might happen on new years
11
+ eve week.
12
12
13
- This will allow us to track contribution growth overtime.
13
+ This will allow us to track contribution growth overtime.
14
14
15
- Ideally this should be run as a cron job, a workflow dispatch and then
16
- on near years eve
15
+ Ideally this should be run as a cron job, a workflow dispatch and then
16
+ on near years eve
17
17
18
18
# Run specifically on New Year's Eve at 11:30 PM
19
19
- cron: '30 23 31 12 *'
20
-
20
+
21
21
That way we are sure to capture data for the entirety of 2024 on new years eve!!xw
22
22
"""
23
23
@@ -66,7 +66,7 @@ def get_repo_data(
66
66
"""
67
67
68
68
github_api .endpoint_type = endpoint_type
69
- items = github_api .return_response ( )
69
+ items = github_api ._get_response_rest ( github_api . api_endpoint )
70
70
contrib_type = "contributor"
71
71
72
72
data = []
@@ -128,8 +128,8 @@ def process_repo(github_api, repo_name, contrib_types, user_location_cache):
128
128
129
129
Returns
130
130
-------
131
- dict
132
- A dictionary containing the processed issues and pull requests of the repository.
131
+ pandas.DataFrame
132
+ A DataFrame containing the processed issues and pull requests of the repository.
133
133
134
134
Raises
135
135
------
@@ -154,6 +154,7 @@ def process_repo(github_api, repo_name, contrib_types, user_location_cache):
154
154
return all_contribs_df
155
155
except Exception as e :
156
156
logging .error (f"An error occurred: { e } " )
157
+ return pd .DataFrame ()
157
158
158
159
159
160
# Set this to True if you want to update the 2018-2023 data
0 commit comments