github-insights / github-metrics

0 stars 0 forks source link

fixed selfhosted runner os parsing error #171

Closed tomellm closed 5 months ago

tomellm commented 5 months ago

166 The os string returned by the Github api turned out to be more unpredictable then expected. This meant that a more complex setup was needed to convert the os string to the OperatingSystem enum.

Converting the string to enum works by trying to find any of a list of value in the returned os string. This list can be extended from the application.yaml through the APP_GITHUB_<OS>_SELFHOSTED_RUNNER_OS_KEYWORDS environemnt variable.

Additionally, instead of throwing an Exception when the parsing didn't succeed I added a UNKNOWN variant to the enum and log the os string for later reference.

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud