feat(github): Analyse past release times (#3135)

* feat(github): Analyse past release times

Signed-off-by: Tim Collins <tim@thecollins.team>

* typo

Signed-off-by: Tim Collins <tim@thecollins.team>

* add megalinter config. Fix my rubbish code to appease the linter

Signed-off-by: Tim Collins <tim@thecollins.team>

---------

Signed-off-by: Tim Collins <tim@thecollins.team>
Co-authored-by: Aikawa <yu.croco@gmail.com>
This commit is contained in:
Tim Collins 2025-01-29 13:43:03 +00:00 committed by GitHub
parent 2685b861d2
commit 56c5a31c9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 2493 additions and 0 deletions

View file

@ -0,0 +1,31 @@
import os
from fetch_helmet_releases import fetch_and_write_helmet_releases
from fetch_releases import fetch_and_write_releases
from merge_csvs import merge_csv_files
from plot_graph import plot_time_difference
# Check there is a github token
github_token = os.getenv("GITHUB_TOKEN")
if not github_token:
raise ValueError("GITHUB_TOKEN environment variable is not set")
# Do the thing
print("Fetching releases...")
fetch_and_write_releases("argo_releases.csv")
print("Done")
print("Fetching Team Helmet releases...")
fetch_and_write_helmet_releases("argo_helm_releases.csv")
print("Done")
print("Merging release info...")
merge_csv_files("argo_releases.csv", "argo_helm_releases.csv", "merged_releases.csv")
print("Done")
print("Plotting time difference graphs...")
plot_time_difference("merged_releases.csv")
print("Done")
# Delete __pycache__ directories
os.system("rm -rf __pycache__")