Skip to content

Commit f44eb35

Browse files
authored
Merge pull request #1 from Spendesk/develop
Merge upstream
2 parents 9bb82b8 + 5bab894 commit f44eb35

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

deploy/helm-chart/github-actions-exporter/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ version: 0.1.4
1111
# This is the version number of the application being deployed. This version number should be
1212
# incremented each time you make changes to the application. Versions are not expected to
1313
# follow Semantic Versioning. They should reflect the version the application is using.
14-
appVersion: 1.8.0
14+
appVersion: 1.8.1

pkg/metrics/get_runners_from_github.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var (
1717
Name: "github_runner_status",
1818
Help: "runner status",
1919
},
20-
[]string{"repo", "os", "name", "id"},
20+
[]string{"repo", "os", "name", "id", "busy"},
2121
)
2222
)
2323

@@ -32,9 +32,9 @@ func getRunnersFromGithub() {
3232
} else {
3333
for _, runner := range resp.Runners {
3434
if runner.GetStatus() == "online" {
35-
runnersGauge.WithLabelValues(repo, *runner.OS, *runner.Name, strconv.FormatInt(runner.GetID(), 10)).Set(1)
35+
runnersGauge.WithLabelValues(repo, *runner.OS, *runner.Name, strconv.FormatInt(runner.GetID(), 10), strconv.FormatBool(runner.GetBusy())).Set(1)
3636
} else {
37-
runnersGauge.WithLabelValues(repo, *runner.OS, *runner.Name, strconv.FormatInt(runner.GetID(), 10)).Set(0)
37+
runnersGauge.WithLabelValues(repo, *runner.OS, *runner.Name, strconv.FormatInt(runner.GetID(), 10), strconv.FormatBool(runner.GetBusy())).Set(0)
3838
}
3939
}
4040
}

pkg/metrics/get_runners_organization_from_github.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var (
1717
Name: "github_runner_organization_status",
1818
Help: "runner status",
1919
},
20-
[]string{"organization", "os", "name", "id"},
20+
[]string{"organization", "os", "name", "id", "busy"},
2121
)
2222
)
2323

@@ -33,9 +33,9 @@ func getRunnersOrganizationFromGithub() {
3333
} else {
3434
for _, runner := range resp.Runners {
3535
if runner.GetStatus() == "online" {
36-
runnersOrganizationGauge.WithLabelValues(orga, *runner.OS, *runner.Name, strconv.FormatInt(runner.GetID(), 10)).Set(1)
36+
runnersOrganizationGauge.WithLabelValues(orga, *runner.OS, *runner.Name, strconv.FormatInt(runner.GetID(), 10), strconv.FormatBool(runner.GetBusy())).Set(1)
3737
} else {
38-
runnersOrganizationGauge.WithLabelValues(orga, *runner.OS, *runner.Name, strconv.FormatInt(runner.GetID(), 10)).Set(0)
38+
runnersOrganizationGauge.WithLabelValues(orga, *runner.OS, *runner.Name, strconv.FormatInt(runner.GetID(), 10), strconv.FormatBool(runner.GetBusy())).Set(0)
3939
}
4040
}
4141
if rr.NextPage == 0 {

pkg/metrics/get_workflow_runs_from_github.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func getRelevantFields(repo string, run *github.WorkflowRun) []string {
5252
return result
5353
}
5454

55-
// getWorkflowRunsFromGithub - return informations and status about a worflow
55+
// getWorkflowRunsFromGithub - return informations and status about a workflow
5656
func getWorkflowRunsFromGithub() {
5757
for {
5858
for _, repo := range config.Github.Repositories.Value() {

0 commit comments

Comments
 (0)