You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gx_output.c_log(f"User {login_tmp} added {ccount} Comments to Commits. Full breakdown of comments available in Verbose mode.", rtype="comments", contributor=login)
67
+
gx_output.c_log(f"User {login_tmp} added {ccount} Comments to Commits. {gx_context.verboseLegend()}", rtype="comments", contributor=login)
49
68
#gx_output.c_log(f"{ccount} Comments added to Commits by [{login}] available at: {repository.get('url')}/comments", rtype="comments")
50
69
51
70
# Not adding much value
@@ -65,7 +84,7 @@ def run(gx_context, gx_output):
65
84
66
85
print(f"\rGetting all repository comments on issues.."+" "*30, end="")
gx_output.c_log(f"User {login_tmp} added {ccount} Comments to Issues. Full breakdown of comments available in Verbose mode.", rtype="comments", contributor=login)
110
+
gx_output.c_log(f"User {login_tmp} added {ccount} Comments to Issues. {gx_context.verboseLegend()}", rtype="comments", contributor=login)
92
111
#gx_output.c_log(f"{ccount} Comments added to Issues by [{login}] available at: {repository.get('url')}/issues/comments", rtype="comments")
93
112
94
113
gx_output.r_log(f"{len(issues_comments)} Comments in issues available at: {repository.get('url')}/issues/comments", rtype="comments")
gx_output.c_log(f"User {login_tmp} added {ccount} Comments to PRs. Full breakdown of comments available in Verbose mode.", rtype="comments", contributor=login)
151
+
gx_output.c_log(f"User {login_tmp} added {ccount} Comments to PRs. {gx_context.verboseLegend()}", rtype="comments", contributor=login)
133
152
#gx_output.c_log(f"{ccount} Comments added to PRs by [{login}] available at: {repository.get('url')}/pulls/comments", rtype="comments")
134
153
135
154
gx_output.r_log(f"{len(pulls_comments)} Comments in pulls available at: {repository.get('url')}/pulls/comments", rtype="comments")
gx_output.r_log(f"{workflows.get('total_count')} Workflows were run {runs.get('total_count')} times: [{repository.get('url')}/actions/runs]", rtype="workflows")
179
-
# Pending adding more functionality here to analyse workflow runs, although capped.
180
-
run_actors=defaultdict(int)
181
-
forruninruns.get('workflow_runs'):
182
-
run_actors[run.get('actor').get('login')] +=1
183
-
184
-
total_runs=int(runs.get('total_count'))
185
-
foractor, actor_runsinrun_actors.items():
186
-
percentage_runs= (actor_runs/total_runs) *100
187
-
ifgx_context.isContributor(actor):
188
-
message=f"User {actor} triggered {actor_runs} workflow runs [{percentage_runs:.2f}%] - See them at: [{repository.get('html_url')}/actions?query=actor%3A{actor}]"
189
-
else:
190
-
message=f"WARNING: {actor} is NOT a contributor to this repository and yet triggered {actor_runs} workflow runs [{percentage_runs:.2f}%] - See them at: [{repository.get('html_url')}/actions?query=actor%3A{actor}]"
gx_output.r_log(f"{artifacts.get('total_count')} Artifacts available at: [{repository.get('url')}/actions/artifacts]", rtype="artifacts")
200
-
forartifactinartifacts.get('artifacts'):
201
-
# There are normally multiple artifacts hence we keep them under verbose.
202
-
gx_output.r_log(f"Artifact [{artifact.get('name')}] created [{artifact.get('created_at')}], updated [{artifact.get('updated_at')}]: {artifact.get('url')}", rtype="v_artifacts")
203
-
created_at=artifact.get('created_at')
204
-
created_at_ts=gh_time.parse_date(created_at)
205
-
updated_at=artifact.get('updated_at')
206
-
updated_at_ts=gh_time.parse_date(updated_at)
207
-
# This shouldn't happen but we still run a check; artifacts can't be updated but instead completely overwritten
208
-
# More data here: https://github.com/actions/upload-artifact#overwriting-an-artifact
209
-
if (updated_at_ts-created_at_ts).days>0:
210
-
gx_output.r_log(f"WARNING: An artifact [{artifact.get('name')}] was updated {(updated_at_ts-created_at_ts).days} days after being created: {artifact.get('url')}", rtype="artifacts")
0 commit comments