Created
June 16, 2023 10:58
-
-
Save adamltyson/abff41d37f327de3e10a34204581650e to your computer and use it in GitHub Desktop.
Summarise github actions billing report
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # To use, download GitHub usage report from the organisation | |
| # billing tab then run e.g.: | |
| # `python actions_billing_summary.py file.csv` | |
| import sys | |
| import pandas as pd | |
| actions_csv = sys.argv[1] | |
| df = pd.read_csv(actions_csv) | |
| df = df[df['Product'] == 'Actions'] | |
| df["Total"] = df["Quantity"] * df["Multiplier"] | |
| df = df.groupby(["Repository Slug"]).sum() | |
| df = df.sort_values(by=['Total'], ascending=False) | |
| print(df) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment