about summary refs log tree commit diff
path: root/cmd/ghabilling/README.md
blob: 2aa08ce251919075a4b358ea7f7fb5d73a83b92e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# `gha-billing`

Print information about how many free minutes of GitHub actions are left for this cycle.

The API for this is documented [here](https://docs.github.com/en/rest/billing/billing?apiVersion=2022-11-28#get-github-actions-billing-for-an-organization).

For this you need a [token](https://github.com/settings/personal-access-tokens) with the following permissions:
- [plan](https://docs.github.com/en/rest/authentication/permissions-required-for-fine-grained-personal-access-tokens?apiVersion=2022-11-28#user-permissions-for-plan)

## usage

```sh  world git:(main)  go run ./cmd/ghabilling -t github_pat_<TOKEN>
this cycle, 14 minutes have been used, and 1986 minutes are remaining
```