-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml
More file actions
36 lines (33 loc) · 1.21 KB
/
Copy pathconfig.yaml
File metadata and controls
36 lines (33 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# config.yaml
requests:
- api_path: "/users/{{ .GITHUB_USER }}"
metrics:
- name: github_followers
path: "followers" # JSON path
help: "Total followers"
- name: github_public_repos
path: "public_repos"
help: "Public repositories"
- api_path: "/users/{{ .GITHUB_USER }}/repos?per_page=100"
metrics:
- name: github_stars_total
path: "#.stargazers_count"
help: "Sum of all stars"
aggregate: "sum" # sum, count, min, max
- api_path: "/graphql"
method: "POST"
body: |
{ "query": "query { user(login: \"{{ .GITHUB_USER }}\") { contributionsCollection { contributionCalendar { totalContributions } } } }" }
metrics:
- name: gh_contributions_last_year
path: "data.user.contributionsCollection.contributionCalendar.totalContributions"
help: "Total contributions in the last year "
- api_path: "/users/{{ .GITHUB_USER }}/events/public"
metrics:
- name: github_last_push_info
path: '#(type=="PushEvent").created_at'
help: "Timestamp of the last push event"
value_type: "date"
labels:
repo: '#(type=="PushEvent").repo.name'
type: '#(type=="PushEvent").type'